Bug 66521 - Differing playback devices on ASUS M3N78-VM motherboard
Summary: Differing playback devices on ASUS M3N78-VM motherboard
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-04 18:30 UTC by Ray DeCampo
Modified: 2014-05-07 23:17 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.11.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa-info.sh script output for kernel 3.8.0-32 (41.24 KB, text/plain)
2013-12-05 20:22 UTC, Ray DeCampo
Details
alsa-info.sh script output for kernel 3.11.0-13 (39.63 KB, text/plain)
2013-12-05 20:23 UTC, Ray DeCampo
Details

Description Ray DeCampo 2013-12-04 18:30:47 UTC
I had a system built on an ASUS M3N78-VM motherboard which was using the built-in HDMI for sound output using Ubuntu 13.04.  Upon upgrade to 13.10 the sound no longer works, apparently due to changes in the way the playback devices are detected.  After pursuing a bug report with Ubuntu (see https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1256646), I was encouraged to file a report here.

When I boot the system using kernel 3.8.0-32 I get the following output from "aplay -l":

card 0: NVidia [HDA NVidia], device 0: VT1708B 8-Ch Analog [VT1708B 8-Ch Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: VT1708B 8-Ch Digital [VT1708B 8-Ch Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 2: VT1708B 8-Ch HP [VT1708B 8-Ch HP]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

whereas using kernel 3.11.0-13 I get the following output:

card 0: NVidia [HDA NVidia], device 0: VT1708B 8-Ch Analog [VT1708B 8-Ch Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: VT1708B 8-Ch Digital [VT1708B 8-Ch Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I culled the output from the output of the alsa-info.sh script (http://www.alsa-project.org/alsa-info.sh); if necessary or desired I can supply the entire output.
Comment 1 Takashi Iwai 2013-12-05 06:57:16 UTC
The device number change was unavoidable because we have now a proper support of HDMI on the VIA codec chip, too.  If this is actually a dead port, it's a problem of BIOS that it leaves the pin active.  You can disable the pin by a firmware "patch".

But, in general, PulseAudio and others should be able to pick up the secondary digital device (hdmi:0,1), which is the Nvidia HDMI.

In anyway, please give alsa-info.sh output here.  Run it with --no-upload option, and attach the outut (don't paste).
Comment 2 Ray DeCampo 2013-12-05 20:22:38 UTC
Created attachment 117691 [details]
alsa-info.sh script output for kernel 3.8.0-32
Comment 3 Ray DeCampo 2013-12-05 20:23:17 UTC
Created attachment 117701 [details]
alsa-info.sh script output for kernel 3.11.0-13
Comment 4 Raymond 2013-12-06 02:38:12 UTC
Do the red light in the optical spdif turn on/off when  you toggle "IEC958 Playback Switch" ?

Node 0x12 [Audio Output] wcaps 0x611: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Control: name="IEC958 Default PCM Playback Switch", index=0, device=0
  Device: name="VT1708B 8-Ch Digital", type="HDMI", device=3
Comment 5 Raymond 2013-12-06 03:03:07 UTC
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=98aa34c0501f78bf7d3de82d96d27f4a2b450477

this patch only mention HDMI support with second S/PDIF ony vt1708s and vt1702

vt1708b only has one S/PDIF
Comment 6 Ray DeCampo 2013-12-06 03:21:11 UTC
My gnome-alsamixer interface has checkboxes for "IEC958", "ICE958 Default PCM" and "ICE958", in that order (yes one is duplicated).  By default the first two were selected.  I tried all eight permutations of the checkboxes and in no case did the red light for the optical SPDIF engage.
Comment 7 Raymond 2013-12-06 06:19:24 UTC
https://launchpadlibrarian.net/158568405/alsa-info.hdajackreset.txt

!!ALSA Version
!!------------

Driver version:     k3.11.0-14-generic
Library version:    1.0.25
Utilities version:  1.0.27.1


have you ask ubuntu-audio-dev how to fix alsa-lib since it should be 1.0.27 for ubuntu 13.10 ?


the driver get back digital spdif device 

Node 0x12 [Audio Output] wcaps 0x611: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Control: name="IEC958 Default PCM Playback Switch", index=0, device=0
  Device: name="VT1708B 8-Ch Digital", type="SPDIF", device=1

but those iec958 controls are index=1 

Node 0x04 [Audio Output] wcaps 0x211: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=1, device=0
  Control: name="IEC958 Playback Pro Mask", index=1, device=0
  Control: name="IEC958 Playback Default", index=1, device=0
  Control: name="IEC958 Playback Switch", index=1, device=0
  Device: name="HDMI 0", type="HDMI", device=3
Comment 8 Raymond 2013-12-06 06:29:26 UTC
did you test the optical spdif only Ubuntu 13.04 Live CD (hdmi working) or Ubuntu 13.10 (hdmi not working) ?

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_via.c?id=4abdbd1c2c1832e7270e546307ffb3e56b286db2

Loss of Indepdent headphone
Comment 9 Ray DeCampo 2013-12-06 13:21:30 UTC
I tested the optical SPDIF on Ubuntu 13.10.  Also, just to clarify, the HDMI sound did not work when I used the 13.04 live disk.  It worked when I had 13.04 installed with the extra configuration (e.g. /etc/asound.conf).
Comment 10 Raymond 2013-12-06 14:04:11 UTC
since those IEC958 controls of HDMI are associated with index=1

you need to hack to use CTLINDEX=1 instead of CTLINDEX=0


 HDA-Intel.pcm.hdmi.0 {
         @args [ CARD AES0 AES1 AES2 AES3 ]
         @args.CARD { type string }
         @args.AES0 { type integer }
         @args.AES1 { type integer }
         @args.AES2 { type integer }
         @args.AES3 { type integer }
         @func refer
         name {
                 @func concat
                 strings [
                         "cards.HDA-Intel.pcm.hdmi.common:"
                         "CARD=" $CARD ","
                         "DEVICE=3,"
                         "CTLINDEX=0,"
                         "AES0=" $AES0 ","
                         "AES1=" $AES1 ","
                         "AES2=" $AES2 ","
                         "AES3=" $AES3
                 ]
         }
 }


with latest alsa-driver, the IEC958 controls of SPDIF should be with index=16
but yours are different


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

HDMI devices will be put to dev=0,index=0 as before


http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=f5f45589f81c46d4ca4cbbe089441a0f7ac5e197

 For avoiding this conflict, the recent kernel code (3.9 and
3.8 stable) moves the IEC958 controls of an SPDIF with index=16 once
when the conflict happens.
Comment 11 Ray DeCampo 2013-12-06 14:11:21 UTC
Raymond, where do I use the code/configuration from your last post?  Does it belong in /etc/asound.conf or elsewhere?
Comment 12 Ray DeCampo 2013-12-08 23:41:32 UTC
Raymond, according to http://packages.ubuntu.com/saucy/sound/ the packages I have are up to date. Not sure why the alsa-lib is different from what you expected.
Comment 14 Raymond 2013-12-13 00:37:21 UTC
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=c9a6338aecdb92f9d015ecc26d203e54250bebbb

seem that you also need pin fixup of node 0x20 from HDMI to SPDIF in addition to the above patch


Node 0x20 [Pin Complex] wcaps 0x400701: Stereo Digital
  Control: name="HDMI Phantom Jack", index=0, device=0
  Pincap 0x00000010: OUT
  Pin Default 0x985601f0: [Fixed] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x12


For the missing alt analog device, enable independent headphone need to change the max channels from 8 to 6
Comment 15 Ray DeCampo 2014-05-07 21:06:23 UTC
After upgrading to Ubuntu 14.4 (kernel 3.13.0-24) I am no longer experiencing the underlying issue.  Let me know if you would like any additional information.
Comment 16 Raymond 2014-05-07 23:17:52 UTC
does your motherboard have the internal spdif out connector ? 

Asus motherboards have an optional back panel S/PDIF bracket


You can connect a back panel S/PDIF bracket to the onboard header

or


You can also connect the onboard header to an S/PDIF input header available on some graphics cards using an S/PDIF cable. This connection routes digital audio to the HDMI output of the graphics card.

http://www.intel.com/support/motherboards/desktop/sb/CS-032871.htm

Note You need to log in before you can comment on or make changes to this bug.