plietar / librespot

Open Source Spotify client library
MIT License
1.13k stars 187 forks source link

HDMI sound only, never on jack (default rpi audio output) #249

Open CelsoSantos opened 6 years ago

CelsoSantos commented 6 years ago

I don't know if this is somehow related to #217 but for some reason I can't make audio output through jack on my RPi3 with latest OSMC installed. Only HDMI works.

I've tried running with --device hw:0 without success.

After some reading around, I've tried checking my output devices with aplay -L having the following output:

osmc@osmc:~/.kodi$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions

From this I've already tried a bunch of different configurations where the --device parameter will contain any of the names present in this list. I still can't make the sound output go through Jack.

How can I achieve this? It's really important to me to keep the TV off while playing music so I don't want to rely on HDMI for audio output as I have a set of speaker only for this.

awiouy commented 6 years ago

https://www.raspberrypi.org/documentation/configuration/audio-config.md Have you tried the following command: amixer cset numid=3 0

CelsoSantos commented 6 years ago

Hello @awiouy , Yes I have, I still only get HDMI sound :(

I'm using OSMC and I really don't see a way I can get the audio through the default jack to work unfortunately..

berrnd commented 6 years ago

Hi,

had the same problem ... for me the in the Raspberry Pi documentation referenced commands worked ... see my comment in dtcooper/raspotify#22.

jdelandtsheer commented 4 years ago

use raspi-config advanced settings > audio > force jack.

will only work for playing audio and not capturing (mic will not work)

AboFiras555 commented 4 years ago

Hi All I have same problem I can't get sound from Jack.. I do all above solution but the problem still, can any one help me. Plz