Asus Xonar U7 S/PDIF output not recognized by pulseaudio

Bug #1498129 reported by aoandr
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
New
Undecided
Unassigned

Bug Description

The external USB audio card Asus Xonar U7 is capable of both analog and digital output.
ALSA name for the digital (S/PDIF) output is hw:1,1, and it is listed in aplay -l output, and aplay can output to it:
aplay -D plughw:1,1 sample.wav. So, direct alsa sound works fine.

However, pulseadio does not recognize the digital output of Xonar U7, it offers only analog output.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: pulseaudio 1:4.0-0ubuntu11.1
ProcVersionSignature: Ubuntu 3.13.0-63.103-lowlatency 3.13.11-ckt25
Uname: Linux 3.13.0-63-lowlatency i686
ApportVersion: 2.14.1-0ubuntu3.13
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: aoand 3756 F.... pulseaudio
 /dev/snd/controlC0: aoand 3756 F.... pulseaudio
CurrentDesktop: Unity
Date: Mon Sep 21 21:29:54 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2011-02-20 (1674 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007.1)
SourcePackage: pulseaudio
UpgradeStatus: Upgraded to trusty on 2014-05-19 (490 days ago)
dmi.bios.date: 11/29/2012
dmi.bios.vendor: LENOVO
dmi.bios.version: 7WET71WW (3.21 )
dmi.board.name: 7448CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7WET71WW(3.21):bd11/29/2012:svnLENOVO:pn7448CTO:pvrThinkPadX200Tablet:rvnLENOVO:rn7448CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 7448CTO
dmi.product.version: ThinkPad X200 Tablet
dmi.sys.vendor: LENOVO

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

26895.383089] usb 1-1: new high-speed USB device number 4 using ehci-pci
[26895.518885] usb 1-1: New USB device found, idVendor=1043, idProduct=857c
[26895.518896] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[26895.518904] usb 1-1: Product: Xonar U7
[26895.518910] usb 1-1: Manufacturer: ASUS
[26895.598757] input: ASUS Xonar U7 as /devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1:1.4/input/input14
[26895.599178] hid-generic 0003:1043:857C.0002: input,hidraw0: USB HID v1.00 Device [ASUS Xonar U7] on usb-0000:00:1a.7-1/input4
[26895.691478] cannot get ctl value: req = 0x81, wValue = 0x0, wIndex = 0x1400, type = 3
[26895.714944] cannot get ctl value: req = 0x81, wValue = 0x0, wIndex = 0x1400, type = 3
[29024.469622] usb 1-1: USB disconnect, device number 4

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
affects: pulseaudio (Ubuntu) → alsa-driver (Ubuntu)
Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

As far as I can tell, ALSA is working just fine. The problem is only with Pulseaudio.

After restarting Pulseaudio with Xonar U7 attached I've got the "Xoanar U7 Digital (S/PDIF)" choice in the Audio configuration, but this choice actually selects Analog Output (no signal on digital S/PDIF output, and the sound is going through analog connectors).

The disconnect message in the quoted above dmesg is related to my experiments with attaching and detaching the USB card. It is normal behaviour.

The apparent problems with unsupported "ctl value" does not affect the functionality of the card in ALSA.
(FYI: I've added "ignore_ctl_error=1" to snd-usb-audio options in modprobe.d/alsa-base.conf to make alsamixer work)

Please, let me know what else I can do to help sort this out.

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

Thank you, Raymond. I will try this patch and see whether the error message "cannot get ctl value" goes away.

However, as much as I can tell, my problem is not related to this error message. ALsamixer works just fine (with "ignore_ctl_error=1", see above), but pulseaudio does not recognize the S/PDIF sink of the card.

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

I've applied the patch, and got rid of errors in dmesg, and alsamixer does not crash even without ignore_ctl_error=1 option.

Still, no luck with Pulseaudio and S/PDIF.
See Bug #1498676 for the full set of files collected by ubuntu-bug.

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

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/USB-Audio.conf;hb=HEAD

for usb audio device 0 is default device for iec958

lsusb -vvvv

pulseaudio does not support multi channel volume control

Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
  Limits: Playback 0 - 127
  Mono:
  Front Left: Playback 107 [84%] [-20.00dB] [on]
  Front Right: Playback 107 [84%] [-20.00dB] [on]
  Rear Left: Playback 107 [84%] [-20.00dB] [on]
  Rear Right: Playback 107 [84%] [-20.00dB] [on]
  Front Center: Playback 107 [84%] [-20.00dB] [on]
  Woofer: Playback 107 [84%] [-20.00dB] [on]
  Side Left: Playback 107 [84%] [-20.00dB] [on]
  Side Right: Playback 107 [84%] [-20.00dB] [on]

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

I can not grok ALSA configuration files, sorry.
Please, help me put up a proper definition (overrides) for Xonar U7.
lsusb -vvvv output attached. Anything else?
Thanks in advance!

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
Revision history for this message
g0ukb (g0ukb) wrote :

What needs to be done to unexpire this? I have exactly the same problem. Like the OP I have confirmed that aplay plays fine to the iec958 device but pulseaudio seems to alias it's iec958 oputput to analog. I also have a colleague with the same card so this bug affects at least 3 of us. My card is the Xonar U7 Echelon Edition which I believe is exactly the same card as the OP, just different packaging and curiously a different alsa-name: Xonar U7 Echelon Ed.

I don't really understand alsa/pulseaudio config etc but happy to product/hack config files etc. to test any ideas.

Since aplay to hw:3,1 worked for me I wondered if Raymond's comment about iec958 needing to be first device was the problem and simply tried editing my USB-Audio.conf to be :

# If a device does not use the first PCM device for digital data, the device
# number for the iec958 device can be changed here.
USB-Audio.pcm.iec958_device {
 # "NoiseBlaster 3000" 42
        "Xonar U7 Echelon Ed." 1

This made no difference (but then I did say I don't understand alsa/pulseaudio so was probably stupid)

Revision history for this message
g0ukb (g0ukb) wrote :

I have now proven that everything works if I manually set the iec958 sink via:

pactl load-module module-alsa-sink device=plughw:3,1

and as a workaround have added the load-module to my local default.pa file

I don't have the skill to figure out why pulseaudio isn't picking this up correctly

Revision history for this message
g0ukb (g0ukb) wrote :

I will change the status from 'expired' to 'new' to see if anyone has any thoughts on this

Revision history for this message
g0ukb (g0ukb) wrote :
Revision history for this message
g0ukb (g0ukb) wrote :
Changed in alsa-driver (Ubuntu):
status: Expired → New
Revision history for this message
Raymond (superquad-vortex2) wrote :

  # If a device does not use the first PCM device for digital data, the device
  # number for the iec958 device can be changed here.
  USB-Audio.pcm.iec958_device {
         # "NoiseBlaster 3000" 42
         "USB Sound Blaster HD" 1

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

you have to find out name is U7 or Xonar U7

!!-------Mixer controls for card 1 [U7]

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

Raymond thank you for your help.

 I am still having problems.

If I run aplay -l or use alsamixer my card is reported as "Xonar U7 Echelon Ed."

here's the relevant part from aplay -l
card 3: Ed [Xonar U7 Echelon Ed.], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Ed [Xonar U7 Echelon Ed.], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Ed [Xonar U7 Echelon Ed.], device 2: USB Audio [USB Audio #2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

So I add

# number for the iec958 device can be changed here.
  USB-Audio.pcm.iec958_device {
         # "NoiseBlaster 3000" 42
         "USB Sound Blaster HD" 1
         "Xonar U7 Echelon Ed." 1

to USB-Audio.conf and restart audio with "pulseausio -k && sudo alsa force-reload" and nothing changes

As before, pavucontrol shows "Digital Stereo (IEC958 Output)" as one of the configuration options for card "Xonar U7 Echelon Ed." but when I select that option the card plays analog not digital.

So - either I need to do something else or I have the card name wrong. How can I prove I have the correct card name?

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

aplay -L

iec958:CARD=xxx should be tranlated to hw:3,1

Revision history for this message
g0ukb (g0ukb) wrote :

I had to leave this for a while but I still cannot get this to work!!!

I follow these instructions http://forum.kodi.tv/showthread.php?tid=253179

and from aplay -l I see:

card 2: Ed [Xonar U7 Echelon Ed.], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Ed [Xonar U7 Echelon Ed.], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Ed [Xonar U7 Echelon Ed.], device 2: USB Audio [USB Audio #2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

So unmute it with
amixer -c2 sset 'IEC958 In' on

and check it works with
speaker-test -Dhw:2,1 -c2
which works fine

trying mplayer
mplayer -afm hwac3 -ao alsa:device=hw=2.1 test.mp3
and yes - excellent sound out of the SPDIF

Sothe only thing that does not work is my change to USB-Audio.conf

I edit USB-Audio.conf and add the line "Xonar U7 Echelon Ed." 1 as below

USB-Audio.pcm.iec958_device {
 # "NoiseBlaster 3000" 42
        "Xonar U7 Echelon Ed." 1

 # The below don't have digital in/out, so prevent them from being opened.
 "Blue Snowball" 999
 "HP Digital Stereo Headset" 999
 "Logitech Speaker Lapdesk N700" 999
 "Logitech USB Headset" 999
 "Logitech Wireless Headset" 999
 "Plantronics GameCom 780" 999
 "Plantronics USB Headset" 999
 "Plantronics Wireless Audio" 999
 "SB WoW Headset" 999
 "Scarlett 2i2 USB" 999
 "Sennheiser USB headset" 999
 "USB Device 0x46d:0x992" 999
}

restart alsa and it DOES NOT WORK

I try speaker-test -Diec958:CARD=Ed,DEV=0 -c2

and get the following output
speaker-test 1.0.27.2

Playback device is iec958:CARD=Ed,DEV=0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 262144
Period size range from 16 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 65536
was set buffer_size = 262144
 0 - Front Left
...

but NO sound

I check
speaker-test -Dhw:2,1 -c2
I get the same output WITH sound

So the problem appears to be the edit of USB-Audio.conf is not setting iec958 to device 1.

Any further thoughts would be appreciated.

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

You need alsa-lib translate iec958:x to hw:x,1 for your usb audio since by default it is translated to hw:x,0

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

You need to fix usb-audio.conf

speaker-test -c2 -t wav -D iec958:CARD=ed

works as

speaker-test -c2 -t wav -D hw:CARD=ed,1

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

+[Mapping iec958-stereo]
+device-strings = hw:%f,1
+channel-map = left,right
+paths-output = iec958-stereo-output
+priority = 5
+direction = output

Revision history for this message
g0ukb (g0ukb) wrote : Re: [Bug 1498129] Re: Asus Xonar U7 S/PDIF output not recognized by pulseaudio

Raymond - thanks - not sure how to define a pulseaudio.conf file, how to
name it, where it is referenced. Will have to go do some research.

Do you have any idea why the fix to USB-Audio.conf is not working? The card
name from aplay-l is definitely "Xonar U7 Echelon Ed." yet simply adding
"Xonar U7 Echelon Ed." 1 to the USB-Audio.pcm.iec958_device section of
USB-Audio.conf does not work. Is there a problem because the card name ends
in a '.'?

As you say the problem is now very well defined - I just need alsa to
translate iec958:x to hw:x,1 but I CANNOT make alsa do this.

I will go and investigate pulseaudio but it would be good to work out an
alsa fix.

Thanks for your help
Brian

On 25 February 2016 at 14:36, Raymond <email address hidden> wrote:

> +[Mapping iec958-stereo]
> +device-strings = hw:%f,1
> +channel-map = left,right
> +paths-output = iec958-stereo-output
> +priority = 5
> +direction = output
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1498129
>
> Title:
> Asus Xonar U7 S/PDIF output not recognized by pulseaudio
>
> Status in alsa-driver package in Ubuntu:
> New
>
> Bug description:
> The external USB audio card Asus Xonar U7 is capable of both analog and
> digital output.
> ALSA name for the digital (S/PDIF) output is hw:1,1, and it is listed in
> aplay -l output, and aplay can output to it:
> aplay -D plughw:1,1 sample.wav. So, direct alsa sound works fine.
>
> However, pulseadio does not recognize the digital output of Xonar U7,
> it offers only analog output.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 14.04
> Package: pulseaudio 1:4.0-0ubuntu11.1
> ProcVersionSignature: Ubuntu 3.13.0-63.103-lowlatency 3.13.11-ckt25
> Uname: Linux 3.13.0-63-lowlatency i686
> ApportVersion: 2.14.1-0ubuntu3.13
> Architecture: i386
> AudioDevicesInUse:
> USER PID ACCESS COMMAND
> /dev/snd/controlC1: aoand 3756 F.... pulseaudio
> /dev/snd/controlC0: aoand 3756 F.... pulseaudio
> CurrentDesktop: Unity
> Date: Mon Sep 21 21:29:54 2015
> EcryptfsInUse: Yes
> InstallationDate: Installed on 2011-02-20 (1674 days ago)
> InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386
> (20101007.1)
> SourcePackage: pulseaudio
> UpgradeStatus: Upgraded to trusty on 2014-05-19 (490 days ago)
> dmi.bios.date: 11/29/2012
> dmi.bios.vendor: LENOVO
> dmi.bios.version: 7WET71WW (3.21 )
> dmi.board.name: 7448CTO
> dmi.board.vendor: LENOVO
> dmi.board.version: Not Available
> dmi.chassis.asset.tag: No Asset Information
> dmi.chassis.type: 10
> dmi.chassis.vendor: LENOVO
> dmi.chassis.version: Not Available
> dmi.modalias:
> dmi:bvnLENOVO:bvr7WET71WW(3.21):bd11/29/2012:svnLENOVO:pn7448CTO:pvrThinkPadX200Tablet:rvnLENOVO:rn7448CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
> dmi.product.name: 7448CTO
> dmi.product.version: ThinkPad X200 Tablet
> dmi.sys.vendor: LENOVO
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1498129/+subscriptions
>

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

Raymond is there no way I can do this in alsa?

Why does adding '"Xonar U7 Echelon Ed". 1' to
the USB-Audio.pcm.iec958_device section of USB-Audio.conf appear to do
nothing?

Here is that section

# If a device does not use the first PCM device for digital data, the device
# number for the iec958 device can be changed here.
USB-Audio.pcm.iec958_device {
# "NoiseBlaster 3000" 42
        "Xonar U7 Echelon Ed." 1

# The below don't have digital in/out, so prevent them from being opened.
"Blue Snowball" 999
"HP Digital Stereo Headset" 999
"Logitech Speaker Lapdesk N700" 999
"Logitech USB Headset" 999
"Logitech Wireless Headset" 999
"Plantronics GameCom 780" 999
"Plantronics USB Headset" 999
"Plantronics Wireless Audio" 999
"SB WoW Headset" 999
"Scarlett 2i2 USB" 999
"Sennheiser USB headset" 999
"USB Device 0x46d:0x992" 999
}

There are no other references to the U7 card in USB-Audio.conf yet still
when I run
aplay -L | grep -A 2 iec958

I see
iec958:CARD=Ed,DEV=0
    Xonar U7 Echelon Ed., USB Audio
    IEC958 (S/PDIF) Digital Audio Output

with iec958 on device 0 not device 1

How else can I try to force alsa to use device 1 for iec958?

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

Some characters are unsafe

http://git.alsa-project.org/?p=alsa-lib.git;a=patch;h=4dc44bb34aab2b23ab45c8e61e4b17bf2cf58959

You have to send email to alsa devel mailing list how to add your sound card

Revision history for this message
g0ukb (g0ukb) wrote :

Raymond I have done that. Also today I was able to test an Asus Xonar U7 but the edition of the card which is not the Echelon edition. I believe the two cards are the same hardware but the echelon edition had additional Windows software included and for some reason Asus decided to change the USB name

This non-Echelon version presents itself as "Xonar U7" to alsa and adding '"Xonar U7" 1' to USB-Audio.pcm.iec958_device appears to work as

aplay -L | grep -A 2 iec958

reports

iec958:CARD=U7,DEV=0
    Xonar U7, USB Audio #1
    IEC958 (S/PDIF) Digital Audio Output

I still wasn't able to play directly from it - I guess I need to do further work in pulseaudio too. I can't test that as I only had the card on loan but will progress this once alsa-devel have a fix for the '.' in my own Echelon card name

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

Why don't you use Vendor and product id?

usb 1-1: New USB device found, idVendor=1043, idProduct=857c
 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: Xonar U7
usb 1-1: Manufacturer: ASUS

Revision history for this message
g0ukb (g0ukb) wrote :
Download full text (3.8 KiB)

Raymond - because I don't know how to :-) I have very little knowledge of
alsa.

From lsusb my device has a different USB dev number than the other Xonar U7
card
Bus 005 Device 011: ID 1043:85c1 iCreate Technologies Corp.
Also if I run cat /proc/asound/card3/usbid I see
1043:85c1

When this I first tried this card I suspected that the '.' in the alsa card
name was a problem. So one of the very first things I tried many months ago
was to add:
"USB Device 0x1043:0x85c1" 1 to the USB-Audio.pcm.iec958_device section
of USB-Audio.conf
this does not work.

I thought I was using the correct format because further down the
USB-Audio.pcm.iec958_device section of my USB-Audio.conf I see some cards
with 999 as their device to stop them being opened
"Scarlett 2i2 USB" 999
"Sennheiser USB headset" 999
"USB Device 0x46d:0x992" 999
}

So I tried again today and found this entry on the web
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/USB-Audio.conf;hb=HEAD
where it has these lines in the USB-Audio.pcm.iec958_device section of
USB-Audio.conf
        "Sennheiser USB headset" 999
         "SWTOR Gaming Headset by Razer" 999
        "USB Device 0x46d_0x821" 999
         "USB Device 0x46d_0x992" 999
  }

i.e. using an underscore to separate vendor id and product id

So I try
"USB Device 0x1043_0x85c1" 1
and stiil it doesn't work

Can you tell me what the correct format is?

On 27 February 2016 at 01:11, Raymond <email address hidden> wrote:

> Why don't you use Vendor and product id?
>
> usb 1-1: New USB device found, idVendor=1043, idProduct=857c
> usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> usb 1-1: Product: Xonar U7
> usb 1-1: Manufacturer: ASUS
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1498129
>
> Title:
> Asus Xonar U7 S/PDIF output not recognized by pulseaudio
>
> Status in alsa-driver package in Ubuntu:
> New
>
> Bug description:
> The external USB audio card Asus Xonar U7 is capable of both analog and
> digital output.
> ALSA name for the digital (S/PDIF) output is hw:1,1, and it is listed in
> aplay -l output, and aplay can output to it:
> aplay -D plughw:1,1 sample.wav. So, direct alsa sound works fine.
>
> However, pulseadio does not recognize the digital output of Xonar U7,
> it offers only analog output.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 14.04
> Package: pulseaudio 1:4.0-0ubuntu11.1
> ProcVersionSignature: Ubuntu 3.13.0-63.103-lowlatency 3.13.11-ckt25
> Uname: Linux 3.13.0-63-lowlatency i686
> ApportVersion: 2.14.1-0ubuntu3.13
> Architecture: i386
> AudioDevicesInUse:
> USER PID ACCESS COMMAND
> /dev/snd/controlC1: aoand 3756 F.... pulseaudio
> /dev/snd/controlC0: aoand 3756 F.... pulseaudio
> CurrentDesktop: Unity
> Date: Mon Sep 21 21:29:54 2015
> EcryptfsInUse: Yes
> InstallationDate: Installed on 2011-02-20 (1674 days ago)
> InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386
> (20101007.1)
> SourcePackage: pulseaudio
> UpgradeStatus: Upgraded to trusty on 2014-05-19 (490 days ago)
> dmi.bios.date: 11/29/201...

Read more...

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

It only work with latest alsa lib

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

Raymond: thank you for your time and effort!

Following your advice I was able to configure iec958:CARD=U7 and point it at the correct hardware device.
The following aplay command goes to the digital output:

$ aplay -D iec958:CARD=U7 test.wav

However, the pulseaudio still redirects both, Analog and Digital (S/PDIF) outputs to the same analog output.
There are no special characters in the card name.
Here is an excerpt from /usr/share/alsa/cards/USB-Audio.conf:

USB-Audio.pcm.iec958_device {
        "Xonar U7" 1
...
}

The outputs of pactl list and aplay -L are attached.
So, what shall I do with pulseaudio to recognize the iec958 output?

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

can not attache more than one file to a comment, so here goes pactl list (see above comment for details)

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

card 1: U7 [Xonar U7], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0
card 1: U7 [Xonar U7], device 1: USB Audio [USB Audio #1] Subdevices: 1/1 Subdevice #0: subdevice #0
card 1: U7 [Xonar U7], device 2: USB Audio [USB Audio #2] Subdevices: 1/1 Subdevice #0: subdevice #0

Why are three playback devices?

ARECORD **** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: U7 [Xonar U7], device 1: USB Audio [USB Audio #1] Subdevices: 1/1 Subdevice #0: subdevice #0

You have to ask in pulseaudio discuss mailing list, it is not clear analog or digital port have priority

Active Profile: output:analog-stereo+input:iec958-stereo

Profiles: input:iec958-stereo: Digital Stereo (IEC958) Input (sinks: 0, sources: 1, priority. 55) output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority. 6000) output:analog-stereo+input:iec958-stereo: Analog Stereo Output + Digital Stereo (IEC958) Input (sinks: 1, sources: 1, priority. 6055) output:analog-surround-40: Analog Surround 4.0 Output (sinks: 1, sources: 0, priority. 700) output:analog-surround-40+input:iec958-stereo: Analog Surround 4.0 Output + Digital Stereo (IEC958) Input (sinks: 1, sources: 1, priority. 755) output:analog-surround-41: Analog Surround 4.1 Output (sinks: 1, sources: 0, priority. 800) output:analog-surround-41+input:iec958-stereo: Analog Surround 4.1 Output + Digital Stereo (IEC958) Input (sinks: 1, sources: 1, priority. 855) output:analog-surround-50: Analog Surround 5.0 Output (sinks: 1, sources: 0, priority. 700) output:analog-surround-50+input:iec958-stereo: Analog Surround 5.0 Output + Digital Stereo (IEC958) Input (sinks: 1, sources: 1, priority. 755) output:analog-surround-51: Analog Surround 5.1 Output (sinks: 1, sources: 0, priority. 800) output:analog-surround-51+input:iec958-stereo: Analog Surround 5.1 Output + Digital Stereo (IEC958) Input (sinks: 1, sources: 1, priority. 855) output:analog-surround-71: Analog Surround 7.1 Output (sinks: 1, sources: 0, priority. 700) output:analog-surround-71+input:iec958-stereo: Analog Surround 7.1 Output + Digital Stereo (IEC958) Input (sinks: 1, sources: 1, priority. 755) output:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0, priority. 5500) output:iec958-stereo+input:iec958-stereo: Digital Stereo Duplex (IEC958) (sinks: 1, sources: 1, priority. 5555) off: Off (sinks: 0, sources: 0, priority. 0) Active Profile: output:analog-stereo+input:iec958-stereo

Ports: iec958-stereo-input: Digital Input (S/PDIF) (priority: 0, latency offset: 0 usec) Part of profile(s): input:iec958-stereo, output:analog-stereo+input:iec958-stereo, output:analog-surround-40+input:iec958-stereo, output:analog-surround-41+input:iec958-stereo, output:analog-surround-50+input:iec958-stereo, output:analog-surround-51+input:iec958-stereo, output:analog-surround-71+input:iec958-stereo, output:iec958-stereo+input:iec958-stereo iec958-stereo-output: Digital Output (S/PDIF) (priority: 0, latency offset: 0 usec) Part of profile(s): output:iec958-stereo, output:iec958-stereo+input:iec958-stereo

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

Raymond:

>Why are three playback devices?

1) is analog output
2) is digital S/PDIF stereo output
3) some other digital output

Playing to the third device lights the "digital output" indicator, but I do not get any sound.
Looks like some sort of S/PDIF output, not supported by my external DAC.

Reading documentation I'd guess it is "Dolby Digital or DTS output", because the manual reads "For Dolby Digital or DTS output, check that the AV receiver is in the correct decoding mode." Also, searching on the Internet suggests that it is DDL: Dolby Digital Live, which can be selected for the S/PDIF output when using Windows software.

Revision history for this message
g0ukb (g0ukb) wrote :

Raymond - thank you for all your help. I now have my Xonar U7 Echelon Ed. working with SPDIF. Clemend from the alsa-dev team suggested the following:

"""
Try changing /usr/share/alsa/cards/USB-Audio.conf. Dont add an entry to
the USB-Audio.pcm.iec958_device list near the top, but go to the bottom,
to the USB-Audio.pcm.iec958.0 definition, and change this:

USB-Audio.pcm.iec958.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 {
                ...(lots of stuff)...
        }
        default {
                ...(lots of stuff)...
        }
}

to this:

USB-Audio.pcm.iec958.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 }
        type hw # no @func
        card $CARD
        device 1
}
"""

I believe this fix ignores card-identification and assigns ALL USB soundcards so that iec958 is on device 1 rather than device 0. It is a hack because I cannot use other USB for iec958 cards but currently that is not a requirement so I am happy.

When I made the fix alsa picked it up without needing a restart i.e. I when I run
     aplay -L | grep -A 2 iec958
I get
    iec958:CARD=Ed,DEV=0
    Xonar U7 Echelon Ed., USB Audio #1
    IEC958 (S/PDIF) Digital Audio Output

Pulseaudio needed restarting to pick up the change and then everything worked well.

I will make a better fix when my Linux version supports the alsa release which has support or special characters.

Thank you again or helping me resolve this.

=======================================================================================

aoandr - I have a friend who has an original Asus Xonar U7 (which identifies itself to Alsa as "Xonur U7"). I have helped him get this working with iec958.

This worked for him:

    aplay -l [ to identify the card]
    amixer -c[x] sset 'IEC958 In' on [to ensure it is unmuted in alsa - [x] is the card number from aplay -l]

add the
USB-Audio.pcm.iec958_device {
        "Xonar U7" 1
...
}
to USB-Audio.conf

restart Pulseaudio and alsa (a reboot is easier than killing everything)

All worked after this for his Xonar U7

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

g0ukb: thank you for your suggestions.

I had modified the USB-Audio.conf exactly as you suggested.
ALSA is working with iec958 interface, which is routed to hw:1,1, but pulseaudio still redirects "S/PDIF output" to hw:1,0 (that is: Analog Stereo).

Probably your friend is running a different version of Ubuntu and/or Pulseaudio.
I am running Ubuntu Ubuntu 14.04.4 LTS with the kernel 3.19.0-51-lowlatency (aka linux-image-lowlatency-lts-vivid) from trusty-updates repository.

Have no idea what else can I do. :(

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

Active Profile: output:analog-stereo+input:iec958-stereo

Do you really change since capture device 1 not exist?

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

Usb audio still not implemented ice958 control to set non audio aes bits for ac3/dts passthrough

Revision history for this message
Dana Goyette (danagoyette) wrote :

I managed to add the U7 Echelon to the config file:

"Xonar U7 Echelon Ed_" 1

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.