<br><br><div class="gmail_quote">On Wed, Aug 17, 2011 at 1:51 PM, Arun Raghavan <span dir="ltr"><<a href="mailto:arun.raghavan@collabora.co.uk">arun.raghavan@collabora.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Wed, 2011-08-17 at 13:34 +0530, kuldeep ghan wrote:<br>
> Hi,<br>
><br>
> I am working on a setup which has Linux Kernel running and I have<br>
> pulseaudio as Sound server. ASoc Alsa driver snd_pcm_mmap function<br>
> returns me<br>
> Virtual Memory mapped to physical memory which is strictly 32 Bit<br>
> Aligned.<br>
<br>
</div>Out of curiosity, what platform is this?<br></blockquote><div>I am using OMAP4 platform.<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
> When I am trying to Mix two streams with gst-launch, pa_mix function<br>
> tries to write 16Bit mixed samples to this physical memory resulting<br>
> in Bus error.<br>
><br>
> As a work around I am trying following code which is trying to write<br>
> two Mixed 16Bit samples write making it a 32Bit write.<br>
> src/pulsecore/sample-util.c<br>
><br>
> // *((int16_t*) data) = (int16_t) sum;<br>
> if(j==0) {<br>
> temp[0]=(int16_t) sum;<br>
> j=1;<br>
> } else {<br>
> temp[1]=(int16_t) sum;<br>
> j=0;<br>
> sum = ((temp[1] << 16) | (0x0000FFFF &<br>
> temp[0]));<br>
><br>
> data = (uint8_t*) data - sizeof(int16_t);<br>
> *((int32_t*) data) = (int32_t) sum;<br>
> data = (uint8_t*) data + sizeof(int16_t);<br>
> }<br>
><br>
> With this I am able to mix a gst-launch stream and already loaded<br>
> sample from pulseaudio played with play-sample from pacmd.<br>
> But not able to mix two streams with gst-launch.<br>
<br>
</div>What is the error you see when playing 2 streams? Do two instances of<br>
paplay work fine together?<br></blockquote><div>The error I see is <br>"<span class="il">Unhandled</span> <span class="il">fault</span>: external abort on non-linefetch (0x1818) at 0x40013000"<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
BTW, Another potential workaround (if your hardware supports it), is to<br>
force the default sample spec to use S32NE samples (you can edit the<br>
default value in /etc/pulse/daemon.conf). The downside is obviously that<br>
you're transferring 2x the amount of data that you'd have done with<br>
S16LE samples and the format conversion cost for just about every<br>
client.<br></blockquote><div><br>I have tried using S32NE as default format but it Causes under-runs/over-runs.<br>As I am new to ALSA subsystem and PulseAudio I am yet to figure out how to<br>get those under-runs/over-runs solved?<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Unless there's more hardware out there with this sort of limitation (I<br>
don't believe there is), I wouldn't be too keen on adding this sort of<br>
workaround upstream.<br>
<br>
Regards,<br>
Arun<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div><br>Thanks,<br>Kuldeep<br>