Hello everybody,
We are facing an issue with loopback in pulse audio 0.9.22. We recently
ported pulseaudio to an ARM 11 based evaluation board and are running
pulseaudio in system mode. The application being targeted is
In-vehicle-Infotainment and the board has a Mono Mic ( 16-bit, 1 channel)
and a Stereo Speaker ( 2 channels, 16-bit, 44.1 Khz).
1) With gstreamer we are able to playback audio to the speakers using the
following command. pulseaudio promptly gets into action and plays the file
at 44.1 Khz without a glitch -
#gst-launch filesrc location=/home/test/songs/test.mp3 ! mad ! alsasink
2) When we do a capture with the mic using the command below, again it works
fine ( By default arecord and aplay use 8Khz, 8-bit mono channel for capture
and playback) -
#arecord test.wav
#aplay test.wav
3) However, when we attempt the followings, it does not work. We cannot hear
any audio, whereas the same works on my Ubuntu 10.10 desktop
#arecord | aplay
#gst-launch alsasrc ! alsasink
#pactl load-module module-loopback
With the first 2 commands, there is only silence. With the third option,
pulse audio dies after sometime with a floating point exception.
Based on some preliminary debugging using log traces, I could see that
pa_source_output_push is getting called and the chunk has some data.
Similarly for the sink input, i could see pa_sink_render_into being called
with some data. Beyond that I have no clue. Sincerely appreciate any
guidance to move forward.
1) Could it be an issue with resampling?
2) Should I dump the chunk to a file and analyze its contents?
Thanks & regards,
Sriram
P.S. Here is an excerpt from the log of the session.
root@ARM11EVB:~# pulseaudio --system -v &
root@ARM11EVB:~# W: main.c: Running in system mode, but --disallow-exit not
set!
D: alsa-sink.c: Probed mixer paths:
D: alsa-mixer.c: Path Set 0x56fb0, direction=1, probed=yes
D: alsa-mixer.c: Path analog-output (Analog Output), direction=1,
priority=99, probed=yes, supported=yes, has_mute=no, has_volume=no,
has_dB=no, min_volume=0, max_volume=0, min_dB0
I: sink.c: Created sink 0 "alsa_output.platform-soc-audio.0.analog-stereo"
with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: sink.c: alsa.resolution_bits = "16"
I: sink.c: device.api = "alsa"
I: sink.c: device.class = "sound"
I: sink.c: alsa.class = "generic"
I: sink.c: alsa.subclass = "generic-mix"
I: sink.c: alsa.name = ""
I: sink.c: alsa.id = "Audio FDA001-0"
I: sink.c: alsa.subdevice = "0"
I: sink.c: alsa.subdevice_name = "subdevice #0"
I: sink.c: alsa.device = "0"
I: sink.c: alsa.card = "0"
I: sink.c: alsa.card_name = "EVB2065_AUDIO"
I: sink.c: alsa.long_card_name = "EVB2065_AUDIO (FDA001)"
I: sink.c: device.bus_path = "platform-soc-audio.0"
I: sink.c: sysfs.path = "/devices/platform/soc-audio.0/sound/card0"
I: sink.c: device.string = "hw:0"
I: sink.c: device.buffering.buffer_size = "130048"
I: sink.c: device.buffering.fragment_size = "4064"
I: sink.c: device.access_mode = "mmap+timer"
I: sink.c: device.profile.name = "analog-stereo"
I: sink.c: device.profile.description = "Analog Stereo"
I: sink.c: device.description = "EVB2065_AUDIO Analog Stereo"
I: sink.c: module-udev-detect.discovered = "1"
I: sink.c: device.icon_name = "audio-card"
I: source.c: Created source 0
"alsa_output.platform-soc-audio.0.analog-stereo.monitor" with sample spec
s16le 2ch 44100Hz and channel map front-left,front-right
I: source.c: device.description = "Monitor of EVB2065_AUDIO Analog
Stereo"
I: source.c: device.class = "monitor"
I: source.c: alsa.card = "0"
I: source.c: alsa.card_name = "EVB2065_AUDIO"
I: source.c: alsa.long_card_name = "EVB2065_AUDIO (FDA001)"
I: source.c: device.bus_path = "platform-soc-audio.0"
I: source.c: sysfs.path = "/devices/platform/soc-audio.0/sound/card0"
I: source.c: device.string = "0"
I: source.c: module-udev-detect.discovered = "1"
I: source.c: device.icon_name = "audio-card"
I: alsa-sink.c: Using 32.0 fragments of size 4064 bytes (23.04ms), buffer
size is 130048 bytes (737.23ms)
I: alsa-sink.c: Time scheduling watermark is 20.00ms
D: alsa-sink.c: hwbuf_unused=0
D: alsa-sink.c: setting avail_min=31630
D: alsa-mixer.c: Activating path analog-output
D: alsa-mixer.c: Path analog-output (Analog Output), direction=1,
priority=99, probed=yes, supported=yes, has_mute=no, has_volume=no,
has_dB=no, min_volume=0, max_volume=0, min_dB0
I: alsa-sink.c: Driver does not support hardware volume control, falling
back to software volume control.
I: alsa-sink.c: Driver does not support hardware mute control, falling back
to software mute control.
D: alsa-util.c: snd_pcm_dump():
D: alsa-util.c: Hardware PCM card 0 'EVB2065_AUDIO' device 0 subdevice 0
D: alsa-util.c: Its setup is:
D: alsa-util.c: stream : PLAYBACK
D: alsa-util.c: access : MMAP_INTERLEAVED
D: alsa-util.c: format : S16_LE
D: alsa-util.c: