UPSTREAM: ASoC: simple-card: don't fail if sysclk setting is not supported
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sat, 23 Jan 2016 22:36:40 +0000 (00:36 +0200)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 5 Jul 2016 12:52:24 +0000 (20:52 +0800)
commit87db4badda31d585f50fa7c677df56f91163ee4c
treef21c302ea1e2c87550b218b6e2dd3d38166b50e9
parentb65219d64e433be385bcf64343c4cfd84f31b6d4
UPSTREAM: ASoC: simple-card: don't fail if sysclk setting is not supported

Commit e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk
with mclk-fs") added sysclk / SND_SOC_CLOCK_OUT setting, that makes
asoc_simple_card_hw_params fail if the operation is not supported,
although the intention clearly was to ignore ENOTSUPP. Fix it.

The patch fixes audio playback on Kirkwood / OpenRD client,
where the following errors are seen:

asoc-simple-card sound: ASoC: machine hw_params failed: -524
alsa-lib: /alsa-lib-1.0.28/src/pcm/pcm_hw.c:327:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS failed (-524): Unknown error 524

Fixes: e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk with mclk-fs")
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit git.kernel.org broonie/sound.git for-next
ee43a1a0cd2a8f33cddfa1323a60b5cfcf865ba0)

Change-Id: I979297fa31aa065338804186ee35de948c63a6a4
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
sound/soc/generic/simple-card.c