fix(audio): expand ALSA bit-perfect detection for front:CARD devices
- Add front:CARD=X,DEV=Y device enumeration from aplay -L output - Recognize front: devices as bit-perfect in AlsaDirectStream - Group front:CARD and "bit-perfect" named devices correctly in UI - Add tooltip to device dropdown showing full device name - Add current selection indicator in device dropdown - Extend dropdown idle timeout to 10 seconds for long device names Addresses issue #30 for USB DACs that expose front: but not hw: devices
This commit is contained in:
1 parent
9680bbb9cd
commit
7a76973920
3 files changed
+83
-9
No files matched your search
@@ -285,9 +285,12 @@ impl AlsaDirectStream {
|
||||
Err(format!("No volume control found for {}. DAC may not support hardware mixer.", self.device_id))
|
||||
}
|
||||
|
||||
/// Check if device is hw: device
|
||||
/// Check if device is a bit-perfect hardware device
|
||||
/// Includes: hw:X,Y, plughw:X,Y, and front:CARD=X,DEV=Y
|
||||
pub fn is_hw_device(device_id: &str) -> bool {
|
||||
device_id.starts_with("hw:") || device_id.starts_with("plughw:")
|
||||
device_id.starts_with("hw:")
|
||||
|| device_id.starts_with("plughw:")
|
||||
|| device_id.starts_with("front:CARD=")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,6 +320,7 @@ impl AlsaDirectStream {
|
||||
2
|
||||
}
|
||||
|
||||
/// Check if device is a bit-perfect hardware device (always false on non-Linux)
|
||||
pub fn is_hw_device(_device_id: &str) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user