Bug 100555

Summary: Digital and analog port for the same card
Product: PulseAudio Reporter: Laurent Bigonville <bigon>
Component: coreAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: bugzilla, lennart
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: pactl list
g-c-c screenshot

Description Laurent Bigonville 2017-04-04 13:41:14 UTC
Created attachment 130668 [details]
pactl list

Hi,

I initially opened a bug in the GNOME bugzilla, but then I've been told to reopen it here.

https://bugzilla.gnome.org/show_bug.cgi?id=770909

Original report:


Hi,

In gnome-control-center, I see my Logitech G930 wireless headset twice, once with the name "Digital output (S/PDIF) G930" and once with "Analogic output G930"

I guess that should only be one entry?

====

Hadess later replied:


It's not a bug, the card has 2 ports, and we unroll the cards and ports in this list, to avoid having 2 drop-downs per hardware, and make it easier to switch between, for example, an internal speaker and the jack.

You could argue that switching between the analogue and digital outputs should be automatic, and I would certainly agree that this would clean up our interface, but that's a problem that can only be solved in PulseAudio and layers underneath it.

Please file a bug against PulseAudio mentioning the above, that's the best way to drain that swamp.

====

There is the same problem for my internal sound card
Comment 1 Laurent Bigonville 2017-04-04 13:41:56 UTC
Created attachment 130669 [details]
g-c-c screenshot

I also have the same issue with the internal sound card
Comment 2 Tanu Kaskinen 2017-04-04 20:38:09 UTC
If pulseaudio can open the "iec958" alsa device, pulseaudio will think that the card has digital output. If no such output exists in reality, it's an alsa bug.

http://alsa-project.org/main/index.php/Bug_Tracking
Comment 3 Laurent Bigonville 2017-04-05 08:41:16 UTC
Looking at [0], couldn't the 2 port be what they are calling there the 'Digital surround passthrough'?


[0] http://alsa.opensrc.org/DigitalOut
Comment 4 Tanu Kaskinen 2017-04-05 10:32:54 UTC
The G930 headset seems to have "Dolby 7.1 Surround Sound" as one of the features[1]. If that's supported on Linux at all, I suppose it might be implemented via an iec958 device using passthrough. If that's the case, it's probably not an alsa bug.

Do you get audio from the headset no matter which output you select?

If someone wants to work on merging the two ports (I probably won't have time for it), ideally alsa would somehow indicate that on this device the analog and digital outputs actually go to the same place. If that's not going to happen, I think it would be possible to write custom profile configuration for this device in pulseaudio and ask for its inclusion in upstream (there are several other special configurations for particular sound cards too). The configuration could define two output mappings, and one output port that is used by both mappings.

Some documentation about the profile configuration:
https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/

As for the internal sound card, merging the ports doesn't make sense. If there are both analog and digital outputs on the sound card, they should have separate ports. If there's no digital output, having the iec958 device available is an alsa bug.

[1] https://www.amazon.com/Logitech-Wireless-Surround-Headphones-Microphone/dp/B003VANOFY
Comment 5 Laurent Bigonville 2017-04-06 07:10:01 UTC
Yes the headset is supposed to support (software) Dolby under windows. There is a even an hardware switch to enable/disable it, but it doesn't seem to do anything under linux.

I've sound with the two outputs, the volume is a bit different between these tough (100% is a lot louder with the analogic output).

If I'm going to the pavucontrol with the digital profile/port I get extra (advanced) encoding like AC3, DTS,.... in addition to pcm
Comment 6 Tanu Kaskinen 2017-04-25 07:44:41 UTC
It would be interesting to hear if some of the encodings work (AC3 and EAC3 are related to Dolby stuff, so they are the prime candidates, although I think neither of them is what "Dolby Surround 7.1" uses). To test an encoding, you'll need to enable the encoding in pavucontrol, find a file with that encoding, and play the file with a media player that is able to use pulseaudio's passthrough feature.

Here's a bit of documentation: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Passthrough/
Comment 7 Laurent Bigonville 2017-04-26 07:55:14 UTC
Just tried now

For some reasons, if I'm checking all the codecs (AC3, EAC3, DTS, MPEG, AAC) and then changing the volume, only AAC (and sometimes, AC3, but this doesn't seems to be alway the case) stay checked in the interface.

I then tried to play a video (audio in AC3, not sure the  using gst-launch playbin and the sound is completely rubbish (static,...) and inaudible. Works well if AC3 is unchecked.

When trying to read the AC3 test file hosted at http://www.lynnemusic.com/surround.html, gstreamer even gives me a non-supported error if the AC3 checkbox is checked in pavucontrol

Note that in the profile of the device I only have stereo.
Comment 8 GitLab Migration User 2018-07-30 09:38:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/68.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.