* Bug: LADSPA implementation - no up/downmix handling @ 2015-09-12 20:10 Andreas Hartmann 2015-09-22 14:16 ` Andreas Hartmann 2015-09-23 14:26 ` Takashi Iwai 0 siblings, 2 replies; 6+ messages in thread From: Andreas Hartmann @ 2015-09-12 20:10 UTC (permalink / raw) To: alsa-devel [-- Attachment #1.1: Type: text/plain, Size: 340 bytes --] Hi, Using the surround_encoder of the swh-plugins I noticed, that the alsa implementation only assumes an equal number of in- and output channels for ladspa plugins. This occurs from Line 752 onwards in pcm_ladspa.c and leads to a Segfault shortly after. There needs to be a check and correct handling for up/downmix scenarios. Andreas [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug: LADSPA implementation - no up/downmix handling 2015-09-12 20:10 Bug: LADSPA implementation - no up/downmix handling Andreas Hartmann @ 2015-09-22 14:16 ` Andreas Hartmann 2015-09-23 14:26 ` Takashi Iwai 1 sibling, 0 replies; 6+ messages in thread From: Andreas Hartmann @ 2015-09-22 14:16 UTC (permalink / raw) To: alsa-devel [-- Attachment #1.1: Type: text/plain, Size: 428 bytes --] Am Samstag, 12. September 2015, 22:10:40 schrieb Andreas Hartmann: > Hi, > > Using the surround_encoder of the swh-plugins I noticed, that the alsa > implementation only assumes an equal number of in- and output channels for > ladspa plugins. This occurs from Line 752 onwards in pcm_ladspa.c and leads > to a Segfault shortly after. > There needs to be a check and correct handling for up/downmix scenarios. > > Andreas ping [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug: LADSPA implementation - no up/downmix handling 2015-09-12 20:10 Bug: LADSPA implementation - no up/downmix handling Andreas Hartmann 2015-09-22 14:16 ` Andreas Hartmann @ 2015-09-23 14:26 ` Takashi Iwai 2015-09-24 10:44 ` Andreas Hartmann 1 sibling, 1 reply; 6+ messages in thread From: Takashi Iwai @ 2015-09-23 14:26 UTC (permalink / raw) To: Andreas Hartmann; +Cc: alsa-devel On Sat, 12 Sep 2015 22:10:40 +0200, Andreas Hartmann wrote: > > Hi, > > Using the surround_encoder of the swh-plugins I noticed, that the alsa > implementation only assumes an equal number of in- and output channels for > ladspa plugins. This occurs from Line 752 onwards in pcm_ladspa.c and leads to > a Segfault shortly after. > There needs to be a check and correct handling for up/downmix scenarios. Could you give the back trace? Or at best submit a fix patch? thanks, Takashi ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug: LADSPA implementation - no up/downmix handling 2015-09-23 14:26 ` Takashi Iwai @ 2015-09-24 10:44 ` Andreas Hartmann 2015-09-24 13:07 ` Takashi Iwai 0 siblings, 1 reply; 6+ messages in thread From: Andreas Hartmann @ 2015-09-24 10:44 UTC (permalink / raw) To: alsa-devel [-- Attachment #1.1: Type: text/plain, Size: 1415 bytes --] Am Mittwoch, 23. September 2015, 16:26:58 schrieb Takashi Iwai: > On Sat, 12 Sep 2015 22:10:40 +0200, > > Andreas Hartmann wrote: > > Hi, > > > > Using the surround_encoder of the swh-plugins I noticed, that the alsa > > implementation only assumes an equal number of in- and output channels for > > ladspa plugins. This occurs from Line 752 onwards in pcm_ladspa.c and > > leads to a Segfault shortly after. > > There needs to be a check and correct handling for up/downmix scenarios. > > Could you give the back trace? Or at best submit a fix patch? > > > thanks, > > Takashi > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel Sure here you go #0 0x00007ffff78623ef in snd_pcm_ladspa_allocate_memory (pcm=0x626fa0, pcm=0x626fa0, pcm=0x626fa0, ladspa=0x621ad0) at pcm_ladspa.c:753 #1 snd_pcm_ladspa_init (pcm=0x626fa0) at pcm_ladspa.c:834 #2 0x00007ffff7842946 in snd_pcm_plugin_prepare (pcm=0x626fa0) at pcm_plugin.c:171 #3 0x00007ffff784290f in snd_pcm_plugin_prepare (pcm=0x62c760) at pcm_plugin.c:162 #4 0x000000000040256a in ?? () #5 0x00007ffff7222ec5 in __libc_start_main (main=0x401d80, argc=4, argv=0x7fffffffde28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde18) at libc-start.c:287 #6 0x0000000000402fdd in ?? () [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug: LADSPA implementation - no up/downmix handling 2015-09-24 10:44 ` Andreas Hartmann @ 2015-09-24 13:07 ` Takashi Iwai [not found] ` <2508294.jvp4p1Q0mz@deep-thought> 0 siblings, 1 reply; 6+ messages in thread From: Takashi Iwai @ 2015-09-24 13:07 UTC (permalink / raw) To: Andreas Hartmann; +Cc: alsa-devel On Thu, 24 Sep 2015 12:44:53 +0200, Andreas Hartmann wrote: > > Am Mittwoch, 23. September 2015, 16:26:58 schrieb Takashi Iwai: > > On Sat, 12 Sep 2015 22:10:40 +0200, > > > > Andreas Hartmann wrote: > > > Hi, > > > > > > Using the surround_encoder of the swh-plugins I noticed, that the alsa > > > implementation only assumes an equal number of in- and output channels for > > > ladspa plugins. This occurs from Line 752 onwards in pcm_ladspa.c and > > > leads to a Segfault shortly after. > > > There needs to be a check and correct handling for up/downmix scenarios. > > > > Could you give the back trace? Or at best submit a fix patch? > > > > > > thanks, > > > > Takashi > > _______________________________________________ > > Alsa-devel mailing list > > Alsa-devel@alsa-project.org > > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > > Sure here you go > > #0 0x00007ffff78623ef in snd_pcm_ladspa_allocate_memory (pcm=0x626fa0, > pcm=0x626fa0, pcm=0x626fa0, ladspa=0x621ad0) at pcm_ladspa.c:753 > #1 snd_pcm_ladspa_init (pcm=0x626fa0) at pcm_ladspa.c:834 > #2 0x00007ffff7842946 in snd_pcm_plugin_prepare (pcm=0x626fa0) at > pcm_plugin.c:171 > #3 0x00007ffff784290f in snd_pcm_plugin_prepare (pcm=0x62c760) at > pcm_plugin.c:162 > #4 0x000000000040256a in ?? () > #5 0x00007ffff7222ec5 in __libc_start_main (main=0x401d80, argc=4, > argv=0x7fffffffde28, init=<optimized out>, fini=<optimized out>, > rtld_fini=<optimized out>, > stack_end=0x7fffffffde18) at libc-start.c:287 > #6 0x0000000000402fdd in ?? () It looks rather like a simply typo. Does the patch below work? Takashi diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c index 631ee0f35b73..6552b4379ec0 100644 --- a/src/pcm/pcm_ladspa.c +++ b/src/pcm/pcm_ladspa.c @@ -749,7 +749,7 @@ static int snd_pcm_ladspa_allocate_memory(snd_pcm_t *pcm, snd_pcm_ladspa_t *lads return -ENOMEM; } for (idx = 0; idx < instance->input.channels.size; idx++) { - chn = instance->output.channels.array[idx]; + chn = instance->input.channels.array[idx]; if (pchannels[chn] == NULL && chn < ichannels) { instance->input.data[idx] = NULL; continue; ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <2508294.jvp4p1Q0mz@deep-thought>]
* Re: Bug: LADSPA implementation - no up/downmix handling [not found] ` <2508294.jvp4p1Q0mz@deep-thought> @ 2015-10-02 10:01 ` Takashi Iwai 0 siblings, 0 replies; 6+ messages in thread From: Takashi Iwai @ 2015-10-02 10:01 UTC (permalink / raw) To: Andreas Hartmann; +Cc: alsa-devel On Fri, 25 Sep 2015 20:51:38 +0200, Andreas Hartmann wrote: > > Am Donnerstag, 24. September 2015, 15:07:14 schrieben Sie: > > On Thu, 24 Sep 2015 12:44:53 +0200, > > > > Andreas Hartmann wrote: > > > Am Mittwoch, 23. September 2015, 16:26:58 schrieb Takashi Iwai: > > > > On Sat, 12 Sep 2015 22:10:40 +0200, > > > > > > > > Andreas Hartmann wrote: > > > > > Hi, > > > > > > > > > > Using the surround_encoder of the swh-plugins I noticed, that the alsa > > > > > implementation only assumes an equal number of in- and output channels > > > > > for > > > > > ladspa plugins. This occurs from Line 752 onwards in pcm_ladspa.c and > > > > > leads to a Segfault shortly after. > > > > > There needs to be a check and correct handling for up/downmix > > > > > scenarios. > > > > > > > > Could you give the back trace? Or at best submit a fix patch? > > > > > > > > > > > > thanks, > > > > > > > > Takashi > > > > _______________________________________________ > > > > Alsa-devel mailing list > > > > Alsa-devel@alsa-project.org > > > > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > > > > > > Sure here you go > > > > > > #0 0x00007ffff78623ef in snd_pcm_ladspa_allocate_memory (pcm=0x626fa0, > > > pcm=0x626fa0, pcm=0x626fa0, ladspa=0x621ad0) at pcm_ladspa.c:753 > > > #1 snd_pcm_ladspa_init (pcm=0x626fa0) at pcm_ladspa.c:834 > > > #2 0x00007ffff7842946 in snd_pcm_plugin_prepare (pcm=0x626fa0) at > > > pcm_plugin.c:171 > > > #3 0x00007ffff784290f in snd_pcm_plugin_prepare (pcm=0x62c760) at > > > pcm_plugin.c:162 > > > #4 0x000000000040256a in ?? () > > > #5 0x00007ffff7222ec5 in __libc_start_main (main=0x401d80, argc=4, > > > argv=0x7fffffffde28, init=<optimized out>, fini=<optimized out>, > > > rtld_fini=<optimized out>, > > > > > > stack_end=0x7fffffffde18) at libc-start.c:287 > > > > > > #6 0x0000000000402fdd in ?? () > > > > It looks rather like a simply typo. Does the patch below work? > > > > > > Takashi > > > > diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c > > index 631ee0f35b73..6552b4379ec0 100644 > > --- a/src/pcm/pcm_ladspa.c > > +++ b/src/pcm/pcm_ladspa.c > > @@ -749,7 +749,7 @@ static int snd_pcm_ladspa_allocate_memory(snd_pcm_t > > *pcm, snd_pcm_ladspa_t *lads return -ENOMEM; > > } > > for (idx = 0; idx < instance->input.channels.size; idx++) { > > - chn = instance->output.channels.array[idx]; > > + chn = instance->input.channels.array[idx]; > > if (pchannels[chn] == NULL && chn < ichannels) { > > instance->input.data[idx] = NULL; > > continue; > > It seems to work Sorry, I forgot to apply this to upstream. Now pushed out. thanks, Takashi ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-02 10:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-12 20:10 Bug: LADSPA implementation - no up/downmix handling Andreas Hartmann
2015-09-22 14:16 ` Andreas Hartmann
2015-09-23 14:26 ` Takashi Iwai
2015-09-24 10:44 ` Andreas Hartmann
2015-09-24 13:07 ` Takashi Iwai
[not found] ` <2508294.jvp4p1Q0mz@deep-thought>
2015-10-02 10:01 ` Takashi Iwai
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.