[pulseaudio-tickets] [Bug 99607] Lack of hardware volume no longer supported with HifimeDIY Tiny

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Apr 18 21:02:14 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=99607

--- Comment #9 from Jerome <an.inbox at free.fr> ---
(In reply to Tanu Kaskinen from comment #7)
> Sorry for slow reply, I have trouble keeping up with the pace of incoming
> emails...

It's ok, and thanks a lot for your time. I cannot reproduce the issue anymore,
the IEC958 interface is now always there and working fine. If you want me to
check some things I'd be happy to help, but otherwise I don't think you should
spend time on this. It looks like a transient glitch at a time when Stretch was
still moving quite fast.

Besides this glitch, a change that could make sense IMHO is to set the IEC958
interface of a PCM2706 chip (when seen ;) at a higher priority than it's analog
output: it seems today the PCM2706 is mostly used for its USB interface only
and not as a DAC. The D/A conversion is done by a better DAC chip, as for my
dongle:

[...] The device architecture is:
> > 
> >           ----------------------              -------------
> >   USB --->| PCM2706 Burr Brown |-- IEC958 --->| Sabre DAC |---> Analog out
> >           ----------------------              -------------     Headset
> >                     |
> >                     V
> >                 Analog out
> >                  UNUSED!

When I plugged the dongle on a Win7 PC, audio worked out of the box with a
fixed level so Win7 did use the IEC958 port by default. So it looks like a safe
choice. And for now PA gives higher priority to the analog output, as shown by
"pacmd list-cards":

 profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available:
unknown)
    output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500,
available: unknown)
    off: Off (priority 0, available: unknown)

So a user plugging this DAC will not have any sound until manually selecting
the IEC958 output. Having the IEC958 as highest priority would give sound out
of the box. Do you think it's worth creating a bug entry for this? If yes would
it be for PA, or are the priority set elsewhere?

I reply to your questions below, but again feel free to skip.

> What does "aplay -l" print? Your description sounds like on Jessie there
> were separate alsa PCM devices for analog and digital (likely "hw:x,0" for
> analog and "hw:x,1" for digital, with the latter mapped to "iec958:x"), but
> now there's only digital, which pulseaudio incorrectly guesses is analog
> (for analog stereo output, pulseaudio tries first "front:x" and if that
> doesn't work, pulseaudio tries "hw:x,0" and if that works, pulseaudio
> assumes that it's an analog device even if it isn't).

I can't reproduce the issue, but see the output of alsa-info.sh in comment #7.

Now on stretch with things back ok, "aplay -l" gives only one entry for the USB
DAC:

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

> > The second change (2) was the real problem in my case. But after the
> > suggested work-around the IEC958 profile is back, and when using it all is
> > ok again. I set it as default profile, and it's sticky across reboots / plug
> > and unplug now. I didn't see it disappear again since.
> 
> Which work-around are you referring to? Setting the card profile to "off"
> and loading module-alsa-sink?

Yes, doing as in comment #2.

> If that's the workaround, what does "the IEC958 profile is back" mean?

The "IEC958 profile is back" means I can see it at pulseaudio level. When doing
a "pactl list cards" the entry for the USB DAC "Profiles" section is now:

 Profiles:
    output:analog-mono: Analog Mono Output (sinks: 1, sources: 0, priority:
200, available: yes)
    output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority:
6000, available: yes)
    output:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0,
priority: 5500, available: yes)
    off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
 Active Profile: output:iec958-stereo

So the IEC958 profile is properly listed again.

Before, when I had the issue, the IEC958 profile was missing at PA level. Only
the analog mono, stereo and off profiles were shown. When I tried to force
select a (not shown) iec958-stereo profile from the CLI, it was rejected as an
error. So only the analog output was usable, and the IEC958 was gone and not
shown in any PA UI (CLI or GUI).

> If you load module-alsa-sink, that shouldn't
> have any effect on the set of available profiles on the card object.

Stretch was quite a moving target at the time, I can't rule out that something
else changed that got the IEC958 back. But subjectively, I ran the 2 commands
and noticed the IEC958 being back again. And it's been fine since then.

> > Because the IEC958 output is not part of the USB description, this profile
> > must be added by a driver handling the PCM2706. I tried to grep around for
> > the Burr Brown id and this device family (270[4567]) in the kernel source
> > and ALSA data, but couldn't find where it is managed. The datasheet is not
> > clear either on how the digital output is controlled. So I don't understand
> > how this interface is handled and why it disappeared.
> 
> I don't know all the details either, but since pulseaudio doesn't any more
> present a digital profile on the card, the "iec958" PCM device has
> apparently been removed for the card in the alsa configuration (shipped in
> alsa-lib). To verify, you can check the output of "aplay -L" - does it show
> that a device named iec958 exists?

I can't reproduce the issue now, but I do have the output of alsa-info.sh from
when the USB DAC IEC958 was gone. It does not show any iec958 interface for the
USB DAC, so ALSA wasn't seeing it (attached as comment #7).

Now things are back to normal "aplay -L" does show an IEC958 entry for the DAC:

  iec958:CARD=DAC,DEV=0
  USB Audio DAC, USB Audio
  IEC958 (S/PDIF) Digital Audio Output

So it looks like it was a transient ALSA level detection issue. 

Thanks again.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20170418/fa736f84/attachment-0001.html>


More information about the pulseaudio-bugs mailing list