USB DAC not recognized
-
Hi there, I wanted to connect my Headphone to my USB DAC with my Xiaomi Mi A2. DAC is not recognized by UT. Are external devices not supported?
-
@jeffnot UT uses the same (build of the) kernel that Android on your device came with. This is to ensure all the on board peripherals have a chance of working. Often these kernels do not include support for external audio devices over USB.
But if the kernel and hardware support it, in principle it should 'just work'' -
@arubislander thx for your fast reply. On my Android I have to activate OTG to get the DAC working. Is there a similar way on UT?
-
I can find my DAC with "aplay -l"
And I can load my DAC with "pactl load-module module-alsa-sink device=hw:2"
Where 2 is the index of my USB DAC.
Now I got Sound!
How can i make this permanent, or maybe hotplug?
-
Hey I tried the following:
make / writable.
check Vendor ID and Product ID with after you have plugged in the USB DAC :
dmesg | grep Vendor
for me
=>
"New USB device found, idVendor=05ac, idProduct=110a, bcdDevice=26.50"
(it is a: Apple, Inc. USB-C to 3.5mm Headphone Jack Adapter)
(for another product with another Vendor and Product ID icould also get another DAC work)in cd /etc/udev/rules.d create: # USB-DAC plug in ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="110a", ACTION=="add", RUN+="/usr/local/bin/load_dac_module.sh" # USB-DAC unplug ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="110a", ACTION=="remove", RUN+="/usr/local/bin/unload_dac_module.sh"
reload udev rules:
sudo systemctl daemon-reload sudo udevadm trigger
check aplay -l
for me:
=>
card 1 and Device 0in /usr/local/bin/ create the scripts:
1.
/usr/local/bin/load_dac_module.sh#!/bin/bash sleep 1 sudo -u phablet pactl --server "unix:/run/user/32011/pulse/native" load-module module-alsa-sink device=hw:1,0
/usr/local/bin/unload_dac_module.sh
#!/bin/bash # search for loaded module sleep 1 USER="phablet" #USERID from phablet= "32011 PULSE_SERVER="unix:/run/user/32011/pulse/native" MODULE_ID=$(sudo -u $USER pactl --server "$PULSE_SERVER" list short modules | grep module-alsa-sink | awk '{print $1}' ) # unload PulseAudio-Module , if it was loaded before if [ -n "$MODULE_ID" ]; then # pactl unload-module $MODULE_ID sleep 1 sudo -u phablet pactl --server "unix:/run/user/32011/pulse/native" unload-module $MODULE_ID fi
make the files writable:
sudo chmod +x /usr/local/bin/load_dac_module.sh sudo chmod +x /usr/local/bin/unload_dac_module.sh
unplug USB DAC
reboot
(if the USB DAC was plugged at boot it seem that the DAC does not work than.)
on a FP4 it took nearly 4 sec till the sound comes from the DACCould somebody test and verify it?
PS:
this helped me:
https://wiki.archlinux.org/title/PulseAudio/Examples#Automatically_switch_audio_to_HDMI