The patch titled at73c213: fix DMA size at the end of DMA buffer has been added to the -mm tree. Its filename is at73c213-fix-dma-size-at-the-end-of-dma-buffer.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: at73c213: fix DMA size at the end of DMA buffer From: Atsushi Nemoto <anemo@xxxxxxxxxxxxx> The interrupt handler always provide runtime->period_size data, but it should provide additional residual data when the pointer back to zero. This patch fixes periodic click noise when runtime->buffer_size was not multiple of runtime->period_size. Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx> Cc: Hans-Christian Egtvedt <hcegtvedt@xxxxxxxxx> Cc: Jaroslav Kysela <perex@xxxxxxxx> Cc: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx> Cc: Andrew Victor <avictor.za@xxxxxxxxx> Cc: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- sound/spi/at73c213.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff -puN sound/spi/at73c213.c~at73c213-fix-dma-size-at-the-end-of-dma-buffer sound/spi/at73c213.c --- a/sound/spi/at73c213.c~at73c213-fix-dma-size-at-the-end-of-dma-buffer +++ a/sound/spi/at73c213.c @@ -356,6 +356,7 @@ static irqreturn_t snd_at73c213_interrup u32 status; int offset; int block_size; + int size; int next_period; int retval = IRQ_NONE; @@ -373,11 +374,14 @@ static irqreturn_t snd_at73c213_interrup next_period = 0; offset = block_size * next_period; + size = runtime->period_size * runtime->channels; + if (next_period == runtime->periods - 1) + size += (runtime->buffer_size % runtime->period_size) + * runtime->channels; ssc_writel(chip->ssc->regs, PDC_TNPR, (long)runtime->dma_addr + offset); - ssc_writel(chip->ssc->regs, PDC_TNCR, - runtime->period_size * runtime->channels); + ssc_writel(chip->ssc->regs, PDC_TNCR, size); retval = IRQ_HANDLED; } _ Patches currently in -mm which might be from anemo@xxxxxxxxxxxxx are at73c213-remove-redundant-private_free-routine.patch at73c213-fix-error-checking-for-clk-api.patch at73c213-monaural-support.patch at73c213-fix-dma-size-at-the-end-of-dma-buffer.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html