I cannot get gstreamer on raspbian (buster) to play through a
usb-audio device, despite other players (vlc, aplay) being able to do
so. but i need gstreamer because of its API access, for
this post is related to many others i've found (listed below), but i've exhausted the resources mentioned there, so i and want to report on experiments i've done, still without success.
Following suggestions here i find:
Bus 001 Device 005: ID 0781:558c SanDisk Corp. Bus 001 Device 004: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
**** List of PLAYBACK Hardware Devices **** 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 IEC958/HDMI [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0
0 snd_bcm2835 1 snd_usb_audio
0 [ALSA ]: bcm2835_alsa - bcm2835 ALSA bcm2835 ALSA 1 [Device ]: USB-Audio - USB PnP Sound Device USB PnP Sound Device at usb-3f980000.usb-1.2, full speed
and so i've editted my
/usr/share/alsa/alsa.conf to look like:
defaults.ctl.card 1 # 0 defaults.pcm.card 1 # 0
The image below captures my understanding of the various alternative paths from sound files to audio output.
(i see mentions of pulseaudio around others; does it impact gstreamer? should i include it in the picture?)
i've tried 7 different experiments, and also varied touchscreen vs. HDMI display options. Result summary:
vlc experiments show that it is able to get to usb-audio in both
aplay with the touchscreen is also able to send sound to
usb-audio. (my current guess is that aplay is missing some
and barfing out noise?)
clearly there are lower-level (kernel? raspbian?) resource paths that
i don't know about. how can i make gstreamer consume whatever
resource it is that
vlc and `aplay are able to use to get to usb-audio?