summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-21 16:09:36 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-21 17:38:54 +0900
commitf2c26d48d9c6e91c6b9c914f215952400e6f889b (patch)
treeac17fb34377383a0afda392459326b4f79af67b3 /sound
parente5ddd303215d1e5e89d06056d17673b18219ace3 (diff)
downloadblackbird-obmc-linux-f2c26d48d9c6e91c6b9c914f215952400e6f889b.tar.gz
blackbird-obmc-linux-f2c26d48d9c6e91c6b9c914f215952400e6f889b.zip
ASoC: arizona: Support clearing clocks
Some systems may wish to support switching between telephony and CD audio clock rates but this is restricted by enforcement of constraints on the current DAI clock. Support setting clocks to zero and don't enforce any constraints in that case in order to facilitate this use case. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/arizona.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 316f074e686c..845d25630ba2 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -474,6 +474,10 @@ int arizona_set_sysclk(struct snd_soc_codec *codec, int clk_id,
case 147456000:
val |= 6 << ARIZONA_SYSCLK_FREQ_SHIFT;
break;
+ case 0:
+ dev_dbg(arizona->dev, "%s cleared\n", name);
+ *clk = freq;
+ return 0;
default:
return -EINVAL;
}
@@ -692,6 +696,9 @@ static int arizona_startup(struct snd_pcm_substream *substream,
return 0;
}
+ if (base_rate == 0)
+ return 0;
+
if (base_rate % 8000)
constraint = &arizona_44k1_constraint;
else
OpenPOWER on IntegriCloud