Set default sound level of FiiO K1 on plug

FiiO K1 became very silent recently when you plug it in on Ubuntu for some reason.

To fix it add an UDEV rule:

/etc/udev/rules.d/71-fiio-k1.rules

SUBSYSTEMS=="usb", ACTION=="add|change", ATTRS{manufacturer}=="FiiO", ATTRS{product}=="FiiO USB DAC K1", RUN+="/home/ajnasz/bin/init-fiio-k1.sh"

And create the shelscript which set the volume whenever you plug the DAC:

/home/ajnasz/bin/init-fiio-k1.sh

#!/bin/sh

CARD_ID="$(aplay -l | grep "FiiO.*K1" | cut -d ' ' -f 2 | tr -d ':')"

if [ -z "$CARD_ID" ];then
    return
fi

amixer -c "$CARD_ID" sset PCM 90%

Then reload the udev rules

udevadm control --reload

Ajnasz Blog lets readers post comments anonymously or by signing in with Google, GitHub, or Telegram.

comments loading...