Pipewire dynamic sampling rate not falling back to hardware limit?

Hiya!

I’ve got a late 2011 Macbook Pro which has a Cirrus Logic CS4206 audio chip which supports analogue (i cant find the specs but pretty sure this only supports up to 48khz sample rate) and digital output (theoretically up to 192khz) via the headphone jack. I have connected an external DAC which (appears to support up to 96khz) via the digital output and configured default.clock.allowed-rates in pipewire.

~/.config/pipewire/pipewire.conf.d/clockrates.conf

context.properties = {
default.clock.allowed-rates = [ 32000 44100 48000 88200 96000 ]
}

This all works fine when playing music files, including those sampled at 96khz or higher via the digital output. I was able to confirm by using pw-top that 96k was being sent to the DAC. The issue I have is that when I disconnect the DAC and fall back to the analogue output I get no sound when playing a 96khz+ file. pw-top still shows the card outputting at 96khz and doesn’t seem to recognize that that sample rate is not supported by the hardware. I would expect it to resample to the default 48Khz like it does when the above config is not active. Any thoughts on whats wrong?

I looked at the codec details in /proc/asound/card0/codec#0 and all the outputs analogue & digital appear to “support” the following rates… 32000 44100 48000 88200 96000 176400 192000. Could this be the problem?

As an aside - there is no such issue with outputting over bluetooth, presumably because the bluetooth codec is limited to 48khz.

Probably this?

context.properties = {
    default.clock.allowed-rates = [ 32000 44100 48000 88200 96000 ]
    default.clock.force-rate = 48000
  }

https://docs.pipewire.org/page_man_pipewire_1.html

Or this?

context.properties = {
        node.name = "devicename_or_id" #pw-cli list-objects | grep -A 10 'node.name =' 
        audio.format = "S32LE"                
        audio.rate = 48000                  
}

No luck with those lines on my side. Many thanks for the help. I’ll just default to 48khz for now

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.