Ubuntu

Sound card silent on Dell N5110

Reported by Cefn on 2012-01-10
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Undecided
Unassigned

Bug Description

I have a new N5110 running Oneiric (stock) but my soundcard doesn't output any sound through either headphones or internal speakers, even through aplay, although I'm mainly testing it by playing a continuous playlist of gnome sounds through Banshee while I was exploring alsamixer.

I've tried upgrading the linux-alsa-modules to the version matching my kernel, but makes no difference on a reboot.

I have two sound cards as reported below, but it doesn't seem to make any difference which I select, there's still no sound.

cefn@cefn-oneiric-dell:~$ lspci -v | grep -A7 -i "audio"
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
 Subsystem: Dell Device 04b0
 Flags: bus master, fast devsel, latency 0, IRQ 58
 Memory at f7b00000 (64-bit, non-prefetchable) [size=16K]
 Capabilities: <access denied>
 Kernel driver in use: snd_hda_intel
 Kernel modules: snd-hda-intel

--
01:00.1 Audio device: nVidia Corporation GF108 High Definition Audio Controller (rev a1)
 Flags: bus master, fast devsel, latency 0, IRQ 17
 Memory at f6080000 (32-bit, non-prefetchable) [size=16K]
 Capabilities: <access denied>
 Kernel driver in use: snd_hda_intel
 Kernel modules: snd-hda-intel

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: alsa-base 1.0.24+dfsg-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic-pae 3.0.9
Uname: Linux 3.0.0-14-generic-pae i686
AlsaVersion:
 Advanced Linux Sound Architecture Driver Version 1.0.24.
 Compiled on Jan 10 2012 for kernel 3.0.0-14-generic-pae (SMP).
ApportVersion: 1.23-0ubuntu4
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: cefn 1795 F.... pulseaudio
 /dev/snd/controlC0: cefn 1795 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf7b00000 irq 58'
   Mixer name : 'IDT 92HD87B1/3'
   Components : 'HDA:111d76d1,102804b0,00100205'
   Controls : 16
   Simple ctrls : 9
Card1.Amixer.info:
 Card hw:1 'NVidia'/'HDA NVidia at 0xf6080000 irq 17'
   Mixer name : 'Nvidia GPU 14 HDMI/DP'
   Components : 'HDA:10de0014,10de0101,00100100'
   Controls : 24
   Simple ctrls : 4
Date: Tue Jan 10 13:52:44 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
PulseSinks:
 Error: command ['pacmd', 'list-sinks'] failed with exit code 1: Home directory /home/cefn not ours.
 No PulseAudio daemon running, or not running as session daemon.
PulseSources:
 Error: command ['pacmd', 'list-sources'] failed with exit code 1: Home directory /home/cefn not ours.
 No PulseAudio daemon running, or not running as session daemon.
SourcePackage: alsa-driver
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/26/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A06
dmi.board.name: 0HVRTT
dmi.board.vendor: Dell Inc.
dmi.board.version: A06
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: Not Specified
dmi.modalias: dmi:bvnDellInc.:bvrA06:bd05/26/2011:svnDellInc.:pnInspironN5110:pvrNotSpecified:rvnDellInc.:rn0HVRTT:rvrA06:cvnDellInc.:ct8:cvrNotSpecified:
dmi.product.name: Inspiron N5110
dmi.product.version: Not Specified
dmi.sys.vendor: Dell Inc.

Cefn (6-launchpad-net-cefn-com) wrote :
Cefn (6-launchpad-net-cefn-com) wrote :

I found this terminal log of a force reload surprising. I experienced it after trying to specify a different model option in /etc/modprobe.d/alsa-base.conf but also found the same after reverting to the original file.

If the failure of the midi module causes all the modules to fail to load, that could explain something perhaps?

cefn@cefn-oneiric-dell:~$ sudo alsa force-reload
Terminating processes: 1795 (failed: processes still using sound devices: 30701(pulseaudio)).
Unloading ALSA sound driver modules: snd-seq-midi-event snd-seq snd-rawmidi snd-seq-device snd-hda-codec-hdmi snd-hda-codec-idt snd-hda-intel snd-hda-codec snd-hwdep snd-pcm snd-timer snd-page-alloc (failed: modules still loaded: snd-hda-codec-hdmi snd-hda-codec-idt snd-hda-intel snd-hda-codec snd-hwdep snd-pcm snd-timer snd-page-alloc).
Loading ALSA sound driver modules: snd-seq-midi-event snd-seq snd-rawmidi snd-seq-device snd-hda-codec-hdmi snd-hda-codec-idt snd-hda-intel snd-hda-codec snd-hwdep snd-pcm snd-timer snd-page-allocFATAL: Error inserting snd_seq_midi (/lib/modules/3.0.0-14-generic-pae/kernel/sound/core/seq/snd-seq-midi.ko): Invalid argument
FATAL: Error inserting snd_seq_midi (/lib/modules/3.0.0-14-generic-pae/kernel/sound/core/seq/snd-seq-midi.ko): Invalid argument

Cefn (6-launchpad-net-cefn-com) wrote :

Here's the result of running the alsa-diagnostic script too...

http://www.alsa-project.org/db/?f=039be3036a03f707edc130bbc63b5063619e5755

Daniel Letzeisen (dtl131) wrote :

Are you sure you have the onboard sound selected as the default device? (use pavucontrol package if not sure) I see a lot of errors related to hdmi in your dmesg.

Daniel Letzeisen (dtl131) wrote :

Sorry, I missed the part where you said you already tried selecting the different cards. If sound looks to be playing normally, the other thing I would suggest is trying to delete your user's .pulse files so fresh ones are generated. Log out and back in after you do so.
rm -rf ~/.pulse*

Cefn (6-launchpad-net-cefn-com) wrote :

OK I found a combination of selected soundcards and headphone plugging which makes sound, but there's still no sound from the internal speakers.

If I select the "Internal Audio Analogue Stereo" soundcard in the Sound control panel application, and plug in some headphones, then there is sound.

However, there's still no obvious way to get sound to come out of the speakers. I recollect in previous systems you could get to some kind of audio jack control through Alsamixer or similar in order to fix this kind of issue. I'll see if I can trace a duplicate bug now I can get at least some sound.

Cefn (6-launchpad-net-cefn-com) wrote :

So I can't find any similar bug against this model. Headphone sound is functional, but speaker sound is off.

Is there any known way of exploring the "Jack Sense" facilities within this hardware profile, and whether Alsa respects them when switching speakers on and off?

Cefn (6-launchpad-net-cefn-com) wrote :

I have refreshed the pulse files as suggested, run all the non-apt parts of the Oneiric https://help.ubuntu.com/community/SoundTroubleshootingProcedure (I can't effectively do a redownload and reinstall of ubuntu desktop and gdm from here on a cellular network).

Still no sound from speakers.

Daniel Letzeisen (dtl131) wrote :

The next thing I would try is using different models in /etc/modprobe.d/alsa-base.conf

For example, add this line:
options snd-hda-intel model=dell-s14

and then reload alsa:
sudo /usr/sbin/alsa force-reload

STAC92HD83*
===========
  ref Reference board
  mic-ref Reference board with power management for ports
  dell-s14 Dell laptop
  dell-vostro-3500 Dell Vostro 3500 laptop
  hp HP laptops with (inverted) mute-LED
  hp-dv7-4000 HP dv-7 4000
  auto BIOS setup (default)

Do you know how to definitively judge which card I have? I know some of this information is about the driver loaded (which could be wrong) and other parts are about the actual hardware identity. I just don't know which is which.

I was looking through these model options before but trying them at random since I had no idea which ones to attempt. I've tried all the values of 'model' which you've listed above and no joy yet.

According to your suggestion can I assume I have a STAC92HD83* ?

This is basically what I've been doing in order to refresh and test things, following https://help.ubuntu.com/community/HdaIntelSoundHowto

Change the file using...

gksudo gedit /etc/modprobe.d/alsa-base.conf

Then test the file using...

sudo alsa force-reload; aplay /usr/share/sounds/alsa/Front_Center.wav

Daniel Letzeisen (dtl131) wrote :

It's difficult to know which model to use. For example, some toshiba laptops use the (lenovo) 'ideapad' keyword. You have an IDT STAC92HD87. I'm guessing it's compatible with one of the STAC92HD models, but I don't know which one. The latest list of models is here: http://git.alsa-project.org/?p=alsa-kernel.git;a=blob_plain;f=Documentation/sound/alsa/HD-Audio-Models.txt;hb=HEAD

Daniel Letzeisen (dtl131) wrote :

Okay, I knew I saw this before:

    - ALSA: hda - Adding support for new IDT 92HD87XX codecs
    Added the entries for 92HD87B1/3 and 92HD87B2/4 codecs.
    These are compatible with existing 83xxx codecs.

I think you're referring to this commit...
http://kernel.opensuse.org/cgit/kernel-source/commit/?id=1463902e11e7adf532e0128680159a869f29f824

How do I make sure I'm running the right kernel alsa version, driver and model to benefit from this change?

I don't see anything corresponding with this commit in terms of choices I can make for Alsa, except the oblique reference to the STAC92HD83* entry.

I've tried all the models against STAC92HD83* from HD-Audio-Models (assuming I'm correctly running snd-hda-intel and updating the last line of /etc/modprobe.d/alsa-base.conf to different values according to https://help.ubuntu.com/community/HdaIntelSoundHowto followed by an alsa reload).

I'm running the latest proposed kernel 3.0.0.15 in case that would help.

Is there anything else I can try?

# OK, got bored of doing it manually, so...

if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi
for MODEL in `cat /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz| zcat | tail -n +3 | awk '/^ / { print $1; }'`
do
 perl -i -ple "s/^.*$/options snd-hda-intel model=$MODEL/ if eof" /etc/modprobe.d/alsa-base.conf;
 alsa force-reload;
 aplay /usr/share/sounds/alsa/Front_Center.wav
done

# now I'm waiting to see if any sound comes out of my machine

Daniel Letzeisen (dtl131) wrote :

I'm personally out of ideas short of playing with hda-verb. I don't have too much experience with that, though.

OK, I've tried every single model in the HD-Audio-Models file twice using the script above.

I was checking the changes were being made by simultaneously running...
while true; do sudo tail -n1 /etc/modprobe.d/alsa-base.conf; sleep 1; done

No-one should try running that script against their existing config file without taking a backup and adding an extra line to specify the model (otherwise the line which is removed and replaced will be the last line of the default alsa-base.conf).

None of these model choices causes sound to come out of the speaker after an Alsa reload.

I noticed in HD-Audio.txt a section which mentions the problem and IDT codecs specifically, but I wouldn't know how to test out the EAPD and GPIO interactions described.

I quote >>>>>>>

If you are masochistic enough to debug the driver problem, note the
following:

- The speaker (and the headphone, too) output often requires the
  external amplifier. This can be set usually via EAPD verb or a
  certain GPIO. If the codec pin supports EAPD, you have a better
  chance via SET_EAPD_BTL verb (0x70c). On others, GPIO pin (mostly
  it's either GPIO0 or GPIO1) may turn on/off EAPD.
- Some Realtek codecs require special vendor-specific coefficients to
  turn on the amplifier. See patch_realtek.c.
- IDT codecs may have extra power-enable/disable controls on each
  analog pin. See patch_sigmatel.c.
- Very rare but some devices don't accept the pin-detection verb until
  triggered. Issuing GET_PIN_SENSE verb (0xf09) may result in the
  codec-communication stall. Some examples are found in
  patch_realtek.c.

<<<<<<<<

I noticed this W92HDX80.INI windows driver for M5110 (a typo or perhaps a similar model?) which could possibly have some useful looking information about Jack sense control (search for the word Jack), but don't know if I can translate this into any specific option.

http://driveragent.com/0/archive/103967/12-0-149?q=92hd87+jack

I found this commit note about incorrectly mapped pins for this hardware, but that's bound to be in 3.0.x if it was committed in 2.6 ...
http://148.100.100.18/cgi-bin/gitweb.cgi?p=linux-2.6.git;a=commit;h=4dfb8a45d533808e78d67ef27e0a47d456c12a92

I still don't know quite what to try having tried every pre-existing model listed.

At this stage I think I need to work out how to send lower-level signals when loading snd-hda-intel according to the advice in HD-Audio.txt

# Here's an improved version of the script which tests every possible model in series trying to make a noise.
# It's improved by using sort -u (which eliminates duplicate values, reducing the number of trials from 315 to 222) and
# having a more conservative substitution, (which only removes and replaces the last line if it already specifies a snd-hda-intel model)
# It doesn't help me, (as none of the models work), but it might be handy for someone else

if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi
for MODEL in `cat /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz| zcat | tail -n +3 | awk '/^ / { print $1; }' | sort -u `
do
 perl -i -ple "s/^options snd-hda-intel model=.*$/options snd-hda-intel model=$MODEL/ if eof" /etc/modprobe.d/alsa-base.conf;
 alsa force-reload;
 aplay /usr/share/sounds/alsa/Front_Center.wav
done

I'm looking into hda-verb and HDA Analyzer. The second looks really useful and has already revealed some flags and switches like the following...

Node 0x13 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out R/L
  Device: name="STAC92xx Analog", type="Audio", device=0
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=1, idx=0, ofs=63
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=1, idx=0, ofs=0
  Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x02, mute=1
  Amp-Out vals: [0x7f 0x7f]
  Converter: stream=5, channel=0
  Power: setting=D0, actual=D0
  Delay: 13 samples

...but I'm not sure I'm actually changing any values within the card when I click on checkboxes in this GUI. I'd like to be able to toggle some of these. Any ideas how?

Should this discussion move to an Alsa list? Which one?

One extra bit of good news, I was able to tell that the headphone switch is at least not broken, as I noticed in alsamixer that I can cause the Speaker volume to toggle from 100% to MM (mute) by pushing in and out the headphone.

I'm guessing there's some other missing flag somewhere, though, in order to fire up the amplifier and properly power the speakers.

Attached, the script file which tests all available (listed) models against snd-hda-intel , reloading and playing a sound each time to see if they work. N.B. None of the model values works for Dell N5110, but I'm looking into this on the alsa-devel list.

To try all possible models in an automated way, first of all manually edit your /etc/modprobe.d/alsa-base.conf using...

gksudo gedit /etc/modprobe.d/alsa-base.conf

...and make sure the last line is a snd-hda-intel model line. Here's an extract showing the last four lines from my copy of alsa-base.conf with the last two lines having been added by myself...

# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
# CH added following https://help.ubuntu.com/community/HdaIntelSoundHowto
options snd-hda-intel model=test

Download the attached testcards.sh script, change it to executable and then run from within a terminal, when it will automatically try every possible value of the 'model' attribute by changing this last line, reloading alsa and playing a sample. If you hear a sound, you know that the model value currently showing in the terminal output is useful

chmod u+x testcards.sh
gksudo ./testcards.sh

In my case none of the models solved my silent speaker on N5110 (Q15R) problem so I've started a dialogue with alsa-devel to try and go deeper into the HDA controls which can be introspected from my hardware to see what else can be toggled, but for many I gather, changing the model and reloading alsa is a useful gambit.

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

Other bug subscribers