fix: HiFi Wizard now detects real DAC sample rates from /proc/asound
v2_query_dac_capabilities was returning hardcoded sample rates (44.1-192kHz including 176.4kHz) instead of querying the actual hardware. This caused incorrect configuration for DACs that don't support all rates (e.g. DacMagic Plus doesn't support 176.4kHz). Now queries /proc/asound/cardN/stream0 via PipeWire sink mapping or ALSA device ID to get the real discrete rates from the USB descriptor. Falls back to defaults only if detection fails. cc
This commit is contained in:
2 files changed
+33
-2
No files matched your search
@@ -79,7 +79,7 @@ impl PipeWireBackend {
|
||||
|
||||
/// Query the DAC's supported sample rates from /proc/asound/cardN/stream0.
|
||||
/// Returns None if rates can't be determined (non-USB device, continuous range, etc.)
|
||||
fn get_sink_supported_rates(sink_name: &str) -> Option<Vec<u32>> {
|
||||
pub fn get_sink_supported_rates(sink_name: &str) -> Option<Vec<u32>> {
|
||||
let alsa_card = Self::get_alsa_card_for_sink(sink_name)?;
|
||||
|
||||
let stream_path = format!("/proc/asound/card{}/stream0", alsa_card);
|
||||
|
||||
Reference in new issue
Block a user