geoffreybennett / scarlett-gen2

Linux kernel source tree with additional Focusrite Scarlett and Clarett support ("Scarlett2 USB Protocol Mixer Driver")
196 stars 6 forks source link

Phantom power enabled upon connecting #16

Closed mweber15 closed 3 months ago

mweber15 commented 3 months ago

When first connected to a system using this driver, the 48v phantom power on my 2i2 Gen3 is automatically enabled, and it probably shouldn't be.

This is a minor annoyance for me, not a major issue, but could possibly damage someone else's equipment. This behavior differs from whatever driver this system was previously using, and differs from the behavior I see when connecting to a Mac, so I assume this is controlled by the driver.

I have this interface connected through a hub and a KVM, so I notice this every time I switch between my computers and have to manually disable the phantom power.

Relevant dmesg output:

[1098739.890321] usb 3-9.4.1: new high-speed USB device number 23 using xhci_hcd
[1098739.995517] usb 3-9.4.1: New USB device found, idVendor=1235, idProduct=8210, bcdDevice= 6.45
[1098739.995533] usb 3-9.4.1: New USB device strings: Mfr=1, Product=3, SerialNumber=2
[1098739.995537] usb 3-9.4.1: Product: Scarlett 2i2 USB
[1098739.995541] usb 3-9.4.1: Manufacturer: Focusrite
[1098739.995544] usb 3-9.4.1: SerialNumber: Y8PC6EA1AC80F2
[1098740.249420] usb 3-9.4.1: Focusrite Scarlett Gen 3 Mixer Driver enabled (pid=0x8210); report any issues to https://github.com/geoffreybennett/scarlett-gen2/issues
[1098740.249654] usb 3-9.4.1: Firmware version 1605

Kernel info:

6.8.0-76060800daily20240311-generic #202403110203~1715181801~22.04~aba43ee SMP PREEMPT_DYNAMIC Wed M x86_64 x86_64 x86_64 GNU/Linux

Happy to provide any additional information if it would be of use. Thank you for your work!

geoffreybennett commented 3 months ago

Hi @mweber15,

The driver itself doesn't do this. Most likely alsactl is configured by your distribution to store the card state on system shutdown and restore the card state when your interface is plugged in. You can try sudo alsactl store to store a new configuration that gets loaded when your interface is plugged in. Or you can rm /var/lib/alsa/asound.state to remove the configuration (until the next time it gets saved). Or disable/mask the alsa-restore/alsa-state systemctl services (that's my preferred option).

Regards, Geoffrey.

mweber15 commented 3 months ago

That was indeed the case. Please accept my apology for assuming it was the driver. I'm not sure what caused that particular state to be created, but I've disabled those services and it's now behaving as it did in the past.

Thank you for the very fast response!

geoffreybennett commented 3 months ago

You're welcome, and I'm glad I could help! I completely understand; the same thing has happened to me more than once!!