In the case where we have both line out and more than stereo speakers, the speaker DACs will end up in extra_out_nid. In fact, AFAIU, speakers are the only ones that can end up in extra_out_nid, and if we have several of those, they should be surround outputs rather than copy front.
BugLink: https://bugs.launchpad.net/bugs/1236965 Signed-off-by: David Henningsson <[email protected]> --- sound/pci/hda/hda_codec.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) Notes: * Thanks to Raymond Yau for the pointer * Not tested (yet), except in hda-emu * Not sure if this should be sent to stable or not, given that it is a change of behaviour * Alsainfo available here: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1236965/+attachment/3867946/+files/alsaInfoWhenAudioPlaybackFailing.txt diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 5b6c4e3..68801ba 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -5395,11 +5395,6 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, snd_hda_codec_setup_stream(codec, mout->hp_out_nid[i], stream_tag, 0, format); - for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++) - if (!mout->no_share_stream && mout->extra_out_nid[i]) - snd_hda_codec_setup_stream(codec, - mout->extra_out_nid[i], - stream_tag, 0, format); /* surrounds */ for (i = 1; i < mout->num_dacs; i++) { @@ -5410,6 +5405,20 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, snd_hda_codec_setup_stream(codec, nids[i], stream_tag, 0, format); } + + /* extra surrounds */ + for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++) { + int ch = 0; + if (!mout->extra_out_nid[i]) + break; + if (chs >= (i + 1) * 2) + ch = i * 2; + else if (!mout->no_share_stream) + break; + snd_hda_codec_setup_stream(codec, mout->extra_out_nid[i], + stream_tag, ch, format); + } + return 0; } EXPORT_SYMBOL_HDA(snd_hda_multi_out_analog_prepare); -- 1.7.9.5 -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to alsa-driver in Ubuntu. https://bugs.launchpad.net/bugs/1236965 Title: pulseaudio does not recognize internal speakers [P180HMx, Realtek ALC892, Speaker, Internal] volume slider problem Status in “alsa-driver” package in Ubuntu: New Bug description: steps to reproduce: 1. acquire a device with the problem, such as Clevo P180HM laptop motherboard 2. install ubuntu 12.04 (now updated to 12.04.3 currently) 3. systray > speaker-icon > sound-settings > output tab 4. no entry for "speakers built-in audio" appears workaround: running the shell script mentioned in this comment helps -- https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/946232/comments/158 however, the workaround is not completely satisfactory, because adjusting the (singular) volume-slider provided by pulseaudio only causes some of the (multiple) volume-sliders known to alsamixer to react. Specifically, turning the pulseaudio volume upwards only changes the 'master' and belatedly the 'pcm' volumes inside alsamixer. This ignores 'speaker clfe' + 'speaker front' + 'speaker surround playback volume' plus maybe others. Effectively, this means audio playback is weak: instead of spreading typical 2ch audiofiles across all internal speakers, only some are used, and only at whatever volume alsamixer specifies. (Turning the ignored volumes up in alsamixer causes a different problem: then it is no longer possible to lower the sound to a relatively-quiet volume.) Here is some information from one of the ubuntu pulseaudio/alsa devs: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/946232/comments/159 David Henningsson ([email protected]) wrote: ...you have unusual hardware: in addition to normal headphones and stereo line out, you have 5.1 internal speakers. This leads to unusual alsamixer names (e g "Speaker Front") which we do not match for in PulseAudio. Fixing that means that we should add those names in PulseAudio - but let's discuss that in a new bug instead. Let me know if you would like more specifics. I have run codecgraph, alsa-info, etc. $ cat /proc/asound/card*/codec#* | grep --before-context=4 --after-context=1 "Subsystem Id" Codec: Realtek ALC892 Address: 0 AFG Function Id: 0x1 (unsol 1) Vendor Id: 0x10ec0892 Subsystem Id: 0x15588000 Revision Id: 0x100302 -- Codec: ATI R6xx HDMI Address: 0 AFG Function Id: 0x1 (unsol 0) Vendor Id: 0x1002aa01 Subsystem Id: 0x00aa0100 Revision Id: 0x100200 $ lspci -vvnn | grep --after-context=1 "Audio device" 00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 05) Subsystem: CLEVO/KAPOK Computer Device [1558:8000] -- 01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Barts HDMI Audio [Radeon HD 6800 Series] [1002:aa88] Subsystem: CLEVO/KAPOK Computer Device [1558:8000] ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: alsa-base 1.0.25+dfsg-0ubuntu1.1 ProcVersionSignature: Ubuntu 3.5.0-41.64~precise1-generic 3.5.7.21 Uname: Linux 3.5.0-41-generic x86_64 AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.25. ApportVersion: 2.0.1-0ubuntu17.4 Architecture: amd64 ArecordDevices: **** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC1: j 6328 F.... pulseaudio /dev/snd/controlC0: j 6328 F.... pulseaudio Card0.Amixer.info: Card hw:0 'PCH'/'HDA Intel PCH at 0xf7f00000 irq 52' Mixer name : 'Realtek ALC892' Components : 'HDA:10ec0892,15588000,00100302' Controls : 36 Simple ctrls : 16 Card1.Amixer.info: Card hw:1 'Generic'/'HD-Audio Generic at 0xf7e40000 irq 54' Mixer name : 'ATI R6xx HDMI' Components : 'HDA:1002aa01,00aa0100,00100200' Controls : 6 Simple ctrls : 1 Card1.Amixer.values: Simple mixer control 'IEC958',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Date: Tue Oct 8 12:02:44 2013 InstallationMedia: This MarkForUpload: True PackageArchitecture: all ProcEnviron: TERM=xterm PATH=(custom, no user) LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: alsa-driver Symptom: audio Symptom_Card: Built-in Audio - HDA Intel PCH Symptom_Jack: Speaker, Internal Symptom_Type: Volume slider, or mixer problems Title: [P180HMx, Realtek ALC892, Speaker, Internal] volume slider problem UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 09/29/2011 dmi.bios.vendor: American Megatrends Inc. dmi.bios.version: 4.6.4 dmi.board.asset.tag: Not Applicable dmi.board.name: P180HMx dmi.board.vendor: CLEVO dmi.board.version: Not Applicable dmi.chassis.asset.tag: Not Applicable dmi.chassis.type: 10 dmi.chassis.vendor: CLEVO dmi.chassis.version: Not Applicable dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4.6.4:bd09/29/2011:svnCLEVO:pnP180HMx:pvrNotApplicable:rvnCLEVO:rnP180HMx:rvrNotApplicable:cvnCLEVO:ct10:cvrNotApplicable: dmi.product.name: P180HMx dmi.product.version: Not Applicable dmi.sys.vendor: CLEVO To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1236965/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

