on the Xperia10V create symlink (like it is on 10ii by default):
as root: ln -s /etc/pulse/xpolicy.conf.d/usbaudio.conf.disabled /etc/pulse/xpolicy.conf.d/usbaudio.conf
as defaultuser systemctl --user restart pulseaudio.service
Apple dac silent volume fix after plug:
/usr/local/bin/set-usb-dac-volume.sh (make it executable)
#!/bin/sh
# !!! update sink name to yours - it contains unique serial number !!! `pactl list sinks|grep Name`
# someone could improve this to autotdetec script
sleep 2
pactl set-sink-volume alsa_output.usb-Apple__Inc._USB-C_to_3.5mm_Headphone_Jack_Adapter_DWH504202DRL1MQAF-00.analog-stereo 100%
/usr/local/bin/udev-create-flag (make it executable)
#!/bin/sh
# called by udev (runs as root)
# write a flag in the user's runtime dir so the user service notices it
USER="defaultuser"
FLAG="/run/user/$(id -u "$USER")/usb-dac-connected.flag"
mkdir -p "$(dirname "$FLAG")"
touch "$FLAG"
/etc/udev/rules.d/99-usb-dac-volume.rules
ACTION=="add", SUBSYSTEM=="sound", RUN+="/usr/local/bin/udev-create-flag"
ACTION=="change", SUBSYSTEM=="sound", RUN+="/usr/local/bin/udev-create-flag"
/home/defaultuser/.config/systemd/user/usb-dac-volume.path
[Unit]
Description=Watch for USB DAC flag
[Path]
PathExists=/run/user/%U/usb-dac-connected.flag
Unit=usb-dac-volume.service
[Install]
WantedBy=default.target
/home/defaultuser/.config/systemd/user/usb-dac-volume.service
[Unit]
Description=Run USB DAC volume script when flag present
After=default.target
[Service]
Type=oneshot
Environment=XDG_RUNTIME_DIR=%t
ExecStart=/usr/local/bin/set-usb-dac-volume.sh
ExecStartPost=/bin/rm -f /run/user/%U/usb-dac-connected.flag
TimeoutStartSec=60
[Install]
WantedBy=default.target
as root:
udevadm control --reload
now run as the defaultuser:
Reload user units:
systemctl --user daemon-reload
Enable and start the path unit so it watches for the flag:
systemctl --user enable --now usb-dac-volume.path
now it works perfectly, i just plug Apple USB-C to 3.5"Jack (Part number: MW2Q3ZM/A)
music is instantly routed to headphones and in two seconds the volume is without limit and then could be adjusted in UI/buttons 0% <=> true 100% like it is expected.