2

recently upgraded my raspian, and installation of RPi with Hifiberry AMP.

and my python application that utilizes gstreamer's api is no longer working.

as a test to figure out why I am using the gst-launcher tool and have the follow results:

gst-launch-1.0 audiotestsrc ! autoaudiosink  <-- no audio
gst-launch-1.0 audiotestsrc ! alsasink <--- test tone is audible
gst-launch-1.0 playbin uri=file:///home/pi/Music/01\ Hello.mp3   <--- no audio
gst-launch-1.0 playbin uri=file:///home/pi/Music/01\ Hello.mp3 audio-sink=alsasink  <--- plays at mp3 file

my python application previously only setup the playbin pipeline. It would appear gstreamer can no longer automatically select the alsasink as the correct output.

I have set the /etc/asound.conf to:

pcm.!default {
  type hw card 0
}
ctl.!default {
  type hw card 0
}

and ~/.asoundrc to:

pcm.!default {
    type hw
    card 0
}

pcm.output {
    type hw
    card 0
}

ctl.!default {
    type hw
    card 0
}

pcm.input {
    type hw
    card 0
}

is there some other way to get the playbin pipeline to automatically select the alsasink output?

1 Answer 1

1

I had the same issue. Turned out it was because I have the packages gstreamer1.0-omx* installed, that include omxanalogaudiosink and omxhdmiaudiosink (audio via OMX chip without alsa involved):

gst-inspect-1.0 | grep -i audio | grep -i sink
omx:  omxanalogaudiosink: OpenMAX Analog Audio Sink
omx:  omxhdmiaudiosink: OpenMAX HDMI Audio Sink
autodetect:  autoaudiosink: Auto audio sink
alsa:  alsasink: Audio sink (ALSA)
...

They have a higher rank (and would be preferred) than alsaaudiosink:

gst-inspect-1.0 omxanalogaudiosink | grep -i rank
Rank                     primary + 1 (257)
gst-inspect-1.0 alsasink | grep -i rank
Rank                     primary (256)

So removing those packages should help.

(Using OMX sink I also got the error * failed to open vchiq instance)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.