jasonmc / forked-daapd

A re-write of the firefly media server (mt-daapd). It's released under GPLv2+. Please note that this git repository is a mirror of the official one at git://git.debian.org/~jblache/forked-daapd.git
http://blog.technologeek.org/2009/06/12/217
GNU General Public License v2.0
328 stars 45 forks source link

Unable to use USB audio device in Raspberry PI after reboot or click in GUI #125

Open HJKLMN opened 4 years ago

HJKLMN commented 4 years ago

What am I missing? When I change in (latest raspberry PI) my /usr/share/alsa/alsa.conf the settings:

defaults.ctl.card 0 defaults.pcm.card 0 to defaults.ctl.card 1 defaults.pcm.card 1

(this is supposed to set my usb audio device als default audio)

My audio is nicely default changed to the USB device: Also automagiccaly Forked-daapd starts using the USB device.

aplay -Ddefault piano2.wav plays my piano nicely.

When I reboot the device, or click on my computer in the GUI

I then get the error:

[2020-05-13 18:14:41] [ LOG] laudio: Failed to open PCM or Master mixer element [2020-05-13 18:14:41] [ LOG] laudio: Could not open mixer 'default' ('(null)') [2020-05-13 18:14:41] [ LOG] player: Could not start selected ALSA device 'Computer_HJ'

pi@raspberrypi:~ $ amixer Simple mixer control 'Master',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 65536 Mono: Front Left: Playback 56578 [86%] [on] Front Right: Playback 56578 [86%] [on] Simple mixer control 'Capture',0 Capabilities: cvolume cvolume-joined cswitch cswitch-joined Capture channels: Mono Limits: Capture 0 - 65536 Mono: Capture 26281 [40%] [on]

Changed config file:

Added in the audio section: type = "alsa" mixer = "Master" (tried also without)

[2020-05-13 18:28:53] [ LOG] laudio: Failed to open configured mixer element 'Master' [2020-05-13 18:28:53] [ LOG] laudio: Could not open mixer 'default' ('Master') [2020-05-13 18:28:53] [ LOG] player: Could not probe ALSA device 'Computer_HJ' [2020-05-13 18:28:53] [ LOG] player: Could not activate ALSA device 'Computer_HJ'

Also removed the USB device, Only leaving type = "alsa"
All works.

Update: Changing first to defaults.ctl.card 0 defaults.pcm.card 0 then to defaults.ctl.card 1 defaults.pcm.card 1

Makes my audio work, but when I click in the GUI, errors are coming back