* [PATCH 2/2] ASoC: rockchip: i2s: set TDL and RDL to 16 bits
[not found] <1419325709-15374-1-git-send-email-jay.xu@rock-chips.com>
@ 2014-12-23 9:08 ` Jianqun Xu
2014-12-23 23:06 ` [alsa-devel] " Dylan Reid
2014-12-24 9:36 ` [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst to 4 Jianqun Xu
1 sibling, 1 reply; 6+ messages in thread
From: Jianqun Xu @ 2014-12-23 9:08 UTC (permalink / raw)
To: linux-arm-kernel
Set Transmit Data Level(TDL) and Receive Data Level(RDL) to 16 bits.
Without this setting, the TDL is default to be 0x00 (means 1 bit),
and the RDL is default to be 0x1f (means 16 bits).
This patch is helpful to fix pop sound, tested on rk3288 board.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
sound/soc/rockchip/rockchip_i2s.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index c74ba37..1cd7efc 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -247,6 +247,10 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
regmap_update_bits(i2s->regmap, I2S_TXCR, I2S_TXCR_VDW_MASK, val);
regmap_update_bits(i2s->regmap, I2S_RXCR, I2S_RXCR_VDW_MASK, val);
+ regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_TDL_MASK,
+ I2S_DMACR_TDL(16));
+ regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_RDL_MASK,
+ I2S_DMACR_RDL(16));
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [alsa-devel] [PATCH 2/2] ASoC: rockchip: i2s: set TDL and RDL to 16 bits
2014-12-23 9:08 ` [PATCH 2/2] ASoC: rockchip: i2s: set TDL and RDL to 16 bits Jianqun Xu
@ 2014-12-23 23:06 ` Dylan Reid
2014-12-24 0:36 ` Jianqun
0 siblings, 1 reply; 6+ messages in thread
From: Dylan Reid @ 2014-12-23 23:06 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Dec 23, 2014 at 1:08 AM, Jianqun Xu <jay.xu@rock-chips.com> wrote:
> Set Transmit Data Level(TDL) and Receive Data Level(RDL) to 16 bits.
> Without this setting, the TDL is default to be 0x00 (means 1 bit),
> and the RDL is default to be 0x1f (means 16 bits).
My impression from the TRM was that TDL and RDL were measured in
samples. Are you sure it's 'bits'?
>
> This patch is helpful to fix pop sound, tested on rk3288 board.
>
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
> ---
> sound/soc/rockchip/rockchip_i2s.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
> index c74ba37..1cd7efc 100644
> --- a/sound/soc/rockchip/rockchip_i2s.c
> +++ b/sound/soc/rockchip/rockchip_i2s.c
> @@ -247,6 +247,10 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
>
> regmap_update_bits(i2s->regmap, I2S_TXCR, I2S_TXCR_VDW_MASK, val);
> regmap_update_bits(i2s->regmap, I2S_RXCR, I2S_RXCR_VDW_MASK, val);
> + regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_TDL_MASK,
> + I2S_DMACR_TDL(16));
> + regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_RDL_MASK,
> + I2S_DMACR_RDL(16));
>
> return 0;
> }
> --
> 1.9.1
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [alsa-devel] [PATCH 2/2] ASoC: rockchip: i2s: set TDL and RDL to 16 bits
2014-12-23 23:06 ` [alsa-devel] " Dylan Reid
@ 2014-12-24 0:36 ` Jianqun
0 siblings, 0 replies; 6+ messages in thread
From: Jianqun @ 2014-12-24 0:36 UTC (permalink / raw)
To: linux-arm-kernel
? 12/24/2014 07:06 AM, Dylan Reid ??:
> On Tue, Dec 23, 2014 at 1:08 AM, Jianqun Xu <jay.xu@rock-chips.com> wrote:
>> Set Transmit Data Level(TDL) and Receive Data Level(RDL) to 16 bits.
>> Without this setting, the TDL is default to be 0x00 (means 1 bit),
>> and the RDL is default to be 0x1f (means 16 bits).
>
> My impression from the TRM was that TDL and RDL were measured in
> samples. Are you sure it's 'bits'?
You are right, I'll modify the commit message next version, thank you
>
>>
>> This patch is helpful to fix pop sound, tested on rk3288 board.
>>
>> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
>> ---
>> sound/soc/rockchip/rockchip_i2s.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
>> index c74ba37..1cd7efc 100644
>> --- a/sound/soc/rockchip/rockchip_i2s.c
>> +++ b/sound/soc/rockchip/rockchip_i2s.c
>> @@ -247,6 +247,10 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
>>
>> regmap_update_bits(i2s->regmap, I2S_TXCR, I2S_TXCR_VDW_MASK, val);
>> regmap_update_bits(i2s->regmap, I2S_RXCR, I2S_RXCR_VDW_MASK, val);
>> + regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_TDL_MASK,
>> + I2S_DMACR_TDL(16));
>> + regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_RDL_MASK,
>> + I2S_DMACR_RDL(16));
>>
>> return 0;
>> }
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel at alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
>
>
--
Jianqun Xu
****************************************************************************
*IMPORTANT NOTICE:*This email is from Fuzhou Rockchip Electronics Co.,
Ltd .The contents of this email and any attachments may contain
information that is privileged, confidential and/or exempt from
disclosure under applicable law and relevant NDA. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution, or use of the information is STRICTLY PROHIBITED.
Please immediately contact the sender as soon as possible and destroy
the material in its entirety in any format. Thank you.
****************************************************************************
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst to 4
[not found] <1419325709-15374-1-git-send-email-jay.xu@rock-chips.com>
2014-12-23 9:08 ` [PATCH 2/2] ASoC: rockchip: i2s: set TDL and RDL to 16 bits Jianqun Xu
@ 2014-12-24 9:36 ` Jianqun Xu
2014-12-24 9:37 ` [PATCH v2 3/3] ASoC: rockchip: i2s: fix maxburst of dma data " Jianqun Xu
2014-12-24 12:43 ` [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst " Mark Brown
1 sibling, 2 replies; 6+ messages in thread
From: Jianqun Xu @ 2014-12-24 9:36 UTC (permalink / raw)
To: linux-arm-kernel
To make Bus DMA works more efficiency, DMA may work in burst mode,
we set the watermark of transmit and receive reach to 16 bits.
Jianqun Xu (3):
ASoC: rockchip: i2s: fix error defination of transmit data level
ASoC: rockchip: i2s: set TDL and RDL to 16 samples
ASoC: rockchip: i2s: fix maxburst of dma data to 4
sound/soc/rockchip/rockchip_i2s.c | 8 ++++++--
sound/soc/rockchip/rockchip_i2s.h | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
--
changes since v1:
- modify commit message suggested by dgreid
- add patch to fix maxburst
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] ASoC: rockchip: i2s: fix maxburst of dma data to 4
2014-12-24 9:36 ` [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst to 4 Jianqun Xu
@ 2014-12-24 9:37 ` Jianqun Xu
2014-12-24 12:43 ` [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst " Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Jianqun Xu @ 2014-12-24 9:37 UTC (permalink / raw)
To: linux-arm-kernel
Since RK3288 DMAC's burst length only support max to 4, here
set maxburst of playback and capture dma data to 4.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
changes since v1:
- new patch since v1
sound/soc/rockchip/rockchip_i2s.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index 1cd7efc..59aeec4 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -458,11 +458,11 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
i2s->playback_dma_data.addr = res->start + I2S_TXDR;
i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
- i2s->playback_dma_data.maxburst = 16;
+ i2s->playback_dma_data.maxburst = 4;
i2s->capture_dma_data.addr = res->start + I2S_RXDR;
i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
- i2s->capture_dma_data.maxburst = 16;
+ i2s->capture_dma_data.maxburst = 4;
i2s->dev = &pdev->dev;
dev_set_drvdata(&pdev->dev, i2s);
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst to 4
2014-12-24 9:36 ` [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst to 4 Jianqun Xu
2014-12-24 9:37 ` [PATCH v2 3/3] ASoC: rockchip: i2s: fix maxburst of dma data " Jianqun Xu
@ 2014-12-24 12:43 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2014-12-24 12:43 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 24, 2014 at 05:36:59PM +0800, Jianqun Xu wrote:
> To make Bus DMA works more efficiency, DMA may work in burst mode,
> we set the watermark of transmit and receive reach to 16 bits.
Applied all, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141224/52df34b9/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-24 12:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1419325709-15374-1-git-send-email-jay.xu@rock-chips.com>
2014-12-23 9:08 ` [PATCH 2/2] ASoC: rockchip: i2s: set TDL and RDL to 16 bits Jianqun Xu
2014-12-23 23:06 ` [alsa-devel] " Dylan Reid
2014-12-24 0:36 ` Jianqun
2014-12-24 9:36 ` [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst to 4 Jianqun Xu
2014-12-24 9:37 ` [PATCH v2 3/3] ASoC: rockchip: i2s: fix maxburst of dma data " Jianqun Xu
2014-12-24 12:43 ` [PATCH v2 0/3] ASoC: rockchip: i2s: fix watermark to 16 and maxburst " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).