Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Sound problems after Jessie update

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
Geoff 42
Posts: 50
Joined: 2012-05-24 08:13

[Solved] Sound problems after Jessie update

#1 Post by Geoff 42 »

After recent updates to Jessie (around Christmas 2013) I have experienced growing problems with sound.

The first thing which I noticed was that VLC produced severe distortion, which I would describe, perhaps, as sounding like Donald Duck.

The later problem was that I lost sound when I tried to access BBC programs from Iceweasel. I believe that Iceweasel was updated later, to v 17.0.10, so it could be an Iceweasel problem, or that I had caused a problem looking into VLC. Iceweasel can still display video, but with no sound. I believe that it is using Flash.

I was able to hear sound with :-

Code: Select all

aplay /usr/share/sounds/alsa/*.wav
but I now have to specify the card with :-

Code: Select all

aplay -D sysdefault:CARD=PCH /usr/share/sounds/alsa/*.wav
having used "aplay -L" to get the device name.

Although there is documentation on the web about sound, much of it seems to assume a detailed knowledge of the chip internals which is way beyond my understanding. I have spotted some info which does describe things at a level which I more or less understand :-

options to snd-hda-intel (which can be set by appending a line to /etc/modprobe.d/alsa-base.conf, such as :-

Code: Select all

options snd-hda-intel bdl_pos_adj=1,model=6stack-dig
) These are described in :-

https://www.kernel.org/doc/Documentatio ... -Audio.txt
http://www.mjmwired.net/kernel/Document ... Models.txt

Alsa card set-up (from http://forums.debian.net/viewtopic.php?f=6&t=108871) :-

http://wiki.gentoo.org/wiki/ALSA

Looking at the output of dmesg, I saw :-

Code: Select all

hda-intel: IRQ timing workaround is activated for card #2. Suggest a bigger bdl_pos_adj.
Which only seemed to appear after trying VLC. I therefore tried fiddling with option to snd-hda-intel, including setting bdl_pos_adj to 1 and then 32 before trying -1. This had no effect and I tried other options, also to no effect.

I then moved to checking VLC itself and found that switching the audio device from the connected one to the unused USB Audio CODEC (which caused silence) and then back to the PCH default device caused the distortion to disappear :-

Code: Select all

Audio >> Audio Device
However, this manoever only worked for one track and needed to be repeated for each track.

After spotting a forum message (http://ubuntuforums.org/showthread.php?t=1086540) I tried going to the
VLC Tools >> preferences and clicking on the "Show Settings All" button.
Under the Audio >> Output Modules > Alsa
I was able to set the Audio output device to

Code: Select all

HDA Intel PCH, ALC892 Analog 5.1 Surround output
and then had to set the Audio output channels to "Stereo". This then would give me reliable sound.

If I set the Audio output channels to, say, "Surround 5.1" the Donald Duck distortion would return.

I therefore have VLC working, but Iceweasel still remains silent, with Flash 11.2.202.332, although the video is working.

Geoff
Last edited by Geoff 42 on 2014-01-10 14:36, edited 1 time in total.

User avatar
sunrat
Administrator
Administrator
Posts: 6463
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

Re: Sound problems after Jessie update

#2 Post by sunrat »

Post the output from

Code: Select all

aplay -l
That's a small letter "L".

And also

Code: Select all

lsmod |grep snd
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Geoff 42
Posts: 50
Joined: 2012-05-24 08:13

Re: Sound problems after Jessie update

#3 Post by Geoff 42 »

Code: Select all

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
That was interesting. This is what I was expecting, but when I first got to the computer, my partener was logged on, so I loged her out and logged myself in. When I gave this command the order of the USB CODEC and PCH cards were reversed, so I shutdown and rebooted and got the above listing!

Code: Select all

$ lsmod|grep snd
snd_hda_codec_hdmi     35722  1 
snd_hda_codec_realtek    49710  1 
snd_usb_audio         118589  2 
snd_usbmidi_lib        23380  1 snd_usb_audio
snd_seq_midi           12848  0 
snd_seq_midi_event     13316  1 snd_seq_midi
snd_rawmidi            26805  2 snd_usbmidi_lib,snd_seq_midi
snd_hda_intel          39672  5 
snd_hda_codec         146743  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep              13148  2 snd_usb_audio,snd_hda_codec
snd_pcm                84096  4 snd_usb_audio,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc         17114  2 snd_pcm,snd_hda_intel
snd_seq                48834  2 snd_seq_midi_event,snd_seq_midi
snd_seq_device         13132  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              26614  2 snd_pcm,snd_seq
snd                    60869  26 snd_hda_codec_realtek,snd_usb_audio,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_hda_codec,snd_hda_intel,snd_seq_device
soundcore              13026  1 snd
usbcore               154167  8 snd_usb_audio,snd_usbmidi_lib,ehci_hcd,ehci_pci,gspca_main,usbhid,gspca_sq905,xhci_hcd
I have 2 screens connected via HDMI, but they have no speakers. My speakers are connected to PCH analogue outputs.

Geoff

User avatar
sunrat
Administrator
Administrator
Posts: 6463
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

Re: Sound problems after Jessie update

#4 Post by sunrat »

You need to force the system to see your HDA Intel PCH device as card 0. Try adding this to /etc/modprobe.d/alsa-base.conf

Code: Select all

options snd_hda_codec_hdmi index=-2
options snd_usb_audio index=-2
If this doesn't work, there are several other options to try. More info at https://wiki.debian.org/ALSA and http://alsa.opensrc.org/MultipleCards
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Geoff 42
Posts: 50
Joined: 2012-05-24 08:13

Re: Sound problems after Jessie update

#5 Post by Geoff 42 »

Thank you for that. Getting the right card to be card 0 does make sense. I have tried the lines which you suggest, but to no avail. I think that the main problem is that the PCH anad HDMI cards are both using the same snd-hda-intel module.

Code: Select all

# cat /proc/asound/cards
 0 [MID            ]: HDA-Intel - HDA Intel MID
                      HDA Intel MID at 0xf0514000 irq 47
 1 [CODEC          ]: USB-Audio - USB Audio CODEC
                      Burr-Brown from TI USB Audio CODEC at usb-0000:00:14.0-10, full speed
 2 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf0510000 irq 48
# cat /proc/asound/modules 
 0 snd_hda_intel
 1 snd_usb_audio
 2 snd_hda_intel
Also lspci -v output contains the following :-

Code: Select all

00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
	Subsystem: Intel Corporation Device 2010
	Flags: bus master, fast devsel, latency 0, IRQ 47
	Memory at f0514000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 2
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Kernel driver in use: snd_hda_intel

00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
	Subsystem: Gigabyte Technology Co., Ltd Device a002
	Flags: bus master, fast devsel, latency 0, IRQ 48
	Memory at f0510000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 2
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Kernel driver in use: snd_hda_intel
which seems to confirm that they share the same driver. Reading the MultipleCards link seems to suggest the the author was not sure how to handle separate PCI cards with the same driver. I did try :-

Code: Select all

options snd-hda-intel index=1,2 id=PCH,MID
but this was sufficiently wrong to stop the snd-hda-intel module from loading.

Incidentally, the lines :-

Code: Select all

# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
seem to be included by default in alsa-base.conf.

User avatar
sunrat
Administrator
Administrator
Posts: 6463
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

Re: Sound problems after Jessie update

#6 Post by sunrat »

I recently had to do this but the options edit worked for me. I don't have 2 hda-intel devices luckily.
Another option is to specify the default PCM device by name. Create a file /etc/asound.conf and put this in it:

Code: Select all

pcm.!default {
   type plug
   slave.pcm {
     @func getenv
     vars [ ALSAPCM ]
     default "hw:HDA Intel PCH"
   }
 }
This is adapted from the ever-helpful Arch wiki https://wiki.archlinux.org/index.php/Ad ... chitecture

HDMI audio is causing this problem for many people. It would be so nice to be able to just disable it in BIOS like we can for onboard chips.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Geoff 42
Posts: 50
Joined: 2012-05-24 08:13

Re: Sound problems after Jessie update

#7 Post by Geoff 42 »

Thank you again. As you say, "the ever-helpful Arch wiki"
https://wiki.archlinux.org/index.php/Ad ... chitecture
was most helpful, and I spotted the bit :-
If both devices use the same module then we can use the *enable* parameter from snd-hda-intel module, it's an array of booleans that can enable/disable the desired sound card.

e.g

Code: Select all

options snd-hda-intel enable=1,0
This appeared to be a really straight forward way to do it, so my /etc/modprobe.d/alsa-base.conf
now includes the lines :-

Code: Select all

# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2

# Disable the HDMI card which shows up first, but enable PCH
options snd-hda-intel enable=0,1
This did require a reboot, but my HDMI card has now disappeared and the USB is second.

Code: Select all

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code: Select all

$ aplay /usr/share/sounds/alsa/*.wav
still did not produce any sound. In alsamixer it became clear that it was defaulting to pulseaudio, so I simply uninstalled pulseaudio. I had to reboot, but now the simple aplay works. I should add, for the benefit of any innocent bystanders, that the Front_Left.wav like files are probably/possibly mono and may not come out of the suggested speaker.

The next step was to try Iceweasel and the BBC and I am pleased to report that it works.

Thank you very much for all your help.

Geoff

User avatar
sunrat
Administrator
Administrator
Posts: 6463
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

Re: Sound problems after Jessie update

#8 Post by sunrat »

Nice work. :)
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Geoff 42
Posts: 50
Joined: 2012-05-24 08:13

Re: [Solved] Sound problems after Jessie update

#9 Post by Geoff 42 »

I hope you enjoyed the cricket more than we did! :wink:

Thanks again

Geoff

User avatar
sunrat
Administrator
Administrator
Posts: 6463
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

Re: [Solved] Sound problems after Jessie update

#10 Post by sunrat »

Geoff 42 wrote:I hope you enjoyed the cricket more than we did! :wink:
I enjoyed it much more than for the last 6 years! :)
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Geoff 42
Posts: 50
Joined: 2012-05-24 08:13

Re: [Solved] Sound problems after Jessie update

#11 Post by Geoff 42 »

VLC contd
Further to my comments at the top about selecting the audio card in VLC to get it to work properly, I found another problem in that area. It is described at
https://forum.videolan.org/viewtopic.php?f=13&t=116122
Whereby setting the volume control to anything other than 100% (either louder or quieter) can cause serious distortion. This occurs if it has to upscale stereo to, say, 5.1 surround. The workaround to this seems to be to either leave the volume at 100% or set the output device to the default, which I assume is stereo.

Geoff

kvaml
Posts: 1
Joined: 2014-08-17 05:47

Re: [Solved] Sound problems after Jessie update

#12 Post by kvaml »

Thanks very much for the information about enabling/disabling devices within the snd-hda-intel module. That was exactly what I needed to know.

snowsprinkle
Posts: 1
Joined: 2015-10-04 08:00

Re: [Solved] Sound problems after Jessie update

#13 Post by snowsprinkle »

AWESOME!!!!

This was the best solution I found to this problem. It made a lot of sense when I was reading this, I had my machine hooked up to a VGA and the sound was working. After I read this it dawned on me what was happening.

Thanks for the help, who knows how long I would have been looking other wise haha.

Post Reply