You are not logged in.
Hi there,
I've one issue with my USB audio.
1) USB DAC is connected to an USB port (card0)
card 0: Audio [McIntosh HD USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: SPDIF [Integrated SPDIF], device 0: S/PDIF PCM snd-soc-dummy-dai-0 [S/PDIF PCM snd-soc-dummy-dai-0]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 2: DWHDMI [DW-HDMI], device 0: DW HDMI [dw-hdmi-ahb-audio]
Subdevices: 1/1
Subdevice #0: subdevice #02) setting audio volume with alsamixer to -6 db for card0
3) power off USB DAC. The card disappears
4) Power on USB DAC. The card is online again
5) USB DAC volume is at -30db (probably default)
Question:
is it possible to restore the volume to the original value before unplugging (-6db) the device? alsa-restore daemon seems not to work in this case?!
cheers
sf
Offline
I've never tried this but you can probably create a udev rule to adjust the volume on device plugin. You can create a script to call to adjust the volume (i.e. amixer set Master 50%) when udev senses the USB device is plugged in.
https://wiki.archlinux.org/index.php/Udev
Others in the forum might have better or simpler ideas but this could be a workaround.
Offline
Does the card index change? Did you actively store the volume change with a
sudo alsactl storebeforehand? Or are you actually and actively using the restore daemon?
systemctl status alsa-restore.service alsa-state.serviceOffline