[gst-plugins-base-0.10.20] alsasink can't get appropiate sound format

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[gst-plugins-base-0.10.20] alsasink can't get appropiate sound format

unsik Kim
Hello, all?

I have trouble with alsasink plugin (I just guessed, I'm a newbie).

First, my circumstances are,

gst-plugins-base-0.10.20
gstreamer-0.10.20
alsa-lib-1.0.15
kernel 2.6.29-rc2

CPU : PXA270
H/W audio codec : UCB1400 AC97 codec

My problem is alsasink dosen't produce appropriate sound.

Left channel : noise (simillar with white noise)
Right channel : play sound but slow (2 times slower... I guess)

First I checked operation of sound device with speaker-test of
alsa-utils and it works well.
Here is log.

---
root@mgpmp:~# speaker-test -c 2 -t wav

speaker-test 1.0.15

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 8 to 32768
Period size range from 8 to 2040
Using max buffer size 32768
Periods = 4
was set period_size = 1024
was set buffer_size = 32768
 0 - Front Left
 1 - Front Right
---

Also, I can play well with ALSA's oss compatibility module (snd-oss-pcm).

Here is gstreamers log. (long)

---
root@mgpmp:~# gst-launch playbin uri=file:///home/root/07\ Red\
Dress.mp3       Setting pipeline to PAUSED ...
0:00:00.933727077   716    0x15050 DEBUG                 alsa
gstalsaplugin.c:75:plugin_init: binding text domain
gst-plugins-base-0.10 to locale dir /usr/share/locale
0:00:00.940897231   716    0x15050 DEBUG                 alsa
gstalsasink.c:276:gst_alsasink_init:<GstAlsaSink@0xac060> initializing
alsasink
0:00:00.942173538   716    0x15050 DEBUG                 alsa
gstalsasink.c:306:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
device not open, using template caps
0:00:01.001892308   716    0x15050 LOG                   alsa
gstalsasink.c:681:gst_alsasink_open:<audiosink-actual-sink-alsa>
Opened device default
0:00:01.059183077   716    0x15050 WARN                  alsa
gstalsa.c:124:gst_alsa_detect_formats:<audiosink-actual-sink-alsa>
skipping non-int format
0:00:01.060123077   716    0x15050 LOG                   alsa
gstalsa.c:30:gst_alsa_detect_rates:<audiosink-actual-sink-alsa>
probing sample rates ...
0:00:01.060633538   716    0x15050 DEBUG                 alsa
gstalsa.c:49:gst_alsa_detect_rates:<audiosink-actual-sink-alsa> Min.
rate = 4000 (4000)
0:00:01.061093538   716    0x15050 DEBUG                 alsa
gstalsa.c:50:gst_alsa_detect_rates:<audiosink-actual-sink-alsa> Max.
rate = 2147483647 (-1)
0:00:01.061746461   716    0x15050 LOG                   alsa
gstalsa.c:265:gst_alsa_detect_channels:<audiosink-actual-sink-alsa>
probing channels ...
0:00:01.062253846   716    0x15050 DEBUG                 alsa
gstalsa.c:309:gst_alsa_detect_channels:<audiosink-actual-sink-alsa>
Min. channels = 1 (1)
0:00:01.062769538   716    0x15050 DEBUG                 alsa
gstalsa.c:310:gst_alsa_detect_channels:<audiosink-actual-sink-alsa>
Max. channels = 8 (10000)
0:00:01.069656308   716    0x15050 DEBUG                 alsa
gstalsa.c:388:gst_alsa_open_iec958_pcm:<audiosink-actual-sink-alsa>
Generated device string "iec958:{AES0 0x02 AES1 0x82 AES2 0x00 AES3
0x02}"
0:00:01.070788308   716    0x15050 WARN                  alsa
conf.c:3949:snd_config_expand: alsalib error: Unknown parameters {AES0
0x02 AES1 0x82 AES2 0x00 AES3 0x02}
0:00:01.071308000   716    0x15050 WARN                  alsa
pcm.c:2145:snd_pcm_open_noupdate: alsalib error: Unknown PCM
iec958:{AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02}
0:00:01.071997231   716    0x15050 DEBUG                 alsa
gstalsa.c:394:gst_alsa_open_iec958_pcm:<audiosink-actual-sink-alsa>
failed opening IEC958 device: Invalid argument
0:00:01.072552615   716    0x15050 INFO                  alsa
gstalsasink.c:326:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
returning caps audio/x-raw-int, endianness=(int)1234,
signed=(boolean){ true, false }, width=(int)32, depth=(int)32,
rate=(int)[ 4000, 2147483647 ], channels=(int)[ 1, 2 ];
audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false
}, width=(int)32, depth=(int)32, rate=(int)[ 4000, 2147483647 ],
channels=(int)3, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_LFE
>; audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true,
false }, width=(int)32, depth=(int)32, rate=(int)[ 4000, 2147483647 ],
channels=(int)4, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)32,
depth=(int)32, rate=(int)[ 4000, 2147483647 ], channels=(int)6,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)32,
depth=(int)32, rate=(int)[ 4000, 2147483647 ], channels=(int)8,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)24,
depth=(int)24, rate=(int)[ 4000, 2147483647 ], channels=(int)[ 1, 2 ];
audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false
}, width=(int)24, depth=(int)24, rate=(int)[ 4000, 2147483647 ],
channels=(int)3, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_LFE
>; audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true,
false }, width=(int)24, depth=(int)24, rate=(int)[ 4000, 2147483647 ],
channels=(int)4, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)24,
depth=(int)24, rate=(int)[ 4000, 2147483647 ], channels=(int)6,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)24,
depth=(int)24, rate=(int)[ 4000, 2147483647 ], channels=(int)8,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)32,
depth=(int)24, rate=(int)[ 4000, 2147483647 ], channels=(int)[ 1, 2 ];
audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false
}, width=(int)32, depth=(int)24, rate=(int)[ 4000, 2147483647 ],
channels=(int)3, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_LFE
>; audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true,
false }, width=(int)32, depth=(int)24, rate=(int)[ 4000, 2147483647 ],
channels=(int)4, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)32,
depth=(int)24, rate=(int)[ 4000, 2147483647 ], channels=(int)6,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)32,
depth=(int)24, rate=(int)[ 4000, 2147483647 ], channels=(int)8,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)16,
depth=(int)16, rate=(int)[ 4000, 2147483647 ], channels=(int)[ 1, 2 ];
audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false
}, width=(int)16, depth=(int)16, rate=(int)[ 4000, 2147483647 ],
channels=(int)3, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_LFE
>; audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true,
false }, width=(int)16, depth=(int)16, rate=(int)[ 4000, 2147483647 ],
channels=(int)4, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)16,
depth=(int)16, rate=(int)[ 4000, 2147483647 ], channels=(int)6,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE >; audio/x-raw-int,
endianness=(int)1234, signed=(boolean){ true, false }, width=(int)16,
depth=(int)16, rate=(int)[ 4000, 2147483647 ], channels=(int)8,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT >; audio/x-raw-int,
signed=(boolean){ true, false }, width=(int)8, depth=(int)8,
rate=(int)[ 4000, 2147483647 ], channels=(int)[ 1, 2 ];
audio/x-raw-int, signed=(boolean){ true, false }, width=(int)8,
depth=(int)8, rate=(int)[ 4000, 2147483647 ], channels=(int)3,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_LFE
>; audio/x-raw-int, signed=(boolean){ true, false }, width=(int)8,
depth=(int)8, rate=(int)[ 4000, 2147483647 ], channels=(int)4,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT >; audio/x-raw-int,
signed=(boolean){ true, false }, width=(int)8, depth=(int)8,
rate=(int)[ 4000, 2147483647 ], channels=(int)6,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE >; audio/x-raw-int, signed=(boolean){
true, false }, width=(int)8, depth=(int)8, rate=(int)[ 4000,
2147483647 ], channels=(int)8,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT >
0:00:01.780125846   716    0x15050 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
Pipeline is PREROLLING ...
0:00:02.020555692   716    0x62888 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:02.121833231   716    0x62888 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:02.265676000   716    0x62888 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:02.403471693   716    0xba968 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:02.482740615   716    0x62888 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:02.677360308   716    0xba968 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:02.741654461   716    0x62888 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:02.858667077   716    0xba968 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:02.982380000   716    0xba968 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:03.110284923   716    0xba968 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:03.218500308   716    0xba968 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:03.262078461   716    0xba968 LOG                   alsa
gstalsasink.c:311:gst_alsasink_getcaps:<audiosink-actual-sink-alsa>
Returning cached caps
0:00:03.324798769   716    0xba968 DEBUG                 alsa
gstalsasink.c:619:alsasink_parse_spec:<audiosink-actual-sink-alsa>
Linear format : depth=32, width=32, sign=1, bigend=0
0:00:03.325648308   716    0xba968 DEBUG                 alsa
gstalsasink.c:343:set_hwparams:<audiosink-actual-sink-alsa>
Negotiating to 2 channels @ 44100 Hz (format = S32_LE) SPDIF (0)
0:00:03.329065231   716    0xba968 DEBUG                 alsa
gstalsasink.c:387:set_hwparams:<audiosink-actual-sink-alsa> buffer
time 200000, min 90, max 371520
0:00:03.329612923   716    0xba968 DEBUG                 alsa
gstalsasink.c:393:set_hwparams:<audiosink-actual-sink-alsa> period
time 10000, min 90, max 23130
0:00:03.330100615   716    0xba968 DEBUG                 alsa
gstalsasink.c:398:set_hwparams:<audiosink-actual-sink-alsa> periods
min 0, max 4096
0:00:03.331443077   716    0xba968 DEBUG                 alsa
gstalsasink.c:414:set_hwparams:<audiosink-actual-sink-alsa> buffer
time 200000
0:00:03.333042770   716    0xba968 DEBUG                 alsa
gstalsasink.c:427:set_hwparams:<audiosink-actual-sink-alsa> period
time 9523
0:00:03.353240308   716    0xba968 DEBUG                 alsa
gstalsasink.c:451:set_hwparams:<audiosink-actual-sink-alsa> buffer
size 8820, period size 420
0:00:03.354189539   716    0xba968 DEBUG                 alsa
gstalsasink.c:738:gst_alsasink_prepare:<audiosink-actual-sink-alsa>
Hardware setup:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 32
  buffer_size  : 8820
  period_size  : 420
  period_time  : 9523
  tick_time    : 0

0:00:03.354938154   716    0xba968 DEBUG                 alsa
gstalsasink.c:743:gst_alsasink_prepare:<audiosink-actual-sink-alsa>
Software setup:
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 420
  xfer_align   : 1
  start_threshold  : 8820
  stop_threshold   : 8820
  silence_threshold: 0
  silence_size : 0
  boundary     : 1156055040

Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
0:00:03.430652923   716    0x5f658 LOG                   alsa
gstalsasink.c:893:gst_alsasink_write:<audiosink-actual-sink-alsa>
received audio samples buffer of 3360 bytes
0:00:03.431441231   716    0x5f658 DEBUG                 alsa
gstalsasink.c:901:gst_alsasink_write:<audiosink-actual-sink-alsa>
written 420 frames out of 420
---

Currently, I think " format       : S32_LE" is wrong.
" format       : S16_LE" will be adequate.

But I can't determine what is the cause of fault (alsasink, somewhat
outdated UCB1400 driver, ALSA-lib).

I want to someone advise me for proper debugging points.

Any little help will be really appreciated.

unsik Kim

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel