Re: [pulseaudio-discuss] pulseaudio-discuss Digest, Vol 5, Issue 52

2011-09-27 Thread Sriram Gopalan
Hello Everybody,
First of all Congrajulations on the release. Hopefully, we will turn in some
patches soon.

Please see additional comments inline.

> Date: Mon, 26 Sep 2011 20:41:26 +0100
> From: Colin Guthrie 
> Subject: Re: [pulseaudio-discuss] No audio heard from loopback
> To: pulseaudio-discuss@lists.freedesktop.org
> Message-ID: 
> Content-Type: text/plain; charset=UTF-8
>
> 'Twas brillig, and Sriram Gopalan at 26/09/11 19:35 did gyre and gimble:
> > We are facing an issue with loopback in pulse audio 0.9.22
>
> Just as a standard approach I'd generally recommend, have you tried
> 0.9.23? it includes several fixes that could certainly help.
>
> If you wait a day, you can also try the shiney new 1.0 release which
> will be escaping very soon
[Sriram] Certainly

>
> Col
>
> --

> Date: Mon, 26 Sep 2011 22:02:41 +0200
> From: Maarten Bosmans 
> Subject: Re: [pulseaudio-discuss] No audio heard from loopback
> To: General PulseAudio Discussion
>        
> Message-ID:
>        
> Content-Type: text/plain; charset=UTF-8
>
> 2011/9/26 Sriram Gopalan :
> > 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.
>
> Great. Did you find it easy to get pulse to run, did you need to patch
> anything to make it working? If so, please submit upstream.

[Sriram] Except for few glitches with the hal-detect module, there was no issue
If we develop a patch, we will certainly upstream it. As a matter of fact,
looking forward to it.

>
> > 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
>
> Are you saying that this doesn't work, or is the silence expected? Are
> you sure you're recording from the alsa hardware card and not from the
> pulse virtual alsa device? (I'm sorry for using the wrong terminology
> here)
[Sriram] silence is not expected. I would expect a ramping up echo.

>
> > #gst-launch alsasrc ! alsasink
> > #pactl load-module module-loopback
>
> It would be good to know why you want to do this, as in general
> (especially on embedded devices) you would not want to use
> software-based loopback of the mic input.
[Sriram] True. the end goal is to looback 2 different alsa devices for
bluetooth functionality. We are using a bluetooth chipset which interfaces
with the host micro over I2S. The drivers are integrated under the asoc layer
of alsa. If I access the devices directly through alsa ( hw:0,0 and hw:0,1)
it works exactly as expected.

>
> That being said, here are some other things you should try:
> - set the resampler to trivial or some speex-integer variant
> - try running with PULSE_NO_SIMD=1 set
> - try to run the tests of make check and see whether they give a problem
[Sriram] Will surely try 1.0 now that it is launched and post the
results here :-)
>
> > With the first 2 commands, there is only silence. With the third option,
> > pulse audio dies after sometime with a floating point exception.
>
> A backtrace would be nice.
> (preferably running from git master)
>
> Maarten
>
>
> --
>
> Message: 4
> Date: Tue, 27 Sep 2011 07:18:46 +0530
> From: Arun Raghavan 
> Subject: Re: [pulseaudio-discuss] No audio heard from loopback
> To: General PulseAudio Discussion
>        
> Message-ID: <1317088131.6608.6.camel@snowflake>
> Content-Type: text/plain; charset="UTF-8"
>
> On Tue, 2011-09-27 at 00:05 +0530, Sriram Gopalan wrote:
> > 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
&

[pulseaudio-discuss] No audio heard from loopback

2011-09-26 Thread Sriram Gopalan
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: