lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54AF8B0C.2050301@metafoo.de>
Date:	Fri, 09 Jan 2015 09:02:20 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Jianqun Xu <jay.xu@...k-chips.com>, lgirdwood@...il.com,
	heiko@...ech.de, broonie@...nel.org, perex@...ex.cz, tiwai@...e.de,
	sonnyrao@...omium.org
CC:	linux-rockchip@...ts.infradead.org, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [alsa-devel] [PATCH] ASoC: rockchip: i2s: add rockchip_dmaengine_pcm_config

On 01/09/2015 02:52 AM, Jianqun Xu wrote:
> This patch makes snd_dmaengine_pcm_register with rockchip_dmaengine_pcm_config,
> which configure the parameters of period and buffer match to rockchip DMAC.
>
> =======================
> without rockchip_dmaengine_pcm_config, and test with command -
> aplay -D hw:0,0 /tmp/a, there are the error dump:
> [  134.899396] dma-pl330 ffb20000.dma-controller: fill_queue:2251 Bad Desc(7)
> [  134.906270] dma-pl330 ffb20000.dma-controller: fill_queue:2251 Bad Desc(8)
> [  134.913141] dma-pl330 ffb20000.dma-controller: fill_queue:2251 Bad Desc(9)
>
> And bellow sound from DMA debugger:
> "I debugged it a little and it looks like what is happening is that requests
> which aren't a multiple of burst size * burst length are coming in.  Right
> now the i2s block is setting a burst size of 4 and burst length of 4, but
> the dmaengine code has no idea about this restriction.  I was able to
> eliminate the messages by changing burst length to 1 in the i2s driver.
> This fix would always work as long as we're sending a multiple of 4 bytes
> (which so far seems to be the case)"
>
> This patch can make the length of dma buffer is aligned to a multiple of burst size
> and burst length.

No, all it does it sets the maximum size to something that is aligned, an 
application can still choose something else.

And this is the wrong approach anyway, we don't want to have new 
snd_pcm_hardware for drivers using generic dmaengine PCM driver.

The right approach is to modify the dmaengine PCM driver to set a constraint 
that makes sure that the period size is a multiple of the burst size.

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ