[pulseaudio-discuss] dynamic routing through pulse audio

Himanshu Chug himanshu.chug at gmail.com
Wed Jun 8 23:18:48 PDT 2011


Hi Colin

I changed the sample role from proplist in play_beep( ) below:

static void play_beep(pa_core *core)
{
    uint32_t idx;
    pa_proplist *pl = pa_proplist_new ();
    pa_proplist_sets(pl, PA_PROP_MEDIA_ROLE, "test");
    pa_log ("DBG: %s: %d\n", __func__, __LINE__);
    pa_scache_play_item(core, "beep", "alsa_output.hw_0_0", PA_VOLUME_NORM,
pl, &idx);
}


Here are the logs for segmentation fault:

D: module-augment-properties.c: Looking for .desktop file for
gst-launch-0.10
D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4,
prebuf=0, minreq=1 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432,
base=4, prebuf=0, minreq=4 maxrewind=0
I: sink-input.c: Created input 1 "Playback Stream" on alsa_output.hw_0_0
with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: sink-input.c:     media.role = "event"
I: sink-input.c:     media.name = "Playback Stream"
I: sink-input.c:     application.name = "gst-launch-0.10"
I: sink-input.c:     native-protocol.peer = "UNIX socket client"
I: sink-input.c:     native-protocol.version = "16"
I: sink-input.c:     application.process.id = "2465"
I: sink-input.c:     application.process.user = "root"
I: sink-input.c:     application.process.host = "(none)"
I: sink-input.c:     application.process.binary = "gst-launch-0.10"
I: sink-input.c:     application.language = "C"
I: sink-input.c:     window.x11.display = ":0"
I: sink-input.c:     application.process.machine_id = "(none)"
I: sink-input.c:     module-stream-restore.id =
"sink-input-by-media-role:event"
I: protocol-native.c: Requested tlength=200.00 ms, minreq=10.00 ms
D: protocol-native.c: Adjust latency mode enabled, configuring sink latency
to half of overall latency.
D: memblockq.c: memblockq requested: maxlength=4194304, tlength=19404,
base=4, prebuf=0, minreq=1764 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=4194304, tlength=19404,
base=4, prebuf=0, minreq=1764 maxrewind=0
I: protocol-native.c: Final latency 200.00 ms = 90.00 ms + 2*10.00 ms +
90.00 ms
D: alsa-sink.c: Latency set to 90.00ms
D: alsa-sink.c: hwbuf_unused=115068
D: alsa-sink.c: setting avail_min=31855
*D: core-subscribe.c: Dropped redundant event due to change event.
E: module-cork-music-on-phone.c: DBG: play_beep: 62
E: core-scache.c: DBG: pa_scache_play_item: 314
Segmentation fault*


Best Regards,
Himanshu

On Thu, Jun 9, 2011 at 1:51 AM, Colin Guthrie <gmane at colin.guthr.ie> wrote:

> 'Twas brillig, and Himanshu Chug at 08/06/11 12:15 did gyre and gimble:
> > Hi Colin
> >
> > Further I tried to implement the BEEP logic for incoming "event" (say
> > sms) during "phone" call stream is active.
> >
> > I tried to load and play sample cache..using pa_scache_add_file() and
> > pa_scache_play_item() from module-cork-music-on-phone
> >
> > The sample gets loaded successfully in pa_init() module function, but
> > actually the problem I am facing is the media.role of sample is set to
> > "event" by default, ( I checked from pacmd --> list-samples) , so now my
> > usecase of mixing BEEP (for "event" e.g sms) with "phone" stream is
> > failing because the BEEP sample is set to media.role=event which gets
> > corked while "phone" is active , and currently for some reasons its
> > giving segmentation fault from pa_scache_play_item() function.
> >
> > Any suggestions or alternate on how to mix the BEEP with phone stream?
>
> The fifth argument to pa_scache_play_item() is a proplist. Simply create
> a pa_proplist and inject an entry that sets media.role to something else
> (e.g. phone or simply a blank string). That should override the default
> media.role stored with the item itself.
>
> I suspect the segv comes from some kind of loop within your module, but
> it's hard to say without a backtrace.
>
> HTHs
>
> Col
>
>
>
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
>  Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>  Mageia Contributor [http://www.mageia.org/]
>  PulseAudio Hacker [http://www.pulseaudio.org/]
>  Trac Hacker [http://trac.edgewall.org/]
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110609/cef09f7f/attachment-0001.htm>


More information about the pulseaudio-discuss mailing list