Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: USB Volume Knob breaks output
#1
I'm stumped about usb volume knobs. I bought this one:
https://www.amazon.com/dp/B0CQFY1CDN?psc...ct_details

It seems to work with Linux / the Pi in that I can plug it in and see all the commands being read properly. It even controls the moOde volume visually as one would expect.

I used the command to modify the triggerhappy media.conf file:

Code:
pi@moode:~ $ cat /etc/triggerhappy/triggers.d/media.conf
KEY_VOLUMEUP     1 /var/www/vol.sh -up 1
KEY_VOLUMEDOWN   1 /var/www/vol.sh -dn 1
KEY_MUTE         1 /var/www/vol.sh -mute
KEY_PLAYPAUSE    1 /usr/bin/mpc toggle
KEY_NEXTSONG     1 /usr/bin/mpc next
KEY_PREVIOUSSONG 1 /usr/bin/mpc prev
KEY_STOPCD       1 /usr/bin/mpc stop

and it works as you'd expect. or did. maybe.

when I plug in the volume knob, the output to my DACs becomes inaudible.
if I unplug it, the output returns, but extremely distorted and loud.

THAT is my issue. everything works great without the knob connected.
Everything fails to work with it connected. 

I would love some help with this. Controlling volume with a knob makes this thing way more useable for me.
Thanks!



Here's my setup: 
https://moodeaudio.org/forum/showthread....8#pid52868

RELEASE INFORMATION
Release: 8.3.9 2024-02-23
Maintainer: Tim Curtis © 2014
Documentation: View release notes, View setup guide
Contributors: View contributors
License: View GPLv3
PLATFORM INFORMATION
RaspiOS: 11.9 Bullseye 64-bit
Linux kernel: 6.1.21 64-bit
Pi model: Pi-4B 1.2 4GB
MPD version: 0.23.14

Code:
20240311 182910 worker: --
20240311 182910 worker: -- Start moOde 8 series
20240311 182910 worker: --
20240311 182910 worker: Successfully daemonized
20240311 182910 worker: Wait for Linux startup...
20240311 182922 worker: Linux startup complete
20240311 182922 worker: Boot config backed up
20240311 182923 worker: Session loaded
20240311 182925 worker: Package holds applied
20240311 182926 worker: File check complete
20240311 182926 worker: Debug logging off
20240311 182926 worker: Reduced logging off
20240311 182926 worker: --
20240311 182926 worker: -- Audio debug
20240311 182926 worker: --
20240311 182926 worker: ALSA cards:   0:b1 | 1:Headphones | 2:AudioHIGH | 3:AudioMID
20240311 182926 worker: MPD config:   0:Pi HDMI 1 | mixer:PCM | cardnum:0
20240311 182926 worker: Mixer name:   [PCM]
20240311 182926 worker: Hdwr volume:  set to 0%
20240311 182926 worker: Volume knob:  6
20240311 182926 worker: --
20240311 182926 worker: -- System
20240311 182926 worker: --
20240311 182927 worker: Host:     moode
20240311 182927 worker: Model:    Pi-4B 1.2 4GB
20240311 182927 worker: moOde:    8.3.9 2024-02-23
20240311 182927 worker: RaspiOS:  11.9 Bullseye 64-bit
20240311 182927 worker: Kernel:   6.1.21 64-bit
20240311 182927 worker: MPD ver:  0.23.14
20240311 182927 worker: CPU gov:  ondemand
20240311 182927 worker: Userid:   pi
20240311 182927 worker: Homedir:  /home/pi
20240311 182927 worker: Timezone: America/New_York
20240311 182927 worker: Keyboard: us
20240311 182927 worker: USB boot: enabled
20240311 182927 worker: File sys: expanded
20240311 182927 worker: HDMI out: on
20240311 182928 worker: Sys LED0: on
20240311 182928 worker: Sys LED1: on
20240311 182928 worker: --
20240311 182928 worker: -- Network
20240311 182928 worker: --
20240311 182928 worker: Eth: adapter exists
20240311 182928 worker: Eth: timeout off
20240311 182928 worker: Eth: address not assigned
20240311 182928 worker: Wlan: adapter exists
20240311 182928 worker: Wlan: country US
20240311 182928 worker: Wlan: SSID    secretwifissid
20240311 182928 worker: Wlan: other   none
20240311 182928 worker: Wlan: router  off
20240311 182928 worker: Wlan: timeout up to 90 secs
20240311 182928 worker: Wlan: connect to secretwifissid
20240311 182928 worker: Wlan: sleep   disabled
20240311 182928 worker: Wlan: method  dhcp
20240311 182928 worker: Wlan: address 192.168.1.203
20240311 182928 worker: Wlan: netmask 255.255.255.0
20240311 182928 worker: Wlan: gateway 192.168.1.1
20240311 182928 worker: Wlan: pri DNS 192.168.1.10
20240311 182928 worker: Wlan: domain  secretdomain.com
20240311 182928 worker: --
20240311 182928 worker: -- Software update
20240311 182928 worker: --
20240311 182928 worker: Automatic check off
20240311 182928 worker: --
20240311 182928 worker: -- File sharing
20240311 182928 worker: --
20240311 182928 worker: SMB file sharing:  off
20240311 182928 worker: NFS file sharing:  off
20240311 182928 worker: DLNA file sharing: off
20240311 182928 worker: --
20240311 182928 worker: -- Audio config
20240311 182928 worker: --
20240311 182928 worker: MPD config:    updated
20240311 182929 worker: Audio device:  Pi HDMI 1
20240311 182929 worker: Formats:       U8, S16_LE
20240311 182929 worker: Mixer type     CamillaDSP
20240311 182929 worker: Mixer name     PCM
20240311 182929 worker: Hdwr volume:   controller detected
20240311 182929 worker: ALSA max vol:  100%
20240311 182929 worker: ALSA card:     0
20240311 182929 worker: ALSA mode:     Default
20240311 182929 worker: ALSA loopback: off
20240311 182929 worker: CamillaDSP:    newfir
20240311 182929 worker: Renderers:     active flags reset
20240311 182929 worker: --
20240311 182929 worker: -- MPD startup
20240311 182929 worker: --
20240311 182929 worker: MPD service:        started
20240311 182929 worker: MPD port 6600:      accepting connections
20240311 182929 worker: MPD ALSA Default:   on
20240311 182929 worker: MPD ALSA Bluetooth: off
20240311 182929 worker: MPD HTTP Server:    off
20240311 182929 worker: MPD crossfade:      off
20240311 182929 worker: MPD ignore CUE:     no
20240311 182929 worker: MPD CDSP volsync:   on
20240311 182929 worker: MPD CDSP volrange:  60 dB
20240311 182929 worker: --
20240311 182929 worker: -- Music sources
20240311 182929 worker: --
20240311 182929 worker: USB auto-mount: udisks-glue
20240311 182929 worker: USB drives:     no drives found
20240311 182929 worker: NAS source:     AllMusic
20240311 182930 worker: NAS mount:      mount all submitted
20240311 182930 worker: --
20240311 182930 worker: -- Feature availability
20240311 182930 worker: --
20240311 182930 worker: Input select:    available, src MPD, out Pi HDMI 1
20240311 182930 worker: Bluetooth:       available, ALSA mode Default
20240311 182930 worker: AirPlay:         available
20240311 182930 worker: Spotify Connect: available
20240311 182930 worker: Squeezelite:     available
20240311 182930 worker: RoonBridge:      not installed
20240311 182930 worker: Multiroom:       available
20240311 182930 worker: UPnP client:     available
20240311 182930 worker: GPIO buttons:    available
20240311 182930 worker: HTTPS mode:      available
20240311 182930 worker: Stream recorder: n/a
20240311 182930 worker: --
20240311 182930 worker: -- Volume levels
20240311 182930 worker: --
20240311 182930 worker: Volume knob:   6
20240311 182930 worker: Saved MPD vol: -1
20240311 182930 worker: Saved SRC vol: 0
20240311 182930 worker: Mixer type:    null
20240311 182930 worker: Hdwr volume:   96%
20240311 182930 worker: CDSP volume:   -58.4dB
20240311 182930 worker: --
20240311 182930 worker: -- Peripherals
20240311 182930 worker: --
20240311 182931 worker: Local display:   off
20240311 182931 worker: On-screen kbd:   off
20240311 182931 worker: Rotary encoder:  off
20240311 182931 worker: USB volume knob: on
20240311 182931 worker: LCD updater:     off
20240311 182931 worker: --
20240311 182931 worker: -- Miscellaneous
20240311 182931 worker: --
20240311 182931 worker: Auto-CoverView:    off
20240311 182931 worker: CoverView timeout: Never
20240311 182931 worker: Auto-shuffle:      off
20240311 182931 worker: Auto-play:         off
20240311 182931 worker: Web SSH server:    off
20240311 182931 worker: Maintenance task:  360 mins
20240311 182931 worker: Current view:      reset to Playback
20240311 182931 worker: Session check:     ok
20240311 182931 worker: --
20240311 182931 worker: -- Startup complete
20240311 182931 worker: --
20240311 182931 worker: Mount monitor:    off
20240311 182931 worker: Radio monitor:    off
20240311 182931 worker: Watchdog monitor: started
20240311 182931 worker: Responsiveness:   Default
20240311 182931 worker: Ready
20240311 185834 worker: Job usb_volknob
20240311 185915 worker: Job btsvc
20240311 185935 worker: Job pairing_agent
20240311 185941 worker: Job airplaysvc
20240311 185945 worker: Job spotifysvc
20240311 190006 worker: Job airplaysvc
20240311 190551 worker: Job spotifysvc
20240311 190640 worker: Job spotifysvc
Reply
#2
I ran a quick test with a USB knob I had on hand and no issues.
https://www.amazon.com/gp/product/B01MV4...=UTF8&th=1

Maybe some issue with the particular USB knob that you are using?
The log show what appear to be 2 USB Audio devices
2:AudioHIGH | 3:AudioMID
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Here's the output of dmesg when I plug in the device (the last line is when unplugging):

Code:
[83849.665647] usb 1-1.3: new full-speed USB device number 6 using xhci_hcd
[83849.768095] usb 1-1.3: New USB device found, idVendor=8808, idProduct=6613, bcdDevice= 0.00
[83849.768114] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[83849.777061] input: HID 8808:6613 as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:8808:6613.0007/input/input7
[83849.834111] hid-generic 0003:8808:6613.0007: input,hidraw2: USB HID v1.11 Keyboard [HID 8808:6613] on usb-0000:01:00.0-1.3/input0
[83849.847018] input: HID 8808:6613 as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:8808:6613.0008/input/input8
[83849.853483] hid-generic 0003:8808:6613.0008: input,hidraw3: USB HID v1.10 Mouse [HID 8808:6613] on usb-0000:01:00.0-1.3/input1
[83849.868003] input: HID 8808:6613 Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.2/0003:8808:6613.0009/input/input9
[83849.926331] input: HID 8808:6613 as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.2/0003:8808:6613.0009/input/input10
[83849.926542] input: HID 8808:6613 Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.2/0003:8808:6613.0009/input/input11
[83849.926959] hid-generic 0003:8808:6613.0009: input,hiddev96,hidraw4: USB HID v1.10 Keyboard [HID 8808:6613] on usb-0000:01:00.0-1.3/input2
[83849.938927] usb 1-1.3: language id specifier not provided by device, defaulting to English
[83849.950974] hid-generic 0003:8808:6613.000A: hiddev97,hidraw5: USB HID v1.00 Device [HID 8808:6613] on usb-0000:01:00.0-1.3/input3
[83854.054253] usb 1-1.3: USB disconnect, device number 6
Reply
#4
Do you what these two audio devices are?

20240311 182926 worker: ALSA cards:   0:b1 | 1:Headphones | 2:AudioHIGH | 3:AudioMID

A USB volume knob should not be registering itself as 2 audio devices.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(03-12-2024, 10:10 PM)Tim Curtis Wrote: Do you what these two audio devices are?

20240311 182926 worker: ALSA cards:   0:b1 | 1:Headphones | 2:AudioHIGH | 3:AudioMID

A USB volume knob should not be registering itself as 2 audio devices.

If you look at the linked post in my intro thread, those are my USB DAC devices. I'm using CamillaDSP to send two stereo channels to a four channel amplifier. That part works fine.

They output sound as expected and digital volume control works as expected as well. It's only when I plug in the USB knob that things go bad.
Reply
#6
Does this occur when you use raspberry pi OS (bullseye)?

If it does, you should report this bug upstream and allow them to address it.
If not, it's useful to know that it's an issue caused by MoOde Audio's customizations.
Reply
#7
@fixjunk

Bit of a mystery what's happening with your controller.

I bought a Drok USB Volume Knob some years ago. Tim had already integrated triggerhappy into moOde and the Drok JustWorked™ when I plugged it in and enabled USB Volume knob in moOde (ca 2000). Much easier than the earlier hacking I had to do with various USB controls (my threads are still in FAQ and Guides section but now deprecated).

I haven't used it recently but I just tried it again and it still works. No unexpected behavior when I plug/unplug the Drok.

When I plug it in, I see very similar system messages to what you posted. Nothing jumps out of me.

Regards,
Kent
Reply
#8
(03-12-2024, 11:09 PM)fixjunk Wrote:
(03-12-2024, 10:10 PM)Tim Curtis Wrote: Do you what these two audio devices are?

20240311 182926 worker: ALSA cards:   0:b1 | 1:Headphones | 2:AudioHIGH | 3:AudioMID

A USB volume knob should not be registering itself as 2 audio devices.

If you look at the linked post in my intro thread, those are my USB DAC devices. I'm using CamillaDSP to send two stereo channels to a four channel amplifier. That part works fine.

They output sound as expected and digital volume control works as expected as well. It's only when I plug in the USB knob that things go bad.

Maybe the third USB device (the knob) is causing some sort of conflict or bandwidth issue on USB bus?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
(03-13-2024, 02:34 AM)Tim Curtis Wrote: Maybe the third USB device (the knob) is causing some sort of conflict or bandwidth issue on USB bus?

possibly but how do I debug that?
Reply
#10
(03-13-2024, 02:43 AM)fixjunk Wrote:
(03-13-2024, 02:34 AM)Tim Curtis Wrote: Maybe the third USB device (the knob) is causing some sort of conflict or bandwidth issue on USB bus?

possibly but how do I debug that?

Try the knob and one DAC?
----------------
Robert
Reply


Forum Jump: