No sound on speakers with HDA Intel, SigmaTel STAC9228, kernel 3.10

Bug #1197290 reported by TJ
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Ubuntu 13.04 Raring with linux 3.10.0-031000-generic from kernel-ppa.

Card: HDA Intel
Chip: SigmaTel STAC9228

After booting the 3.10 kernel there was no sound on speakers although sound on headphones was fine.

Using the sound control GUI in Unity I was unable to find any combination of options to enable sound to the speakers. Mute and volume controls for the Speaker output device were set correctly.

I tried using "alasamixer" in a terminal and with "View: [All]" noticed a mixer control "<Auto-Mute>" which was set to "Enabled". I altered that to "Disabled" and speaker sound was enabled correctly.

Tags: saucy
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1197290

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: saucy
Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
TJ (tj) wrote :
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
TJ (tj) wrote :

Here's the equivalent alsa-info log after booting with the default 13.04 kernel 3.8.0-26-generic.

I notice that alsamixer does *not* show an "Automute" control at all and that sound works via speakers with no user intervention.

Revision history for this message
TJ (tj) wrote :

$ awk '$0~/Linux version/{print $0} $0~/snd_hda_intel/{PRINT=1} PRINT==1 && $0~/] (autoconfig|alsa|snd_hda|.*HDA| )/{print $0}' /var/log/dmesg
[ 0.000000] Linux version 3.8.0-26-generic (buildd@panlong) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 (Ubuntu 3.8.0-26.38-generic 3.8.13.2)
[ 13.061241] snd_hda_intel 0000:00:1b.0: irq 49 for MSI/MSI-X

$ awk '$0~/Linux version/{print $0} $0~/snd_hda_intel/{PRINT=1} PRINT==1 && $0~/] (autoconfig|alsa|snd_hda|.*HDA| )/{print $0}' /var/log/dmesg.0
[ 0.000000] Linux version 3.10.0-031000-generic (apw@gomeisa) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #201306301935 SMP Sun Jun 30 23:36:16 UTC 2013
[ 15.181651] snd_hda_intel 0000:00:1b.0: irq 49 for MSI/MSI-X
[ 15.219693] autoconfig: line_outs=1 (0xd/0x0/0x0/0x0/0x0) type:speaker
[ 15.219697] speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 15.219699] hp_outs=2 (0xf/0xa/0x0/0x0/0x0)
[ 15.219700] mono: mono_out=0x0
[ 15.219701] dig-out=0x21/0x0
[ 15.219702] inputs:
[ 15.219704] Mic=0xe
[ 15.219705] Internal Mic=0x13
[ 15.219707] Internal Mic=0xc
[ 15.640536] input: HDA Intel Front Headphone Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9

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

do your laptop have two headphone jacks ?

it is strange that unsolicited event was enabled on one headphone jack only

since pulseaudio only check "Front Headphone jack" kcontrol for jack detection and unsolicited event was not enabled at node 0x0f

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 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 0x02011030: [Jack] Line Out at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x05

affects: linux (Ubuntu) → alsa-driver (Ubuntu)
Revision history for this message
Raymond (superquad-vortex2) wrote :

use hda-jack-sense-test to find out which nodes corresponding to which headphone jacks

Revision history for this message
TJ (tj) wrote : Re: [Bug 1197290] Re: No sound on speakers with HDA Intel, SigmaTel STAC9228, kernel 3.10

On 04/07/13 15:34, Raymond wrote:
> use hda-jack-sense-test to find out which nodes corresponding to which headphone jacks
>

The laptop - Dell XPS m1530 - has two front headphone sockets and external microphone socket and internal stereo speakers and microphone.

Unfortunately David Henningsson's PPA doesn't publish the snd-hda-tools package for any series after Oneiric so a simple

$ apt-add-repository ppa:diwic/ppa
$ apt-get update

W: Failed to fetch http://ppa.launchpad.net/diwic/ppa/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/diwic/ppa/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found

... fails on Raring and Saucy.

I installed it via:

$ wget http://ppa.launchpad.net/diwic/ppa/ubuntu/pool/main/s/snd-hda-tools/snd-hda-tools_0.20110516~oneiric1_amd64.deb
$ sudo dpkg -i snd-hda-tools_0.20110516~oneiric1_amd64.deb

but it fails with:

$ /usr/bin/hda-jack-sense-test
Traceback (most recent call last):
  File "/usr/bin/hda-jack-sense-test", line 44, in <module>
    codec = HDACodec(cardindex, codecindex)
  File "/usr/share/snd-hda-tools/hda_codec.py", line 908, in __init__
    self.fd = os.open("/dev/snd/hwC%sD%s" % (card, device), os.O_RDWR)
OSError: [Errno 2] No such file or directory: '/dev/snd/hwC0D0'

$ ls -al /dev/snd/
total 0
drwxr-xr-x 3 root root 200 Jul 3 17:33 .
drwxr-xr-x 19 root root 5360 Jul 5 09:38 ..
drwxr-xr-x 2 root root 60 Jul 3 17:33 by-path
crw-rw---T+ 1 root audio 116, 6 Jul 3 17:33 controlC0
crw-rw---T+ 1 root audio 116, 5 Jul 3 17:33 hwC0D2
crw-rw---T+ 1 root audio 116, 4 Jul 3 17:34 pcmC0D0c
crw-rw---T+ 1 root audio 116, 3 Jul 5 10:24 pcmC0D0p
crw-rw---T+ 1 root audio 116, 2 Jul 3 17:34 pcmC0D1p
crw-rw---T+ 1 root audio 116, 1 Jul 3 17:33 seq
crw-rw---T+ 1 root audio 116, 33 Jul 3 17:33 timer

Revision history for this message
TJ (tj) wrote :

After applying the following patch the tool produced some output but I'm not sure if it as expected.

$ sudo /usr/bin/hda-jack-sense-test
Unable to find proc file '/proc/asound/card0/codec#0'
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Mic): present = No
Pin 0x0f (Black Line Out): present = No

$ diff -u usr/share/snd-hda-tools/hda_codec.py /usr/share/snd-hda-tools/hda_codec.py
--- usr/share/snd-hda-tools/hda_codec.py 2011-09-06 22:26:27.000000000 +0100
+++ /usr/share/snd-hda-tools/hda_codec.py 2013-07-05 11:05:28.091270160 +0100
@@ -905,7 +905,15 @@
       self.mcard = card
       self.card = card.card
     if not clonefd:
- self.fd = os.open("/dev/snd/hwC%sD%s" % (card, device), os.O_RDWR)
+ dev_path="/dev/snd/hwC%sD%s" % (card, device)
+ if os.path.exists(dev_path):
+ self.fd = os.open(dev_path, os.O_RDWR)
+ else:
+ for dev in range(9):
+ dev_path="/dev/snd/hwC%sD%s" % (card, dev)
+ if os.path.exists(dev_path):
+ self.fd = os.open(dev_path, os.O_RDWR)
+ break
     else:
       self.fd = os.dup(clonefd)
     info = struct.pack('Ii64s80si64s', 0, 0, '', '', 0, '')

Revision history for this message
TJ (tj) wrote :

I checked hda-jack-sense-test and noticed it can take the command-line option -d|--codec so I tried using that:

$ sudo /usr/bin/hda-jack-sense-test -d 2
Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Traceback (most recent call last):
  File "/usr/bin/hda-jack-sense-test", line 44, in <module>
    codec = HDACodec(cardindex, codecindex)
  File "/usr/share/snd-hda-tools/hda_codec.py", line 929, in __init__
    self.parse_proc()
  File "/usr/share/snd-hda-tools/hda_codec.py", line 1011, in parse_proc
    self.proc_codec = HDACodecProc(self.card, self.device, file)
  File "/usr/share/snd-hda-tools/hda_proc.py", line 474, in __init__
    self.parse(proc_file)
  File "/usr/share/snd-hda-tools/hda_proc.py", line 720, in parse
    self.wrongfile(line)
  File "/usr/share/snd-hda-tools/hda_proc.py", line 143, in wrongfile
    raise ValueError, "wrong proc file format (%s)" % msg
ValueError: wrong proc file format ( IEC Coding Type: 0x0)

Revision history for this message
TJ (tj) wrote :

I fixed up the problems with the old version of the hda_analyzer code:

$ cd /dev/shm/
$ sudo wget http://www.alsa-project.org/hda-analyzer.py
$ cd hda-analyzer/
$ sudo cp /usr/bin/hda-jack-sense-test .
$ sudo ./hda-jack-sense-test -d 2

Sigmatel specific "Analog Loopback: 0x00" verb ignored for the moment
Pin 0x0a (Black HP Out): present = No
Pin 0x0e (Black Mic): present = No
Pin 0x0f (Black Line Out): present = No

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

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in alsa-driver (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for alsa-driver (Ubuntu) because there has been no activity for 60 days.]

Changed in alsa-driver (Ubuntu):
status: Incomplete → Expired
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.