GNOME Bugzilla – Bug 680904
alsasink: no supported formats detected with using USB sound card on big-endian system
Last modified: 2013-05-22 02:18:59 UTC
Created attachment 219977 [details] debug level 5 when play wav file my gstreamer version has installed successfully: gstreamer-0.10.36 gst-plugins-base-0.10.36 gst-plugins-good-0.10.31 gst-plugins-ugly-0.10.19 When I try to play wav audio to usb sound card, it is fail, the command I used : gst-launch-0.10 -v filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! audioconvert !audio/x-raw-int, rate=48000,channels=2,width=16,endianness=4321 ! alsasink device="hw:0,0" the error is : streaming task paused, reason not-linked (-1) the error message is: # # # # gst-launch-0.10 -v filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! aud ioconvert !audio/x-raw-int, rate=48000,channels=2,width=16,endianness=4321 ! als asink device="hw:0,0" Setting pipeline to PAUSED ... conf.c:snd_config_update_r:3661, configs=/usr/share/alsa/alsa.conf conf.c:snd_config_update_r:3686, name=/usr/share/alsa/alsa.conf conf.c:snd_config_update_r:3700, lf->name=/usr/share/alsa/alsa.conf ** (gst-launch-0.10:1188): WARNING **: gstwavparse.c, gst_wavparse_stream_data,1836 ** (gst-launch-0.10:1188): WARNING **: offset: 44 , end: 960044 , dataleft: 960000 ** (gst-launch-0.10:1188): WARNING **: Fetching 7680 bytes of data from the sinkpad Pipeline is PREROLLING ... conf.c:snd_config_update_r:3661, configs=/usr/share/alsa/alsa.conf conf.c:snd_config_update_r:3686, name=/usr/share/alsa/alsa.conf conf.c:snd_config_update_r:3700, lf->name=/usr/share/alsa/alsa.conf conf.c:snd_config_update_r:3661, configs=/usr/share/alsa/alsa.conf conf.c:snd_config_update_r:3686, name=/usr/share/alsa/alsa.conf conf.c:snd_config_update_r:3700, lf->name=/usr/share/alsa/alsa.conf ** (gst-launch-0.10:1188): WARNING **: gstwavparse.c, gst_wavparse_loop,2074 ERROR: from element /GstPipeline:pipeline0/GstWavParse:wavparse0: Internal data flow error. Additional debug info: gstwavparse.c(2122): gst_wavparse_loop (): /GstPipeline:pipeline0/GstWavParse:wavparse0: streaming task paused, reason not-linked (-1) ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... /GstPipeline:pipeline0/GstWavParse:wavparse0.GstPad:src: caps = NULL Freeing pipeline ... #
I have try to play the same wav file by "aplay". It is OK. It proves USB sound card is OK in my taret # aplay -v -f S16_LE -c 2 -r 48000 -D default /bin/audio_src_48k_le.wav Hardware PCM card 0 'USB AUDIO ' device 0 subdevice 0 Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 16 buffer_size : 24000 period_size : 6000 period_time : 125000 tstamp_mode : NONE period_step : 1 avail_min : 6000 period_event : 0 start_threshold : 24000 stop_threshold : 24000 silence_threshold: 0 silence_size : 0 boundary : 1572864000 appl_ptr : 0 hw_ptr : 0 #
after tracing the wavparse code, the error is caused by gst_wavparse_stream_data (GstWavParse * wav) about line 1997, gst_pad_push get error, if ((res = gst_pad_push (wav->srcpad, buf)) != GST_FLOW_OK) goto push_error; Does anyone have idea about how to debug this kind of error? Why USB Audio device cause this kind of error?
my sound card is Tenx Technology, Inc. TP6911 Audio Headset Does anyone encounter the same problem?
Could you kindly give some hints about the nego fail issue? the log below I summary the fail progress, I was confused about "caps are notcompatible". it obviously has got "wavparse_src" and "audioconvert sink" . And It also trying to link wavparse0:src and audioconvert0:sink. Why it get incompatible pads during negotiation? I just see many "get pad caps", it is not clear about what happen in negotiation progess. ======================================================== # gst-launch-0.10 --gst-debug-no-color --gst-debug-level=5 filesrc location=/var /tmp/usb/sda1/audio_src/1503-9_48K.wav ! wavparse ! audioconvert ! audio/x-raw-i nt, rate=48000,channels=2,width=16,endianness=1234 ! alsasink device="hw:0,0" GST_PADS gstpad.c:1639:gst_pad_set_getcaps_function:<'':src> getcapsfunc set to gst_pad_get_fixed_caps_func GST_PADS gstpad.c:1452:gst_pad_set_query_type_function:<'':src> querytypefunc set to gst_wavparse_get_query_types GST_PADS gstpad.c:1433:gst_pad_set_query_function:<'':src> queryfunc set to gst_wavparse_pad_query GST_PADS gstpad.c:1415:gst_pad_set_event_function:<'':src> eventfunc for set to gst_wavparse_srcpad_event wavparse gstwavparse.c:281:gst_wavparse_create_sourcepad:<wavparse0> srcpad created GST_PADS gstpad.c:710:gst_pad_set_active:<'':src> activating pad from none GST_PADS gstpad.c:910:gst_pad_activate_push:<'':src> trying to set activated in push mode GST_PADS gstpad.c:930:gst_pad_activate_push:<'':src> activating pad from none GST_PADS gstpad.c:632:pre_activate:<'':src> setting ACTIVATE_MODE 1, unset flushing GST_PADS gstpad.c:966:gst_pad_activate_push:<'':src> activated in push mode GST_CAPS gstpad.c:2741:gst_pad_set_caps:<'':src> caps 0x47c5c0 0x47c5c0 GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<wavparse0> adding pad 'src' GST_REFCOUNTING gstobject.c:844:gst_object_set_parent:<'':src> set parent (ref and sink) GST_PIPELINE ./grammar.y:496:gst_parse_found_pad: trying delayed linking wavparse0:(NULL) to audioconvert0:(NULL) GST_ELEMENT_PADS gstutils.c:1698:gst_element_link_pads_full: trying to link element wavparse0:(any) to element audioconvert0:(any) GST_ELEMENT_PADS gstutils.c:1787:gst_element_link_pads_full: looping through allowed src and dest pads GST_ELEMENT_PADS gstutils.c:1790:gst_element_link_pads_full: trying src pad wavparse0:src GST_ELEMENT_PADS gstutils.c:1101:gst_element_get_compatible_pad: finding pad in audioconvert0 compatible with wavparse0:src GST_ELEMENT_PADS gstutils.c:1130:gst_element_get_compatible_pad: examining pad audioconvert0:sink GST_PADS gstutils.c:1032:gst_pad_check_link: trying to link wavparse0:src and audioconvert0:sink GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<wavparse0:src> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<wavparse0:src> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<wavparse0:src> dispatching to pad getcaps function GST_CAPS gstutils.c:2469:gst_pad_get_fixed_caps_func: using pad caps 0x47c5c0 0x47c5c0 GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<wavparse0:src> pad getcaps returned 0x47c5c0 GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<audioconvert0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<audioconvert0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<audioconvert0:sink> dispatching to pad getcaps function GST_CAPS gstpad.c:2396:gst_pad_peer_get_caps_reffed:<audioconvert0:src> get peer caps GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<capsfilter0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<capsfilter0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<capsfilter0:sink> dispatching to pad getcaps function GST_CAPS gstpad.c:2396:gst_pad_peer_get_caps_reffed:<capsfilter0:src> get peer caps GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<alsasink0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<alsasink0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<alsasink0:sink> dispatching to pad getcaps function alsa gstalsa.c:124:gst_alsa_detect_formats:<alsasink0> skipping non-int format alsa gstalsa.c:124:gst_alsa_detect_formats:<alsasink0> skipping non-int format alsa gstalsa.c:124:gst_alsa_detect_formats:<alsasink0> skipping non-int format alsa gstalsa.c:124:gst_alsa_detect_formats:<alsasink0> skipping non-int format alsa gstalsa.c:30:gst_alsa_detect_rates:<alsasink0> probing sample rates ... alsa gstalsa.c:49:gst_alsa_detect_rates:<alsasink0> Min. rate = 48000 (48000) alsa gstalsa.c:50:gst_alsa_detect_rates:<alsasink0> Max. rate = 48000 (48000) alsa gstalsa.c:265:gst_alsa_detect_channels:<alsasink0> probing channels ... alsa gstalsa.c:309:gst_alsa_detect_channels:<alsasink0> Min. channels = 2 (2) alsa gstalsa.c:310:gst_alsa_detect_channels:<alsasink0> Max. channels = 2 (2) alsa gstalsa.c:389:gst_alsa_open_iec958_pcm:<alsasink0> Generated device string "hw:0,0:{AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02}" alsa conf.c:4604:parse_args: alsalib error: Parameter DEV must be an integer alsa conf.c:4709:snd_config_expand: alsalib error: Parse arguments error: Invalid argument alsa pcm.c:2217:snd_pcm_open_noupdate: alsalib error: Unknown PCM hw:0,0:{AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02} alsa gstalsa.c:395:gst_alsa_open_iec958_pcm:<alsasink0> failed opening IEC958 device: Invalid argument alsa gstalsasink.c:341:gst_alsasink_getcaps:<alsasink0> returning caps 0x49cee0 GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<alsasink0:sink> pad getcaps returned 0x49cee0 basetransform gstbasetransform.c:736:gst_base_transform_getcaps:<capsfilter0:sink> peer caps 0x49cee0 basetransform gstbasetransform.c:740:gst_base_transform_getcaps:<capsfilter0:sink> our template 0x47da40 basetransform gstbasetransform.c:742:gst_base_transform_getcaps:<capsfilter0:sink> intersected 0x49ce80 basetransform gstbasetransform.c:552:gst_base_transform_transform_caps:<capsfilter0> transform caps (direction = 1) basetransform gstbasetransform.c:583:gst_base_transform_transform_caps:<capsfilter0> merged: (0) basetransform gstbasetransform.c:597:gst_base_transform_transform_caps:<capsfilter0> to: (0) 0x49ce40 basetransform gstbasetransform.c:752:gst_base_transform_getcaps:<capsfilter0:sink> transformed 0x49ce40 basetransform gstbasetransform.c:759:gst_base_transform_getcaps:<capsfilter0:sink> our template 0x47d960 basetransform gstbasetransform.c:762:gst_base_transform_getcaps:<capsfilter0:sink> intersected 0x49cdc0 basetransform gstbasetransform.c:778:gst_base_transform_getcaps:<capsfilter0> returning 0x49cdc0 GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<capsfilter0:sink> pad getcaps returned 0x49cdc0 basetransform gstbasetransform.c:736:gst_base_transform_getcaps:<audioconvert0:sink> peer caps 0x49cdc0 basetransform gstbasetransform.c:740:gst_base_transform_getcaps:<audioconvert0:sink> our template 0x46c4e0 basetransform gstbasetransform.c:742:gst_base_transform_getcaps:<audioconvert0:sink> intersected 0x49cd20 basetransform gstbasetransform.c:552:gst_base_transform_transform_caps:<audioconvert0> transform caps (direction = 1) basetransform gstbasetransform.c:583:gst_base_transform_transform_caps:<audioconvert0> merged: (0) basetransform gstbasetransform.c:597:gst_base_transform_transform_caps:<audioconvert0> to: (0) 0x49cce0 basetransform gstbasetransform.c:752:gst_base_transform_getcaps:<audioconvert0:sink> transformed 0x49cce0 basetransform gstbasetransform.c:759:gst_base_transform_getcaps:<audioconvert0:sink> our template 0x455300 basetransform gstbasetransform.c:762:gst_base_transform_getcaps:<audioconvert0:sink> intersected 0x49cbc0 basetransform gstbasetransform.c:778:gst_base_transform_getcaps:<audioconvert0> returning 0x49cbc0 GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<audioconvert0:sink> pad getcaps returned 0x49cbc0 GST_ELEMENT_PADS gstutils.c:1167:gst_element_get_compatible_pad: incompatible pads GST_ELEMENT_PADS gstutils.c:1173:gst_element_get_compatible_pad: unreffing pads GST_ELEMENT_PADS gstutils.c:1195:gst_element_get_compatible_pad:<audioconvert0> Could not find a compatible unlinked always pad to link to wavparse0:src, now checking request pads GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<wavparse0:src> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<wavparse0:src> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<wavparse0:src> dispatching to pad getcaps function GST_CAPS gstutils.c:2469:gst_pad_get_fixed_caps_func: using pad caps 0x47c5c0 0x47c5c0 GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<wavparse0:src> pad getcaps returned 0x47c5c0 GST_ELEMENT_PADS gstutils.c:894:gst_element_get_compatible_pad_template: Looking for a suitable pad template in audioconvert0 out of 2 templates... GST_CAPS gstutils.c:905:gst_element_get_compatible_pad_template: checking pad template src GST_CAPS gstutils.c:905:gst_element_get_compatible_pad_template: checking pad template sink GST_CAPS gstutils.c:910:gst_element_get_compatible_pad_template: compatible direction: found sink pad template "sink" GST_CAPS gstutils.c:913:gst_element_get_compatible_pad_template: intersecting 0x49cc00 GST_CAPS gstutils.c:915:gst_element_get_compatible_pad_template: ..and 0x455300 GST_CAPS gstutils.c:921:gst_element_get_compatible_pad_template: caps are compatible GST_ELEMENT_PADS gstutils.c:933:gst_element_get_compatible_pad_template: Returning new pad template 0x465188 GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad audioconvert0:sink GST_ELEMENT_PADS gstutils.c:1210:gst_element_get_compatible_pad: found existing request pad audioconvert0:sink GST_PADS gstutils.c:1596:prepare_link_maybe_ghosting: wavparse0 and audioconvert0 in same bin, no need for ghost pads GST_MESSAGE gstmessage.c:185:gst_message_init: new message 0x465740 GST_MESSAGE gstmessage.c:274:gst_message_new_custom: source sink: creating new message 0x465740 structure-change GST_BUS gstbus.c:308:gst_bus_post:<bus0> [msg 0x465740] posting on bus, type structure-change, 0x49c278 from source 0x4681a0 bin gstbin.c:3225:gst_bin_handle_message_func:<pipeline0> [msg 0x465740] handling child sink message of type structure-change bin gstbin.c:883:message_check: looking at message 0x465470: 0 bin gstbin.c:905:find_message:<pipeline0> no message found matching types 00001000 bin gstbin.c:912:find_message:<pipeline0> structure-change bin gstbin.c:952:bin_replace_message:<pipeline0> got new message 0x465740, structure-change from sink GST_BUS gstbus.c:334:gst_bus_post:<bus0> [msg 0x465740] dropped GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link wavparse0:src and audioconvert0:sink GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<wavparse0:src> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<wavparse0:src> dispatching to pad getcaps function GST_CAPS gstutils.c:2469:gst_pad_get_fixed_caps_func: using pad caps 0x47c5c0 0x47c5c0 GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<wavparse0:src> pad getcaps returned 0x47c5c0 GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<audioconvert0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<audioconvert0:sink> dispatching to pad getcaps function GST_CAPS gstpad.c:2396:gst_pad_peer_get_caps_reffed:<audioconvert0:src> get peer caps GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<capsfilter0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<capsfilter0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<capsfilter0:sink> dispatching to pad getcaps function GST_CAPS gstpad.c:2396:gst_pad_peer_get_caps_reffed:<capsfilter0:src> get peer caps GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<alsasink0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<alsasink0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<alsasink0:sink> dispatching to pad getcaps function alsa gstalsasink.c:326:gst_alsasink_getcaps:<alsasink0> Returning cached caps GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<alsasink0:sink> pad getcaps returned 0x49cee0 basetransform gstbasetransform.c:729:gst_base_transform_getcaps:<capsfilter0> Returning cached transformed caps (index = 1) GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<capsfilter0:sink> pad getcaps returned 0x49cdc0 basetransform gstbasetransform.c:729:gst_base_transform_getcaps:<audioconvert0> Returning cached transformed caps (index = 1) GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<audioconvert0:sink> pad getcaps returned 0x49cbc0 GST_CAPS gstpad.c:1878:gst_pad_link_check_compatible_unlocked:<wavparse0:src> src caps 0x47c5c0 GST_CAPS gstpad.c:1880:gst_pad_link_check_compatible_unlocked:<audioconvert0:sink> sink caps 0x49cbc0 GST_CAPS gstpad.c:1898:gst_pad_link_check_compatible_unlocked: caps are notcompatible GST_PADS gstpad.c:2034:gst_pad_link_prepare: caps are incompatible GST_MESSAGE gstmessage.c:185:gst_message_init: new message 0x465788 GST_MESSAGE gstmessage.c:274:gst_message_new_custom: source sink: creating new message 0x465788 structure-change GST_BUS gstbus.c:308:gst_bus_post:<bus0> [msg 0x465788] posting on bus, type structure-change, 0x49c290 from source 0x4681a0 bin gstbin.c:3225:gst_bin_handle_message_func:<pipeline0> [msg 0x465788] handling child sink message of type structure-change bin gstbin.c:883:message_check: looking at message 0x465740: 1 bin gstbin.c:980:bin_remove_messages:<audioconvert0:sink> deleting message 0x465740 of types 0x00001000 GST_MESSAGE gstmessage.c:195:gst_message_finalize: finalize message 0x465740, structure-change from sink bin gstbin.c:883:message_check: looking at message 0x465470: 0 bin gstbin.c:986:bin_remove_messages:<alsasink0> not deleting message 0x465470 of type 0x00100000 GST_MESSAGE gstmessage.c:195:gst_message_finalize: finalize message 0x465788, structure-change from sink GST_BUS gstbus.c:334:gst_bus_post:<bus0> [msg 0x465788] dropped GST_ELEMENT_PADS gstutils.c:1790:gst_element_link_pads_full: trying src pad wavparse0:sink GST_ELEMENT_PADS gstutils.c:1842:gst_element_link_pads_full: trying dest pad audioconvert0:src GST_ELEMENT_PADS gstutils.c:1842:gst_element_link_pads_full: trying dest pad audioconvert0:sink GST_ELEMENT_PADS gstutils.c:1101:gst_element_get_compatible_pad: finding pad in wavparse0 compatible with audioconvert0:sink ST_ELEMENT_PADS gstutils.c:1130:gst_element_get_compatible_pad: examining pad wavparse0:src GST_PADS gstutils.c:1032:gst_pad_check_link: trying to link wavparse0:src and audioconvert0:sink GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<audioconvert0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<audioconvert0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<audioconvert0:sink> dispatching to pad getcaps function GST_CAPS gstpad.c:2396:gst_pad_peer_get_caps_reffed:<audioconvert0:src> get peer caps GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<capsfilter0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<capsfilter0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<capsfilter0:sink> dispatching to pad getcaps function GST_CAPS gstpad.c:2396:gst_pad_peer_get_caps_reffed:<capsfilter0:src> get peer caps GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<alsasink0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<alsasink0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<alsasink0:sink> dispatching to pad getcaps function alsa gstalsasink.c:326:gst_alsasink_getcaps:<alsasink0> Returning cached caps GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<alsasink0:sink> pad getcaps returned 0x49cee0 basetransform gstbasetransform.c:729:gst_base_transform_getcaps:<capsfilter0> Returning cached transformed caps (index = 1) GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<capsfilter0:sink> pad getcaps returned 0x49cdc0 basetransform gstbasetransform.c:729:gst_base_transform_getcaps:<audioconvert0> Returning cached transformed caps (index = 1) GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<audioconvert0:sink> pad getcaps returned 0x49cbc0 GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<wavparse0:src> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<wavparse0:src> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<wavparse0:src> dispatching to pad getcaps function GST_CAPS gstutils.c:2469:gst_pad_get_fixed_caps_func: using pad caps 0x47c5c0 0x47c5c0 GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<wavparse0:src> pad getcaps returned 0x47c5c0 GST_ELEMENT_PADS gstutils.c:1167:gst_element_get_compatible_pad: incompatible pads GST_ELEMENT_PADS gstutils.c:1173:gst_element_get_compatible_pad: unreffing pads GST_ELEMENT_PADS gstutils.c:1195:gst_element_get_compatible_pad:<wavparse0> Could not find a compatible unlinked always pad to link to audioconvert0:sink, now checking request pads GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<audioconvert0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<audioconvert0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<audioconvert0:sink> dispatching to pad getcaps function GST_CAPS gstpad.c:2396:gst_pad_peer_get_caps_reffed:<audioconvert0:src> get peer caps GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<capsfilter0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<capsfilter0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<capsfilter0:sink> dispatching to pad getcaps function GST_CAPS gstpad.c:2396:gst_pad_peer_get_caps_reffed:<capsfilter0:src> get peer caps GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<alsasink0:sink> get pad caps GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<alsasink0:sink> get pad caps GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<alsasink0:sink> dispatching to pad getcaps function alsa gstalsasink.c:326:gst_alsasink_getcaps:<alsasink0> Returning cached caps GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<alsasink0:sink> pad getcaps returned 0x49cee0 basetransform gstbasetransform.c:729:gst_base_transform_getcaps:<capsfilter0> Returning cached transformed caps (index = 1) GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<capsfilter0:sink> pad getcaps returned 0x49cdc0 basetransform gstbasetransform.c:729:gst_base_transform_getcaps:<audioconvert0> Returning cached transformed caps (index = 1) GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<audioconvert0:sink> pad getcaps returned 0x49cbc0 GST_ELEMENT_PADS gstutils.c:894:gst_element_get_compatible_pad_template: Looking for a suitable pad template in wavparse0 out of 2 templates... GST_CAPS gstutils.c:905:gst_element_get_compatible_pad_template: checking pad template wavparse_sink GST_CAPS gstutils.c:905:gst_element_get_compatible_pad_template: checking pad template wavparse_src GST_CAPS gstutils.c:910:gst_element_get_compatible_pad_template: compatible direction: found src pad template "wavparse_src" GST_CAPS gstutils.c:913:gst_element_get_compatible_pad_template: intersecting 0x49ce40 GST_CAPS gstutils.c:915:gst_element_get_compatible_pad_template: ..and 0x455120 GST_CAPS gstutils.c:921:gst_element_get_compatible_pad_template: caps are not compatible GST_ELEMENT_PADS gstutils.c:935:gst_element_get_compatible_pad_template: No compatible pad template found GST_ELEMENT_PADS gstutils.c:1216:gst_element_get_compatible_pad:<wavparse0> Could not find a compatible pad to link to audioconvert0:sink GST_ELEMENT_PADS gstutils.c:1884:gst_element_link_pads_full: we might have request pads on both sides, checking... GST_ELEMENT_PADS gstutils.c:1927:gst_element_link_pads_full: no link possible from wavparse0 to audioconvert0 default gstutils.c:2037:gst_element_link_pads_filtered: Could not link pads: wavparse0:(null) - audioconvert0:(null) =========================================================
Please don't paste long debug logs as comment into the bug report. That's very hard to read. Attach the debug log to the bug please.
Hi Sir, I have attached the log file. But it includes a lot of log data, it seems no body would like to check the much log data. I just cut the part about link error and commit. I am sorry. I have this problem for a long time. It is very appreciated for your imput! Best regards, Soho.
Ah, I thought the log was for the not-linked error, and you had moved on to a not-negotiated error now.
Hi Sir, there are 2 error when I use usb sound card. 1. not-link error , it occur when I play .wav file 2. not-negotiated error, it occur when I play .mp3 file. In this bug, I report the error is "not-link" error. I also post the question on gstreamer-devel about not-negotiated error. Both errors occur when usb sound card is used. there are no any help about this kind error. It is very strange, why usb sound card can not get pass in caps-nego progress. Best Regards, Soho
Could you make the first MB or so of that .wav file available? $ head -bytes=1000k foo.wav > head.wav then attach head.wav to this bug report please. It looks like that .wav file may not contain PCM data, but some encoded data (seeing that some typefinder returns a result of fairly high probability - unfortunately we can't see which though because your libc doesn't support printf extensions, so the caps don't get printed as strings).
Hi Sir, My test wav is less 1MB. It is saved by Adobe Audition 1.5, 5 seconds only. I will attach the wav file in next. Thanks!
Created attachment 220429 [details] test wav file for usb sound card this is the test wav file that saved by Adobe Audition 1.5.
Could you try this please? gst-launch-0.10 -v filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! audioconvert ! audioresample ! alsasink or even gst-launch-0.10 -v playbin2 uri=file:///bin/audio_src_48k_le.wav Does it work?
Hi, Sir after add some g_warning message to trace the flow, gstutils.c, gst_element_get_compatible_pad, about line 1155, call gstcaps.c, gst_caps_can_intersect, then , line 1254 , CAPS_IS_EMPTY (caps1) is true. The other case, gstpad.c, gst_pad_link_check_compatible_unlocked, about line 1892 call gstcaps.c, gst_caps_can_intersect, then , line 1254 , CAPS_IS_EMPTY (caps2) is true. Then, it's always gstpad.c, gst_pad_link_prepare, line 1997, goto no_format and Both gst-launch-0.10 -v filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! audioconvert ! audioresample ! alsasink and gst-launch-0.10 -v playbin2 uri=file:///bin/audio_src_48k_le.wav have not-linked error Do you have idea? Thanks!
Hi Sir, Keep tracing the flow by put message when running gst-launch for wav file. In wavparse, I get the caps of src: riff-media.c, gst_riff_create_audio_caps(), caps=0x47c420, len=1 and the message below say the other pad (sink) has empty caps: gstutils.c, gst_element_get_compatible_pad, line 1130 ,says "examining pad audioconvert0:sink" gstutils.c gst_element_get_compatible_pad(), line 1141, call gst_pad_check_link then in gstutils.c, gst_pad_check_link(), it says "trying to link wavparse0:src and audioconvert0:sink" then in gstutils.c, gst_pad_get_fixed_caps_func(), line 2469 ,says "using pad caps 0x47c420" then in gstutils.c, gst_element_get_compatible_pad(), line 1155, call gst_caps_intersect then in gstcaps.c, gst_caps_can_intersect, it says: caps1=0x498660 CASE EMPTY !caps1->flags & GST_CAPS_FLAGS_ANY, caps1->flags=0x0 caps1->structs->len=0 ===================>this indicates the caps of sink pad is empty (audioconvert0:sink) Do you have any idea? thanks Soho
No, it means that the caps of the pads are not compatible (the intersection is empty). Which pipeline are you debugging exactly now? I hope not the one with your capsfilter, because that looked broken (the endianness field).
the command "gst-launch" I used to test: ========================================================================= gst-launch-0.10 filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! audioconvert ! alsasink device="hw:0,0" ========================================================================= I doubt whether the endian is wrong on my target platform. Because I have try the command above. There is no error on x86 platform. My target platform in big endian. And from the log that I modify code by add g_warning(). I can see the result: finding pad in wavparse0 compatible with filesrc0:src ===> OK finding pad in alsasink0 compatible with audioconvert0:src ===>OK But : finding pad in wavparse0 compatible with audioconvert0:sink ===>Fail, Could not find a compatible unlinked always pad to link to audioconvert0:sink from gst-launch command , I do not set any capsfilter, Is there any thing wrong? Thanks Soho
What is the output of: $ gst-inspect-0.10 audioconvert on your target platform?
Created attachment 220547 [details] gst-inspect-0.10 audioconvert output this is the log from gst-inspect-0.10 audioconvert. in audio/x-raw-int, audioconvert should support the caps, right?
Created attachment 220548 [details] gst-inspect-0.10 wavparse output the output from wavparse. it seems the caps should find a suitable configuration, right?
Hi Sir, Could you kinldy guide me how to dump caps information in gstutils.c gst_element_get_compatible_pad (GstElement * element, GstPad * pad,const GstCaps * caps) in while loop, how to dump the caps information , like the data: SINK template: 'sink' Availability: Always Capabilities: audio/x-raw-float rate: [ 1, 2147483647 ] channels: [ 1, 2147483647 ] endianness: { 1234, 4321 } width: 64 audio/x-raw-float rate: [ 1, 2147483647 ] channels: [ 1, 2147483647 ] endianness: { 1234, 4321 } width: 32 audio/x-raw-int rate: [ 1, 2147483647 ] channels: [ 1, 2147483647 ] endianness: { 1234, 4321 } width: 32 depth: [ 1, 32 ] signed: { true, false }
You can use g_printerr ("CAPS: %s", gst_caps_to_string(caps)) to print the string (leaks though, but if it's just for debugging it doesn't matter I guess). This works fine on my big-endian powerbook with the latest versions btw, so we'd really need to see the exact caps to figure out what's going on I think.
Created attachment 220631 [details] 0808_audioconvert0_src_to_alsasink0_sink log data about 0808 audioconvert0:src to alsasink0:sink (the line number may not match your code.)
Created attachment 220632 [details] 0808_wavparse0_src_to_audioconvert0_sink.log 0808_wavparse0:src to audioconvert0:sink log data about wavparse0:src to audioconvert0:sink (the line number may not match your code)
Hi Tim, from the log data, I can see the wavparse caps is : riff-media.c, gst_riff_create_audio_caps, 1766, caps=0x47c420, len=1 wavparse src CAPS: audio/x-raw-int, endianness=(int)1234, channels=(int)2, width=(int)16, depth=(int)16, signed=(boolean)true, rate=(int)48000 but when pavparse start to parse wav data, try to link to audioconvert sink, it can not find the suitable caps, the cause is "EMPTY", the reason of EMPTY: caps1->flags & GST_CAPS_FLAGS_ANY==NULL caps1->structs->len=0 I do not know why the caps found to link to wavparse:src is EMPTY? Do you have idea? As my understanding, the caps found to link to wavparse:src should include some data, like mime type, endianness, channels,etc..... why it is empty?
Hi Tim, I trace to in advance, the log ========================================================================= gstutils.c, gst_element_get_compatible_pad, assign temp to intersection gstutils.c, gst_element_get_compatible_pad, call gst_pad_get_caps_reffed gstpad.c, gst_pad_get_caps_unlocked, dispatching to pad (audioconvert0:sink) getcaps function gstpad.c, gst_pad_get_caps_unlocked, dispatching to pad(alsasink0:sink) getcaps function gstbasesink.c, gst_base_sink_pad_getcaps, pad(alsasink0:sink), Returning caps 0x4a5760 gstbasesink.c, gst_base_sink_pad_getcaps, result CAPS: From gst_base_sink_pad_getcaps return: EMPTY gstpad.c, gst_pad_get_caps_unlocked, pad(alsasink0:sink) getcaps returned 0x4a5760 gstpad.c, gst_pad_get_caps_unlocked, result CAPS: From gst_pad_get_caps_unlocked return: EMPTY gstpad.c, gst_pad_get_caps_unlocked, pad(audioconvert0:sink) getcaps returned 0x4a5660 gstpad.c, gst_pad_get_caps_unlocked, result CAPS: From gst_pad_get_caps_unlocked return: EMPTY =========================================================================== from gst_base_sink_pad_getcaps() return the caps is EMPTY for both alsasink0:sink and audioconvert0:sink such that the caps is EMPTY.
Hi Tim, I am confused about: When I use "gst-inspect audioconvert" to check the caps, I can see a list that audioconvert supported. But from gst_base_sink_pad_getcaps() returns EMPTY caps, It seems does not consistency. Could you kindly help to explain the whys and wherefores? Thanks! Soho
It's hard for us to debug this, since your debug log doesn't print caps properly (due to your libc not supporting printf extensions presumably). if gst_base_sink_pad_getcaps() returns EMPTY, that would indicate that there's an issue with your alsa driver. Check the GST_DEBUG=*alsa*:9 debug log to see what formats are detected/probed as supported.
due to your libc not supporting printf extensions presumably ===>Could you explain more detail? maybe I can re-config my libc to support this request? how about the example? About alsa part, Let me do the test in advance!
Created attachment 220659 [details] new log data with alsa:9 Hi Tim, One question: why the link audioconvert0:src to alsasink0:sink is OK? from the log file I attached "0808_audioconvert0_src_to_alsasink0_sink", I can see the caps supported by alsasink:sink. Why the link wavparse0:src to audioconvert0:sink is related to alsasink?
If this is really the only output from _detect_formats() alsa gstalsa.c:124:gst_alsa_detect_formats:<alsasink0> skipping non-int format then it looks like your driver/device only supports non-int formats? The reason it links fine is that it links in NULL state when the device is not open yet, but by the time wavparse wants to link to audioconvert ! alsasink, the alsa device has been opened and the actually supported caps are probed (vs. just the sink's template caps used).
Hi Tim, But I can play the wav file by "aplay" normally. the alsa utility version is 1.0.25 alsa lib version is 1.0.25 the linux kernel is 2.6.30, the version of alsa driver built in kernel is not sure. Do you mean alsa driver(usb audio) in kernel should support audio/x-raw-int, right? As my understanding, audio/x-raw-int is mime type, ALSA does not care this part ,right? Thanks Soho
There could be many reasons, perhaps aplay opens another device by default than alsasink, tried with device=hw:0 ?
Hi Tim, device=hw:0 has been tested. the same result.
Hi Tim, I do more test. test I. I checkout alsa kernel dirver(tag v2.6.34) from http://git.alsa-project.org/?p=alsa-driver.git and update sound part of kernel to my code base. then do the pipeline test gst-launch-0.10 filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! audioconvert ! alsasink device="hw:0,0" I can see skipping non-int format log from alsasink,it still get not-linked error test II. I change to another platform. the platform has I2S audio device only, no usb audio, I can see skipping non-int format log from alsasink. But the platform can play normally, the difference between 2 platform is audio device, one in usb ,and the other is I2S , usb is fail, I2S works fine, Currently, I must fix problem for usb platform. Since It seems does not have a lot of time duration for this issue. Do you have any idea for debugging? the previous question about libc: due to your libc not supporting printf extensions presumably ===>Could you explain more detail? maybe I can re-config my libc to support this request? how about the example?
Hi Tim, I find the format is not support by static GstCaps * gst_alsa_detect_formats (GstObject * obj, snd_pcm_hw_params_t * hw_params, GstCaps * in_caps) the static array: pcmformats[] does not support SND_PCM_FORMAT_S16_LE ,SND_PCM_FORMAT_U16_LE I modify function gst_alsa_detect_formats to support that, then the pipeline gst-launch-0.10 filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! audioconvert ! alsasink device="hw:0,0" can work normally. ================================================================================ But the pipeline(for MP3) still get error: gst-launch-0.10 -v filesrc location=/var/tmp/usb/sda1/audio_src/1503-9.mp3 ! m ad ! audioconvert ! audioresample ! alsasink device="hw:0,0" Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = audio/x-raw-int, endianness=(int)4321, signed=(boole an)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2 ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0: streaming task paused, reason not-negotiated (-4) ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... /GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = NULL Freeing pipeline ... # =========================================================================== Also, When I try to play .wav file via Rygel, it still get not-linked error, (rygel:881): Playbin-DEBUG: rygel-playbin-player.vala:75: Changing playback state to PLAYING. (rygel:881): Rygel-DEBUG: rygel-changelog.vala:74: 'TransportState = PLAYING' logged (rygel:881): Rygel-DEBUG: rygel-changelog.vala:55: LastChange sent (rygel:881): Playbin-WARNING **: rygel-playbin-player.vala:218: Error from GStreamer element playbin20: gstbasesrc.c(2625): gst_base_src_loop (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source: streaming task paused, reason not-linked (-1) (rygel:881): Playbin-WARNING **: rygel-playbin-player.vala:221: Going to STOPPED state ========================================================================== Do you have any suggestion about play MP3 file and play via Rygel?
Created attachment 220761 [details] gst-inspect mad output Hi Tim, It seems mad does not support src little endian. do you have any suggestion for the pipeline? gst-launch-0.10 -v filesrc location=/var/tmp/usb/sda1/audio_src/1503-9.mp3 ! mad ! audioconvert ! audioresample ! alsasink device="hw:0,0"
Hi Tim, It seems CPU BYTE_ORDER used by gstreamer. But when USB sound card has different endian with CPU BYTE_ORDER, it can not play to usb sound card with CPU BYTE_ORDER. Like audioresample just support CPU BYTE_ORDER only in src and sink. even I modify gst_alsa_detect_formats (), it does not enough to satisfy the requirement. Do you have any suggestion? Thanks! Soho
Ah, I see. alsasink basically assumes the driver/card will support a format in native byte order, and you're saying this is not the case in your case ? I guess you'll have to either fix up alsasink to check for foreign endianness formats as well or make the driver or some intermediary layer (asound/softplug?) convert on the fly.
Hi Tim, Currently, the approach I used : 1. modify usb audio driver in alsa to report the format the same as CPU BYTE_ORDER, "ALWAYS" 2. add the byte swap code in kernel to finish byte swap job, just when runtime format is big endian. Since USB audio support little endian only. In this stage, I can play audio from media server via Rygel. If I would like to fix up alsasink to check for foreign endianness, this approach seems takes a lot of effort, right? Since I have to fix up other plugin (like mad, audioresample, etc....) How about your opinion? Thank you very much for your support! Such that I have the guide for debugging! Soho
Hi Tim, One more question, why your big endian platform with USB sound card has no problem? Does your USB sound card support big endian? Thanks Soho
I don't think fixing up alsasink would take a lot of effort. You wouldn't have to fix up other elements (don't think that's desirable), but you'd just require an audioconvert before alsasink then to fix up the endianness. This is very ... unintuitive though, it's not a good solution. It would be better to $somehow make alsasink accept data in native endianness instead, and byte-swap it inside alsasink or the audiosink/ringbuffer base class as needed. I have tested on an apple powerbook laptop. It's possible alsasink went through other layers there (pulseaudio/softplug), I didn't check in detail.
Hi Tim, Indeed, It is better to fix this issue in alsasink only.(not to patch kernel code) But I do not get the point you mentioned. In function gst_alsa_detect_formats (), the modification have made alsasink to accept native format from USB sound card. It is not enough. It still get "not linked" error when I test audioresample and from rygel. And not-negotiated when test mad. So, I do not have good idea about how to fix this in alsasink module. Any guide line or example? regarding (pulseaduio/softplug), As my understanding, pulseaduio is another application that using gstreamer, right? Does it take the effor about format checking and byte swap? Thanks! Soho
Well, you need to debug these separately then. I would start by using a libc that supports the printf extension, since that makes debugging a *lot* easier, because you actually see the caps in the debug log instead of 0x1234568
Do you mean: register_printf_function() like ? Could you give me an example to confirm about this requirement? Since I have re-config my compile environment include libc.
Hi Tim, I check gstreamer-0.10.36/config.h,after configure procedure, config.h has: /* Defined if we have printf specifier extensions available */ #define HAVE_PRINTF_EXTENSION 1 /* Define to 1 if you have the `register_printf_function' function. */ #define HAVE_REGISTER_PRINTF_FUNCTION 1 Does it meet printf extension you mentioned?
yes, that looks good.
As your opinion, how to log the debug data? if I rollback the code that I modified And if I use the original pipeline to debug. gst-launch-0.10 filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! audioconvert ! alsasink device="hw:0,0"
Hi Tim, Do you have any idea about how to add byte swap to gstreamer? Where is suitable to add the behavior in so much plugins?
Hi Tim, The pipeline I tested: gst-launch-0.10 filesrc location=/bin/audio_src_48k_le.wav ! wavparse ! audioconvert ! alsasink device="hw:0,0" I have modify the code of alsasink. In function gst_alsa_detect_formats (), the modification have made alsasink to accept native format from USB sound card. But I can play the audio that does not have to do re-sample ONLY. If the audio file is needed to do re-sample. Audioresample will get not-linked error. Audioresmple sets the static caps with CPU BYTE_ORDER only. When I add the caps that support LITTLE endian in static caps for audioresample, it can not work,too. It is the case that I mentioned , the format detection is necessary for ALL plugins in gstreamer. How about your opinion for the issue?
Just to re-cap: CPU is big-endian, USB sound-card/driver only support little-endian. alsasink should advertise host-endiannes formats (that is just the expectation, pipelines more or less require that really, no one thinks a sink might only support foreign endianness). So *if* the driver does not support any formats in host endianness, you would need to make alsasink byte-swap internally or something. Or fix the driver to support that.
I made it at least advertise other-endianness formats as well now, if host endianness is not supported: commit 1a69ec3fd31dfeb4ba0abd52557c15eaa3fd19b8 Author: Tim-Philipp Müller <tim@centricular.net> Date: Thu Oct 18 00:39:42 2012 +0100 alsa: if no formats in native endianness could be detected, try non-native endianness as well This can happen, e.g. when using an USB sound card on a big-endian device https://bugzilla.gnome.org/show_bug.cgi?id=680904
(In reply to comment #51) > I made it at least advertise other-endianness formats as well now, if host > endianness is not supported: > > commit 1a69ec3fd31dfeb4ba0abd52557c15eaa3fd19b8 > Author: Tim-Philipp Müller <tim@centricular.net> > Date: Thu Oct 18 00:39:42 2012 +0100 > > alsa: if no formats in native endianness could be detected, try non-native > endianness as well > > This can happen, e.g. when using an USB sound card on > a big-endian device > > https://bugzilla.gnome.org/show_bug.cgi?id=680904 Hi tim, do you mean: you have modify the code and commit ,right? I can check "1a69ec3fd31dfeb4ba0abd52557c15eaa3fd19b8" commit record, right? in which branch, tag, or master?
(In reply to comment #51) > I made it at least advertise other-endianness formats as well now, if host > endianness is not supported: > > commit 1a69ec3fd31dfeb4ba0abd52557c15eaa3fd19b8 > Author: Tim-Philipp Müller <tim@centricular.net> > Date: Thu Oct 18 00:39:42 2012 +0100 > > alsa: if no formats in native endianness could be detected, try non-native > endianness as well > > This can happen, e.g. when using an USB sound card on > a big-endian device > > https://bugzilla.gnome.org/show_bug.cgi?id=680904 Hi Tim, the base plugin I use is 0.10.36, I compare the code that you commit and mime, there are a lot of difference. Do you have idea if I would like to add this mechanism into my 0.10.36 base plugin, how to? Do you have any suggestion? Thanks! Soho