[-,JACK,PCM,1/1] jack: Use correct parameter order for snd_pcm_areas_silence()
diff mbox

Message ID 1521632552-24858-1-git-send-email-twischer@de.adit-jv.com
State New
Headers show

Commit Message

Timo Wischer March 21, 2018, 11:42 a.m. UTC
From: Timo Wischer <twischer@de.adit-jv.com>

Without this fix it will sometimes fail with a segmentation fault.

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>

Comments

Jaroslav Kysela March 21, 2018, 12:11 p.m. UTC | #1
Dne 21.3.2018 v 12:42 twischer@de.adit-jv.com napsal(a):
> From: Timo Wischer <twischer@de.adit-jv.com>
> 
> Without this fix it will sometimes fail with a segmentation fault.
Applied. Thanks.

					Jaroslav


> 
> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> 
> diff --git a/jack/pcm_jack.c b/jack/pcm_jack.c
> index a655668..e3df4d2 100644
> --- a/jack/pcm_jack.c
> +++ b/jack/pcm_jack.c
> @@ -200,7 +200,7 @@ snd_pcm_jack_process_cb(jack_nframes_t nframes, snd_pcm_ioplug_t *io)
>  		if (io->stream == SND_PCM_STREAM_PLAYBACK) {
>  			const snd_pcm_uframes_t frames = nframes - xfer;
>  
> -			snd_pcm_areas_silence(jack->areas, io->channels, xfer,
> +			snd_pcm_areas_silence(jack->areas, xfer, io->channels,
>  					      frames, io->format);
>  		}
Takashi Iwai March 21, 2018, 1:07 p.m. UTC | #2
On Wed, 21 Mar 2018 12:42:32 +0100,
<twischer@de.adit-jv.com> wrote:
> 
> From: Timo Wischer <twischer@de.adit-jv.com>
> 
> Without this fix it will sometimes fail with a segmentation fault.
> 
> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>

Applied, thanks.


Takashi
Takashi Iwai March 21, 2018, 1:09 p.m. UTC | #3
On Wed, 21 Mar 2018 14:07:18 +0100,
Takashi Iwai wrote:
> 
> On Wed, 21 Mar 2018 12:42:32 +0100,
> <twischer@de.adit-jv.com> wrote:
> > 
> > From: Timo Wischer <twischer@de.adit-jv.com>
> > 
> > Without this fix it will sometimes fail with a segmentation fault.
> > 
> > Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> 
> Applied, thanks.

Oops, a race condition, Jaroslav was quicker :)


Takashi

Patch
diff mbox

diff --git a/jack/pcm_jack.c b/jack/pcm_jack.c
index a655668..e3df4d2 100644
--- a/jack/pcm_jack.c
+++ b/jack/pcm_jack.c
@@ -200,7 +200,7 @@  snd_pcm_jack_process_cb(jack_nframes_t nframes, snd_pcm_ioplug_t *io)
 		if (io->stream == SND_PCM_STREAM_PLAYBACK) {
 			const snd_pcm_uframes_t frames = nframes - xfer;
 
-			snd_pcm_areas_silence(jack->areas, io->channels, xfer,
+			snd_pcm_areas_silence(jack->areas, xfer, io->channels,
 					      frames, io->format);
 		}