<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Lack of hardware volume no longer supported with HifimeDIY Tiny"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99607#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Lack of hardware volume no longer supported with HifimeDIY Tiny"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99607">bug 99607</a>
              from <span class="vcard"><a class="email" href="mailto:tanuk@iki.fi" title="Tanu Kaskinen <tanuk@iki.fi>"> <span class="fn">Tanu Kaskinen</span></a>
</span></b>
        <pre>Sorry for slow reply, I have trouble keeping up with the pace of incoming
emails...

(In reply to Jerome from <a href="show_bug.cgi?id=99607#c6">comment #6</a>)
<span class="quote">> Sure, this policy makes sense. After digging more, the issue is mostly on
> the hardware side. There may be a way to be more user friendly however, TBC.

> There are two levels of oddities for the hardware, at the device
> architecture and USB levels. The device architecture is:

>           ----------------------              -------------
>   USB --->| PCM2706 Burr Brown |-- IEC958 --->| Sabre DAC |---> Analog out
>           ----------------------              -------------     Headset
>                     |
>                     V
>                 Analog out
>                  UNUSED!

> The PCM2706 is only used for its USB interface. It has an internal DAC with
> an analog output, but this output is not used. Instead, the PCM2706 has a
> digital output, which is used to feed another better DAC from Sabre. This
> other DAC output is the device output (headset 3.5 mm jack).

> But at the USB level, only the PCM2706 is seen with a completely stock
> configuration. Even the USB id is generic for the PCM2706, so there's no way
> to identify this specific set-up.

> And the USB audio class descriptors of the PCM2706 do not even reflect its
> internal set-up. It would have been possible to describe at the USB level
> both analog and digital output, but that's not done. From the USB
> descriptors, the PCM2706 is a simple pipe with just the analog output:

>    --------------------     ---------------     -----------------
>    | USB input stream |---->| Mute+Volume |---->| Analog output |
>    --------------------     ---------------     -----------------

> There is indeed hardware volume support, but from the PCM2706 datasheet it
> applies only to the (unused) analog output, not to the digital IEC958
> interface.

> I saw two changes when upgrading from Jessie to Stretch:
>   1) selecting the analog profile used to give no sound, now it does
>      with a step volume effect;
>   2) the IEC95 profile had disappeared.

> The first change (1) I now understand: it's just that the IEC958 output is
> enabled too when the analog output is enabled. The driver level correctly
> report a hardware volume control for the analog output. But it doesn't apply
> to the actually used IEC958 output (per the PCM2706 datasheet). And when the
> volume is set to 0, the mute is likely enabled and this does apply to the
> IEC958 output too. So the observed behavior is OK. Enabling the IEC958
> output too confused me, but why not.</span >

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).

<span class="quote">> (I still don't understand why using the keyboard volume control switches to
> software volume for a split second before going back to hardware, but it's a
> minor point)

> 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.</span >

Which work-around are you referring to? Setting the card profile to "off" and
loading module-alsa-sink? If that's the workaround, what does "the IEC958
profile is back" mean? If you load module-alsa-sink, that shouldn't have any
effect on the set of available profiles on the card object.

<span class="quote">> 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.</span >

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?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>