mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
ASoC: jz4740: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro This patch uses it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87sgg258io.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
846d0a17a8
commit
48afb28785
@ -129,7 +129,7 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream,
|
|||||||
uint32_t conf, ctrl;
|
uint32_t conf, ctrl;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (dai->active)
|
if (snd_soc_dai_active(dai))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ctrl = jz4740_i2s_read(i2s, JZ_REG_AIC_CTRL);
|
ctrl = jz4740_i2s_read(i2s, JZ_REG_AIC_CTRL);
|
||||||
@ -153,7 +153,7 @@ static void jz4740_i2s_shutdown(struct snd_pcm_substream *substream,
|
|||||||
struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai);
|
struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai);
|
||||||
uint32_t conf;
|
uint32_t conf;
|
||||||
|
|
||||||
if (dai->active)
|
if (snd_soc_dai_active(dai))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF);
|
conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF);
|
||||||
@ -332,7 +332,7 @@ static int jz4740_i2s_suspend(struct snd_soc_component *component)
|
|||||||
struct jz4740_i2s *i2s = snd_soc_component_get_drvdata(component);
|
struct jz4740_i2s *i2s = snd_soc_component_get_drvdata(component);
|
||||||
uint32_t conf;
|
uint32_t conf;
|
||||||
|
|
||||||
if (component->active) {
|
if (snd_soc_component_active(component)) {
|
||||||
conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF);
|
conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF);
|
||||||
conf &= ~JZ_AIC_CONF_ENABLE;
|
conf &= ~JZ_AIC_CONF_ENABLE;
|
||||||
jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf);
|
jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf);
|
||||||
@ -355,7 +355,7 @@ static int jz4740_i2s_resume(struct snd_soc_component *component)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (component->active) {
|
if (snd_soc_component_active(component)) {
|
||||||
ret = clk_prepare_enable(i2s->clk_i2s);
|
ret = clk_prepare_enable(i2s->clk_i2s);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
clk_disable_unprepare(i2s->clk_aic);
|
clk_disable_unprepare(i2s->clk_aic);
|
||||||
|
Loading…
Reference in New Issue
Block a user