linux/sound/soc
Fabio Estevam 2a4cfd1022 ASoC: sgtl5000: Allow 8kHz playback in codec slave mode
When trying to play a 8kHz file with codec in slave mode we get the following
error on a mx28evk:

$ aplay -Dhw:0,0 stereo_8k.wav
Playing WAVE 'stereo_8k.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
[   21.218647] sgtl5000 0-000a: PLL not supported in slave mode
[   21.224559] sgtl5000 0-000a: 128 ratio is not supported. SYS_MCLK needs to be 256, 384 or 512 * fs
[   21.233687] sgtl5000 0-000a: ASoC: can't set sgtl5000 hw params: -22
aplay: set_params:1123: Unable to install hw params:

This error happens because we are using 'sys_fs' instead of 'frame_rate' in the
valid ratio check.

Use the real'frame_rate' so that the ratio is correctly calculated and the
playback can run.

sgtl5000 codec manual states that in 'Synchronous SYS_MCLK input' mode that the
following SYS_CLK frequencies are allowed: 256*fs, 384*fs, 512*fs.

, where fs is the sampling frequency, which can be in the range of:
8, 11.025, 16, 22.5, 32, 44.1, 48, 96 kHz.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-27 17:42:01 +00:00
..
adi
atmel Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/cirrus' and 'asoc/topic/cleanup' into asoc-next 2014-08-04 16:31:29 +01:00
au1x MIPS: Alchemy: remove au_read/write/sync 2014-07-30 13:56:34 +02:00
bcm
blackfin ASoC: blackfin: use samples to set silence 2014-07-17 12:27:56 +01:00
cirrus Merge remote-tracking branch 'asoc/topic/cirrus' into asoc-next 2014-03-13 14:19:11 +00:00
codecs ASoC: sgtl5000: Allow 8kHz playback in codec slave mode 2014-11-27 17:42:01 +00:00
davinci Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/dmic', 'asoc/topic/drivers', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next 2014-10-06 12:48:57 +01:00
dwc ASoC: Update email id of the author 2014-09-09 10:49:41 +01:00
fsl ASoC: fsl: use strncpy() to prevent copying of over-long names 2014-10-22 11:38:01 +01:00
generic ASoC: simple-card: Initialize headphone and mic GPIO numbers 2014-10-07 18:24:01 +01:00
intel ASoC: Intel: HSW/BDW only support S16 and S24 formats. 2014-10-16 16:48:05 +02:00
jz4740 Merge remote-tracking branches 'asoc/topic/headers', 'asoc/topic/intel', 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/mc13783' and 'asoc/topic/multicodec' into asoc-next 2014-05-22 00:23:54 +01:00
kirkwood ASoC: kirkwood: Remove ARCH_KIRKWOOD dependency 2014-07-29 20:35:23 +01:00
mxs
nuc900 ASoC: nuc900: export nuc900_ac97_data 2014-04-30 20:32:20 -07:00
omap Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2014-10-06 12:48:51 +01:00
pxa Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
rockchip ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrl 2014-10-08 12:29:38 +01:00
samsung Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5677', 'asoc/topic/samsung', 'asoc/topic/sgtl5000' and 'asoc/topic/sh' into asoc-next 2014-10-06 12:49:03 +01:00
sh Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5677', 'asoc/topic/samsung', 'asoc/topic/sgtl5000' and 'asoc/topic/sh' into asoc-next 2014-10-06 12:49:03 +01:00
sirf ASoC: sirf: usp: Add bitclock inversion support 2014-08-16 17:06:42 -05:00
spear ASoC: Update email id of the author 2014-09-09 10:49:41 +01:00
tegra Merge remote-tracking branches 'asoc/topic/suspend', 'asoc/topic/tas2552', 'asoc/topic/tegra', 'asoc/topic/tlv320aic31xx' and 'asoc/topic/tlv320aic3x' into asoc-next 2014-10-06 12:49:07 +01:00
txx9 ASoC: txx9: Don't opencode DMAengine API calls 2014-08-19 11:44:18 -05:00
ux500 ASoC: mop500_ab8500: Replace instances of rtd->codec->card with rtd->card 2014-05-20 22:55:39 +01:00
Kconfig ASoC: s6000: remove driver 2014-10-20 11:03:52 +01:00
Makefile ASoC: s6000: remove driver 2014-10-20 11:03:52 +01:00
soc-cache.c ASoC: Move name and id from CODEC/platform to component 2014-06-21 21:04:24 +01:00
soc-compress.c ASoC: soc-compress: fix double unlock of fe card mutex 2014-09-24 11:38:55 +01:00
soc-core.c Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2014-10-08 16:44:49 +01:00
soc-dapm.c ASoC: soc-dapm: fix use after free 2014-10-07 13:11:35 +01:00
soc-devres.c ASoC: Export devm_snd_soc_register_platform() 2014-04-22 22:00:42 +01:00
soc-generic-dmaengine-pcm.c ASoC: Consolidate platform and CODEC probe/remove 2014-08-19 10:59:45 -05:00
soc-io.c ASoC: Automatically initialize regmap for all components 2014-08-19 10:59:47 -05:00
soc-jack.c ASoC: Move card field form platform/codec to component 2014-07-22 23:15:57 +01:00
soc-pcm.c Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2014-10-08 16:44:49 +01:00
soc-utils.c