Message ID | 1246761001-21982-11-git-send-email-troy.kisky@boundarydevices.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Mark Brown wrote: > On Sat, Jul 04, 2009 at 07:30:00PM -0700, Troy Kisky wrote: >> If the codec is master, we support anything >> that the codec supports. > > Hrm, tricky - the rate configuration doesn't depend on what is master so > this could cause confusion if the codec is slave. > >> -#define DAVINCI_I2S_RATES SNDRV_PCM_RATE_8000_96000 >> +#define DAVINCI_I2S_RATES (SNDRV_PCM_RATE_8000_96000 |\ >> + SNDRV_PCM_RATE_5512 | SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS) > > Note that the ASoC core doesn't support _KNOT or _CONTINUOUS (at least > not properly) so the only thing you should get from this is 5512. Is > that really worth worrying about the master/slave problem? > Ok. I'll drop this. I just needed it when I was testing all rates my codec supports. Now that I've tested it, I don't think I'll ever use the other rates. But even if the cpu is the clock/frame master, the sample rate generator has an 8 bit divider field, which seems to be always 0 in the current code. And I don't see any reference to params_rate in the davinci-i2s.c file. Has anyone tried the cpu as master??? Troy
Mark Brown wrote: > On Mon, Jul 06, 2009 at 03:01:54PM -0700, Troy Kisky wrote: > >> But even if the cpu is the clock/frame master, the sample rate generator has an 8 bit >> divider field, which seems to be always 0 in the current code. And I don't see any reference >> to params_rate in the davinci-i2s.c file. Has anyone tried the cpu as master??? > > It does appear that way, doesn't it? But looking at the code > davinci-sffsdr runs with the CPU as frame master so I'd have expected > that it would have shown any problems here. > But in this case the clock to divide would come from the CLKR pin, so a divide by (0+1) would be correct.
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index f3e7bf8..f4b25ce 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c @@ -601,7 +601,8 @@ static void davinci_i2s_remove(struct platform_device *pdev, release_mem_region(mem->start, (mem->end - mem->start) + 1); } -#define DAVINCI_I2S_RATES SNDRV_PCM_RATE_8000_96000 +#define DAVINCI_I2S_RATES (SNDRV_PCM_RATE_8000_96000 |\ + SNDRV_PCM_RATE_5512 | SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS) static struct snd_soc_dai_ops davinci_i2s_dai_ops = { .startup = davinci_i2s_startup,
If the codec is master, we support anything that the codec supports. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> --- sound/soc/davinci/davinci-i2s.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)