* [PATCH 0/2] ASoC: tlv320dac33: small fixes
@ 2010-02-16 11:23 Peter Ujfalusi
2010-02-16 11:23 ` [PATCH 1/2] ASoC: tlv320dac33: Clearing FIFOFLUSH flag before playback Peter Ujfalusi
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2010-02-16 11:23 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, lrg
Hello,
Two small fixes for the tlv320dac33 codec driver:
Clearing the FIFFLUSH flag before playback start
The register cache has the bit set after the playback is stopped, so clear it
before the playback.
OSCSET calculation in case of 44.1KHz sampling rate was off by 1 (0x1588
instead of 0x1589, which is the value should be used according to TI).
---
Peter Ujfalusi (2):
ASoC: tlv320dac33: Clearing FIFOFLUSH flag before playback
ASoC: tlv320dac33: Correct the OSCSET calculation
sound/soc/codecs/tlv320dac33.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ASoC: tlv320dac33: Clearing FIFOFLUSH flag before playback
2010-02-16 11:23 [PATCH 0/2] ASoC: tlv320dac33: small fixes Peter Ujfalusi
@ 2010-02-16 11:23 ` Peter Ujfalusi
2010-02-16 11:23 ` [PATCH 2/2] ASoC: tlv320dac33: Correct the OSCSET calculation Peter Ujfalusi
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2010-02-16 11:23 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, lrg
In repeated playback the FIFOFLUSH bit remained set, and
never has been cleared.
Clear it during the setup phase.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
---
sound/soc/codecs/tlv320dac33.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 1b35d0c..dab7fd5 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -734,7 +734,10 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream)
aictrl_a = dac33_read_reg_cache(codec, DAC33_SER_AUDIOIF_CTRL_A);
aictrl_a &= ~(DAC33_NCYCL_MASK | DAC33_WLEN_MASK);
+ /* Read FIFO control A, and clear FIFO flush bit */
fifoctrl_a = dac33_read_reg_cache(codec, DAC33_FIFO_CTRL_A);
+ fifoctrl_a &= ~DAC33_FIFOFLUSH;
+
fifoctrl_a &= ~DAC33_WIDTH;
switch (substream->runtime->format) {
case SNDRV_PCM_FORMAT_S16_LE:
--
1.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ASoC: tlv320dac33: Correct the OSCSET calculation
2010-02-16 11:23 [PATCH 0/2] ASoC: tlv320dac33: small fixes Peter Ujfalusi
2010-02-16 11:23 ` [PATCH 1/2] ASoC: tlv320dac33: Clearing FIFOFLUSH flag before playback Peter Ujfalusi
@ 2010-02-16 11:23 ` Peter Ujfalusi
2010-02-16 11:31 ` [PATCH 0/2] ASoC: tlv320dac33: small fixes Liam Girdwood
2010-02-16 13:36 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2010-02-16 11:23 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, lrg
OSCSET calculation was not correct in case of 44.1KHz
sampling rate.
With small adjustment both 48 and 44.1 KHz calculation
now gives the correct value.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
---
sound/soc/codecs/tlv320dac33.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index dab7fd5..f9f367d 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -700,7 +700,7 @@ static int dac33_hw_params(struct snd_pcm_substream *substream,
}
#define CALC_OSCSET(rate, refclk) ( \
- ((((rate * 10000) / refclk) * 4096) + 5000) / 10000)
+ ((((rate * 10000) / refclk) * 4096) + 7000) / 10000)
#define CALC_RATIOSET(rate, refclk) ( \
((((refclk * 100000) / rate) * 16384) + 50000) / 100000)
--
1.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] ASoC: tlv320dac33: small fixes
2010-02-16 11:23 [PATCH 0/2] ASoC: tlv320dac33: small fixes Peter Ujfalusi
2010-02-16 11:23 ` [PATCH 1/2] ASoC: tlv320dac33: Clearing FIFOFLUSH flag before playback Peter Ujfalusi
2010-02-16 11:23 ` [PATCH 2/2] ASoC: tlv320dac33: Correct the OSCSET calculation Peter Ujfalusi
@ 2010-02-16 11:31 ` Liam Girdwood
2010-02-16 13:36 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Liam Girdwood @ 2010-02-16 11:31 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, broonie
On Tue, 2010-02-16 at 13:23 +0200, Peter Ujfalusi wrote:
> Hello,
>
> Two small fixes for the tlv320dac33 codec driver:
> Clearing the FIFFLUSH flag before playback start
> The register cache has the bit set after the playback is stopped, so clear it
> before the playback.
> OSCSET calculation in case of 44.1KHz sampling rate was off by 1 (0x1588
> instead of 0x1589, which is the value should be used according to TI).
>
> ---
> Peter Ujfalusi (2):
> ASoC: tlv320dac33: Clearing FIFOFLUSH flag before playback
> ASoC: tlv320dac33: Correct the OSCSET calculation
>
> sound/soc/codecs/tlv320dac33.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] ASoC: tlv320dac33: small fixes
2010-02-16 11:23 [PATCH 0/2] ASoC: tlv320dac33: small fixes Peter Ujfalusi
` (2 preceding siblings ...)
2010-02-16 11:31 ` [PATCH 0/2] ASoC: tlv320dac33: small fixes Liam Girdwood
@ 2010-02-16 13:36 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2010-02-16 13:36 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, lrg
On Tue, Feb 16, 2010 at 01:23:14PM +0200, Peter Ujfalusi wrote:
> Hello,
>
> Two small fixes for the tlv320dac33 codec driver:
> Clearing the FIFFLUSH flag before playback start
> The register cache has the bit set after the playback is stopped, so clear it
> before the playback.
> OSCSET calculation in case of 44.1KHz sampling rate was off by 1 (0x1588
> instead of 0x1589, which is the value should be used according to TI).
Applied both, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-16 13:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16 11:23 [PATCH 0/2] ASoC: tlv320dac33: small fixes Peter Ujfalusi
2010-02-16 11:23 ` [PATCH 1/2] ASoC: tlv320dac33: Clearing FIFOFLUSH flag before playback Peter Ujfalusi
2010-02-16 11:23 ` [PATCH 2/2] ASoC: tlv320dac33: Correct the OSCSET calculation Peter Ujfalusi
2010-02-16 11:31 ` [PATCH 0/2] ASoC: tlv320dac33: small fixes Liam Girdwood
2010-02-16 13:36 ` 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).