]> git.itanic.dy.fi Git - linux-stable/commit
ASoC: samsung: odroid: Fix 32000 sample rate handling
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 14 Mar 2018 16:41:13 +0000 (17:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:52 +0000 (16:17 +0200)
commitfbeec965b8d1ca4005f2b63f70fd6ed54a147027
tree6297a97de5dd613411ce45826e774e736968cce8
parentb3bbda7bad73d900fcc49528712305331a1bd491
ASoC: samsung: odroid: Fix 32000 sample rate handling

[ Upstream commit 1d22c337dc8f3a25638f7262e7bcb5729a34d140 ]

In case of sample rates lower than 44100 currently there is too low MCLK
frequency set for the CODEC. Playback fails with following errors:

$ speaker-test -c2 -t sine -f 1500 -l2 -r 32000

Sine wave rate is 1500.0000Hz
Rate set to 32000Hz (requested 32000Hz)
Buffer size range from 128 to 131072
Period size range from 64 to 65536
Using max buffer size 131072
Periods = 4
Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument

[  497.883700] max98090 1-0010: Invalid master clock frequency

To fix this the I2S root clock's frequency is increased, depending
on sampling rate.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/samsung/odroid.c