lukasjapan / bt-speaker

A simple Bluetooth Speaker Daemon for the Raspberry Pi 3
GNU General Public License v3.0
493 stars 94 forks source link

No Audio From external USB sound card #48

Closed mijorus closed 6 years ago

mijorus commented 6 years ago

Hi there, i'm getting no audio at all from my external sound card, the cardindex option seems to do nothing. That's my aplay -l card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] Subdevices: 7/7 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0

mijorus commented 6 years ago

EDIT: manage to get it working by replacing the play command with something like aplay --device sysdefault CARD=DEVICE -f cd you can get the card name by typing aplay -L and finally change the cardindex value with cardindex=1 from aplay -l

Mladia commented 5 years ago

It worked here. Thank you @mijorus Here is how my play_command looks like, if someone else is wondering

play_command = aplay -D plughw:CARD=Device,DEV=0 -f cd -
jhfdevelop commented 5 years ago

Had the same issue. Don't know if it is obvious that you have to set the "enable" property in the alsa section to "no".

m4rten commented 4 years ago

i dont know how to set the config file exactly ... if i enter "aplay -l" the following shows up:

**** Liste der Hardware-Geräte (PLAYBACK) **** Karte 0: ALSA [bcm2835 ALSA], Gerät 0: bcm2835 ALSA [bcm2835 ALSA] Sub-Geräte: 7/7 Sub-Gerät #0: subdevice #0 Sub-Gerät #1: subdevice #1 Sub-Gerät #2: subdevice #2 Sub-Gerät #3: subdevice #3 Sub-Gerät #4: subdevice #4 Sub-Gerät #5: subdevice #5 Sub-Gerät #6: subdevice #6 Karte 0: ALSA [bcm2835 ALSA], Gerät 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI] Sub-Geräte: 1/1 Sub-Gerät #0: subdevice #0 Karte 0: ALSA [bcm2835 ALSA], Gerät 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1] Sub-Geräte: 1/1 Sub-Gerät #0: subdevice #0 Karte 1: Set [C-Media USB Headphone Set], Gerät 0: USB Audio [USB Audio] Sub-Geräte: 1/1 Sub-Gerät #0: subdevice #0

How does my play_command have to look like then ?

m4rten commented 4 years ago

aaa hgot it !! :) play_command = aplay -D plughw:CARD=1,DEV=0 -f cd - works and sounds GREAT !! thx lukas for all your effort 👍 👍 👍