[Inspiron 1420, SigmaTel STAC9228, Speaker, Internal] fails after a while or plug in and out headphones

Bug #1195377 reported by Eric Shattow
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Regression from kernel 3.8.x to 3.9.x alsa drivers. After upgrade to Ubuntu+1 the internal speakers stop working randomly or when plug in and unplug headphones.

Distributor ID: Ubuntu
Description: Ubuntu Saucy Salamander (development branch)
Release: 13.10
Codename: saucy

Linux zontar 3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:46:08 UTC 2013 i686 i686 i686 GNU/Linux
sudo python hda-analyzer.py
# card-0/codec-0:data[2]=1 when headphone not been plugged, sound from spk
# card-0/codec-0:data[2]=0 when headphone plugged, sound from hp
# card-0/codec-0:data[2]=1 when headphone unplugged, sound from spk
# card-0/codec-0:data[2]=0 when headphone plugged, sound from hp

Linux zontar 3.10.0-0-generic #7-Ubuntu SMP Tue Jun 25 08:55:20 UTC 2013 i686 i686 i686 GNU/Linux
sudo python hda-analyzer.py
# card-0/codec-0:data[2]=1 when headphone not been plugged, sound from spk
# card-0/codec-0:data[2]=0 when headphone plugged, sound from hp
# card-0/codec-0:data[2]=0 when headphone unplugged, silence from spk
# card-0/codec-0:data[2]=0 when headphone plugged, sound from hp
# card-0/codec-0:data[2]=0 when headphone unplugged, silence from spk

Changing this data[2] setting in hda-analyzer does not appear to have any effect on kernel 3.10.0-0 running system. Must reboot to restore sound functioning on speakers.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: alsa-base 1.0.25+dfsg-0ubuntu4
ProcVersionSignature: Ubuntu 3.10.0-0.7-generic 3.10.0-rc7
Uname: Linux 3.10.0-0-generic i686
ApportVersion: 2.10.2-0ubuntu3
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: es 2293 F.... pulseaudio
 /dev/snd/pcmC0D0p: es 2293 F...m pulseaudio
Date: Thu Jun 27 09:18:54 2013
InstallationDate: Installed on 2012-10-07 (262 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta i386 (20120926)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: alsa-driver
Symptom: audio
Symptom_Card: Built-in Audio - HDA Intel
Symptom_Jack: Speaker, Internal
Symptom_Type: Sound works for a while, then breaks
Title: [Inspiron 1420, SigmaTel STAC9228, Speaker, Internal] fails after a while
UpgradeStatus: Upgraded to saucy on 2013-06-12 (15 days ago)
dmi.bios.date: 12/19/2008
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A10
dmi.board.name: 0DT492
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA10:bd12/19/2008:svnDellInc.:pnInspiron1420:pvr:rvnDellInc.:rn0DT492:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Inspiron 1420
dmi.sys.vendor: Dell Inc.

Revision history for this message
Eric Shattow (eshattow) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

Jun 27 07:44:08 zontar pulseaudio[2026]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Jun 27 07:44:08 zontar pulseaudio[2026]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Jun 27 07:44:08 zontar pulseaudio[2021]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Jun 27 07:44:08 zontar pulseaudio[2021]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Jun 27 07:44:09 zontar pulseaudio[2031]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Jun 27 07:44:09 zontar pulseaudio[2031]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/lightdm/.config/pulse/cookie': No such file or directory
Jun 27 07:44:10 zontar pulseaudio[2059]: [pulseaudio] pid.c: Daemon already running.

Revision history for this message
Raymond (superquad-vortex2) wrote :

Do the laptop has two headphone ?

do it support support surround 5.1 with retasked mic/line in jack ?

pin ctls of node 0x0f did not set OUT HP if your laptop have dual headphone jacks

Node 0x0a [Pin Complex] wcaps 0x400181: Stereo
  Control: name="Front Headphone Surround Jack", index=0, device=0
  Pincap 0x0000173f: IN OUT HP Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x0221101f: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=01, enabled=1
  Connection: 2
     0x02 0x03*
Node 0x0e [Pin Complex] wcaps 0x400181: Stereo
  Control: name="Mic Phantom Jack", index=0, device=0
  Pincap 0x00001737: IN OUT Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x02811030: [Jack] Line In at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x04
Node 0x0f [Pin Complex] wcaps 0x400181: Stereo
  Control: name="Front Headphone Front Phantom Jack", index=0, device=0
  Pincap 0x00001737: IN OUT Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x02011020: [Jack] Line Out at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x05

Revision history for this message
Raymond (superquad-vortex2) wrote :

try hda-jack-sense-test to find out the node of your two headphone jacks and mic jacks

Revision history for this message
Eric Shattow (eshattow) wrote :
Revision history for this message
Eric Shattow (eshattow) wrote :
Download full text (3.6 KiB)

I think headphones is the left-side phono jack, line-out is the middle phono jack, and microphone input is the right-side phono jack.

# linux 3.8.0-26-generic
//never been plugged:
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//plug in speaker phono
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = Yes
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//unplugged:
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//plug in line-out phono
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = Yes
Pin 0x21 (Black SPDIF Out): present = No
//unplugged:
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//plug in mic-in phono
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = Yes
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//unplugged
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No

# linux 3.10.0-2-generic
//never been plugged:
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//plug in speaker phono
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = Yes
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//unplugged:
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//plug in line-out phono
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = Yes
Pin 0x21 (Black SPDIF Out): present = No
//unplugged:
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = No
Pin 0x21 (Black SPDIF Out): present = No
//plug in mic-in phono
Sigmatel specific "An...

Read more...

Revision history for this message
Eric Shattow (eshattow) wrote :

HDAAnalyzer and Linux 3.8.0-26-generic:
card-0/codec-0/data[2] # 1 never plugged, 0 plug in headphones, 1 unplug headphones
card-0/codec-0/Node[0x0d]PIN # OUT=1 never plugged, OUT=0 plug in headphones, OUT=1 unplug headphones

HDAAnalyzer and Linux 3.10.0-2-generic:
card-0/codec-0/data[2] # 1 never plugged, 0 plug in headphones, 0 unplug headphones
card-0/codec-0/Node[0x0d]PIN # OUT=1 never plugged, OUT=0 plug in headphones, OUT=0 unplug headphones
Using HDAAnalyzer to set card-0/codec-0/data[2]=1 and card-0/codec-0/Node[0x0d]PIN/OUT=1 fixes the internal speakers to play sound again.

Revision history for this message
Raymond (superquad-vortex2) wrote :

does user manul mention that it can support surround 5.1 ?

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_sigmatel.c?id=bcecd9bd96a5ba598e4b671a55f05b32284987da

Codec: SigmaTel STAC9228
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x83847616
Subsystem Id: 0x102801f3

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_sigmatel.c?id=2f32d909f3a85a96074801f6cf20f93324f87646

seem strange to have 3 modified pins in driver_pin_configs if using STAC_DELL_BIOS

/sys/class/sound/hwC0D0/init_pin_configs:
0x0a 0x0221101f
0x0b 0x40f000f0
0x0c 0x40f000f1
0x0d 0x90170110
0x0e 0x02811030
0x0f 0x02011020
0x10 0x40f000f2
0x11 0x40f000f3
0x12 0x40f000f4
0x13 0x90a60040
0x14 0x40f000f5
0x21 0x034410a0
0x22 0x40f000f6

/sys/class/sound/hwC0D0/driver_pin_configs:
0x0c 0x90a79130
0x0f 0x0227011f
0x0e 0x02a79130

Revision history for this message
Raymond (superquad-vortex2) wrote :

send email to author if you think it is regression

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_sigmatel.c?id=29ac83635fcf244a7178f9fc8f918cd7ddf799d5

+ [STAC_DELL_BIOS] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ /* configure the analog microphone on some laptops */
+ { 0x0c, 0x90a79130 },
+ /* correct the front output jack as a hp out */
+ { 0x0f, 0x0227011f },
+ /* correct the front input jack as a mic */
+ { 0x0e, 0x02a79130 },
+ {}
+ },
+ .chained = true,
+ .chain_id = STAC_927X_DELL_DMIC,
+ },

- case STAC_DELL_BIOS:
- switch (codec->subsystem_id) {
- case 0x10280209:
- case 0x1028022e:
- /* correct the device field to SPDIF out */
- snd_hda_codec_set_pincfg(codec, 0x21, 0x01442070);
- break;
- }
- /* configure the analog microphone on some laptops */
- snd_hda_codec_set_pincfg(codec, 0x0c, 0x90a79130);
- /* correct the front output jack as a hp out */
- snd_hda_codec_set_pincfg(codec, 0x0f, 0x0227011f);
- /* correct the front input jack as a mic */
- snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130);
- /* fallthru */

Revision history for this message
Raymond (superquad-vortex2) wrote :

it is incorrect for the driver to create phantom jack if line out (mid hp) support jack detect

//plug in line-out phono
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Line In): present = No
Pin 0x0f (Black Line Out): present = Yes
Pin 0x21 (Black SPDIF Out): present = No

Node 0x0f [Pin Complex] wcaps 0x400181: Stereo
  Control: name="Front Headphone Front Phantom Jack", index=0, device=0
  Pincap 0x00001737: IN OUT Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x02011020: [Jack] Line Out at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x05

Revision history for this message
Raymond (superquad-vortex2) wrote :

no sound because pin ctls of speaker node is zero instead of OUT

Node 0x0d [Pin Complex] wcaps 0x400181: Stereo
  Control: name="Speaker Phantom Jack", index=0, device=0
  Pincap 0x0000173f: IN OUT HP Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00: VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x02

Revision history for this message
Eric Shattow (eshattow) wrote :

Author is testing patches with my configuration. I will update this bug with more information when available.

Revision history for this message
Raymond (superquad-vortex2) wrote :

In theory, to support 5.1

left headphone can be retasked as Front
middle line out can be retasked as Surround
mic jack can be retasked as Center/LFE

when only support stereo

left headphone and middle line out support two headphone
plug in any of the two headphone mute the internal speaker

unsolicited event need to enabled on line out jack

Revision history for this message
Raymond (superquad-vortex2) wrote :

do the internal mic work or not since there are two internal mic after using stac_dell_bios ?

Node 0x0c [Pin Complex] wcaps 0x400181: Stereo
  Control: name="Internal Mic Phantom Jack", index=1, device=0
  Pincap 0x00001737: IN OUT Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x40f000f1: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x1
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x03

Node 0x13 [Pin Complex] wcaps 0x400001: Stereo
  Control: name="Internal Mic Phantom Jack", index=0, device=0
  Pincap 0x00000020: IN
  Pin Default 0x90a60040: [Fixed] Mic at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0x20: IN

Revision history for this message
Eric Shattow (eshattow) wrote :

Takashi Iwai had me test this patch, and it fixes Stereo 2.0 output / input enough that it works for me. Surround 5.1 is not working.

Revision history for this message
Eric Shattow (eshattow) wrote :

For comparison I have observed the Windows XP and SigmaTel Audio Control Panel for driver "SigmaTel 2/19/2007 5.10.0.5401":

Front Panel
A. Headphones, B. Headphones, C. Mic

A. "Device Connected: Front Speakers", "Device Connected: Headphones"
B. "Device Connected: Center / LFE Speaker", "Device Connected: Headphones"
C. "Device Connected: Line In", "Device Connected: Mic", "Device Connected: Rear Speakers"

A is left-position jack, B is middle-position jack, and C is right-position jack.

With Takashi's patch v3 the assignments do not line up with the above functions. It would be nice if Surround 5.1 is possible on Ubuntu however I can test that here or file a new bug, which would you like?

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Takashi HP-Fixup-v3.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Raymond (superquad-vortex2) wrote :

Since only pincap of node 0x0a support OUT and HP

is there any need to has a control ’headphone as line out’ to change pinctl from OUT HP to OUT ?

do popup window ask you to determine the type when you plugged in the headphone , Mic in windows ?

the node support impsense,can it determine the plugged in type be measure the impedance since Mic Jack has higher impedance than the headphone or speaker

Node 0x0a [Pin Complex] wcaps 0x400181: Stereo
   Control: name="Front Headphone Surround Jack", index=0, device=0
   Pincap 0x0000173f: IN OUT HP Detect Trigger ImpSense
     Vref caps: HIZ 50 GRD 80
   Pin Default 0x0221101f: [Jack] HP Out at Ext Front

 Node 0x0f [Pin Complex] wcaps 0x400181: Stereo
   Control: name="Front Headphone Front Phantom Jack", index=0, device=0
   Pincap 0x00001737: IN OUT Detect Trigger ImpSense
Vref caps: HIZ 50 GRD 80
   Pin Default 0x02011020: [Jack] Line Out at Ext Front

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://mailman.alsa-project.org/pipermail/alsa-devel/2011-November/045690.html

you can try the modified version of hda-jack-sense-test.py which add set_pin_sense and 200ms delay before get_pin_sense

Revision history for this message
Raymond (superquad-vortex2) wrote :

> Takashi Iwai had me test this patch, and it fixes Stereo 2.0 output / input enough that it works for me. Surround 5.1 is not working.

it is because the driver put two headphone pins at spec->hp and multi_out at same time

Each [audio output] has volume control, after the driver assign [audio output] to speaker and two headphone nodes, there is no [audio output] left for the "Front", "Surround", "Center" and "LFE" playback volume

either

speaker, headphone, headphone

or

speaker, front, surround, center and lfe (no headphone playback volume as two headphone had been retasked as line out jacks

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel Letzeisen (dtl131) wrote :
Changed in alsa-driver (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Farshad Nia (mfarshada) wrote :

I have a similar issue with Dell Inspiron 1090 (Duo). I am not sure if this is exactly the same bug, but the built-in speaker just stops working after a while (usually a few seconds after system startup or wakeup) and remains silent until the next reboot or suspend/wakeup. The headphone jack remains functioning though. When I plug the headphones in and out, the sound volume and speaker mute settings change accordingly in alsamixer, which I presume shows that the two states are correctly detected by alsa, however, nothing is heard from the built-in speaker when the headphone is unplugged. Sound test in Ubuntu sound settings aslo confirms this.

The issue started after an upgrade in ubuntu 12.10 and now I have upgraded to ubuntu 13.10 but the problem is still there.

Will this get fixed for Inpiron Duo as well? Should I start a new bug report thread?

Revision history for this message
Eric Shattow (eshattow) wrote :

Confirm this bug resolved fixed, I have tested kernel 3.11 and confirm basic functionality is correct, and remains correct in mainline kernel (3.12-rc5). I did not test surround sound mode(s) and will file a new bug if needed.

Re: M.F. Abdollahnia the Dell Inspiron 1090 (Duo) specs state a different chipset than this (now resolved) bug report; please file a new bug report.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.