0

I'm using Ubuntu 14.04 and I recently bought a Schiit Fulla USB DAC/Amp. I want Ubuntu to automatically switch audio output to this device when I plug it in as opposed to me having to manually set it every time. Is there any way to do this? Thanks.

Mav14
  • 421
  • 1
  • 6
  • 14

1 Answers1

1

I don't know if a better solution exists but a udev rule may be what you are looking for.

Open the file /lib/udev/rules.d/90-pulseaudio.rules search for LABEL="pulseaudio_check_usb" and add your custom rule to the end of this block.

  • Have a look at this: How to change pulseaudio sink with "pacmd set-default-sink" during playback?
  • Use lsusb to get your USB vendor and product ID (Example: vendor 0d8c product 0102 in Bus 001 Device 011: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device)
  • The rule probably looks like below, but I haven't tested it and I wouldn't want it in my audio setup.

    # My custom rule to switch to Schiit Fulla everytime it gets connected
    ATTRS{idVendor}=="1234", ATTRS{idProduct}=="1234", RUN+="pacmd set-default-sink …"
    
  • To let the changes in the rule take effect you need to restart udev: What is the correct way to restart udev?
  • I'm not sure if 90-pulseaudio.rules is the right place for such a rule, I just know that I had to configure another device and use ENV{PULSE_PROFILE_SET} in conjunction with a custom conf file instead of the RUN parameter. The disadvantage of modifying this configuration file is that it will be replaced when the corresponding package gets updated.
LiveWireBT
  • 28,763