diff options
author | Mark Brown <broonie@kernel.org> | 2020-05-18 16:43:49 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-18 16:43:49 +0100 |
commit | 9bb93a40d95863e2576ccc2b8f05467659c9faf1 (patch) | |
tree | 7abb503ed87ad25424dda0672467ab4b2d43c9ce /sound/soc/intel | |
parent | a1c3ec70ee10c4309cfb3d913af9bf0acb448766 (diff) | |
parent | 0812a08ac8d054efc6cf2895d3b0e82c8731f8e9 (diff) |
Merge series "ASoC: cleanup DAI/Component activity" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark
These are v3 of DAI/Component activity cleanup.
This patch-set exchanges soc-dapm.c :: snd_soc_dai_link_event_xxx()
behavior which updates dai->active but not cares other actives.
But I think original code was wrong.
So, I believe these works correctly, but maybe need some tests or deep review.
v1 -> v2
- function naming "activity" -> "active"
v2 -> v3
- macro -> inline function
- added Reviewed-by from Ranjani, Acked-by from Peter
Link: https://lore.kernel.org/r/875zd39frp.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87blmq9alx.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (21):
ASoC: soc-pcm: replace snd_soc_runtime_activate()/deactivate() to macro
ASoC: soc-dai: add snd_soc_dai_action()
ASoC: soc-dapm: use snd_soc_dai_activate()/deactivate()
ASoC: soc-dai: add snd_soc_dai_active()
ASoC: soc-component: add snd_soc_component_active()
ASoC: soc-dai: add snd_soc_dai_stream_active()
ASoC: use snd_soc_xxx_active()
ASoC: atomel: use snd_soc_xxx_active()
ASoC: bcm: use snd_soc_xxx_active()
ASoC: cirrus: use snd_soc_xxx_active()
ASoC: codecs: use snd_soc_xxx_active()
ASoC: fsl: use snd_soc_xxx_active()
ASoC: intel: use snd_soc_xxx_active()
ASoC: jz4740: use snd_soc_xxx_active()
ASoC: mediatek: use snd_soc_xxx_active()
ASoC: meson: use snd_soc_xxx_active()
ASoC: pxa: use snd_soc_xxx_active()
ASoC: ti: use snd_soc_xxx_active()
ASoC: uniphier: use snd_soc_xxx_active()
ASoC: dwc: use snd_soc_xxx_active()
ASoC: cleanup dai / component active code
include/sound/soc-component.h | 6 +-
include/sound/soc-dai.h | 21 +++++-
include/sound/soc.h | 15 ++++-
sound/soc/atmel/atmel_ssc_dai.c | 4 +-
sound/soc/bcm/bcm2835-i2s.c | 6 +-
sound/soc/bcm/cygnus-ssp.c | 4 +-
sound/soc/cirrus/ep93xx-i2s.c | 4 +-
sound/soc/codecs/adav80x.c | 4 +-
sound/soc/codecs/arizona.c | 2 +-
sound/soc/codecs/cs4271.c | 4 +-
sound/soc/codecs/madera.c | 2 +-
sound/soc/codecs/max98090.c | 6 +-
sound/soc/codecs/tlv320aic23.c | 2 +-
sound/soc/codecs/tlv320dac33.c | 2 +-
sound/soc/codecs/uda1380.c | 2 +-
sound/soc/codecs/wl1273.c | 2 +-
sound/soc/codecs/wm8711.c | 2 +-
sound/soc/codecs/wm8753.c | 4 +-
sound/soc/dwc/dwc-i2s.c | 2 +-
sound/soc/fsl/fsl_esai.c | 2 +-
sound/soc/fsl/fsl_spdif.c | 4 +-
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 14 ++--
sound/soc/jz4740/jz4740-i2s.c | 8 +--
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 8 +--
sound/soc/meson/axg-tdm-interface.c | 2 +-
sound/soc/pxa/pxa-ssp.c | 8 +--
sound/soc/pxa/pxa2xx-i2s.c | 2 +-
sound/soc/soc-compress.c | 4 +-
sound/soc/soc-core.c | 11 +--
sound/soc/soc-dai.c | 23 +++++++
sound/soc/soc-dapm.c | 8 +--
sound/soc/soc-pcm.c | 70 +++++++-------------
sound/soc/ti/davinci-mcasp.c | 2 +-
sound/soc/ti/omap-dmic.c | 4 +-
sound/soc/ti/omap-mcbsp.c | 4 +-
sound/soc/ti/omap-mcpdm.c | 8 +--
sound/soc/uniphier/aio-cpu.c | 4 +-
37 files changed, 155 insertions(+), 125 deletions(-)
--
2.17.1
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/atom/sst-mfld-platform-pcm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c index 2e9222ed9daa..8817eaae6bb7 100644 --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c @@ -392,7 +392,7 @@ static int sst_enable_ssp(struct snd_pcm_substream *substream, { int ret = 0; - if (!dai->active) { + if (!snd_soc_dai_active(dai)) { ret = sst_handle_vb_timer(dai, true); sst_fill_ssp_defaults(dai); } @@ -405,7 +405,7 @@ static int sst_be_hw_params(struct snd_pcm_substream *substream, { int ret = 0; - if (dai->active == 1) + if (snd_soc_dai_active(dai) == 1) ret = send_ssp_cmd(dai, dai->name, 1); return ret; } @@ -414,7 +414,7 @@ static int sst_set_format(struct snd_soc_dai *dai, unsigned int fmt) { int ret = 0; - if (!dai->active) + if (!snd_soc_dai_active(dai)) return 0; ret = sst_fill_ssp_config(dai, fmt); @@ -429,7 +429,7 @@ static int sst_platform_set_ssp_slot(struct snd_soc_dai *dai, int slots, int slot_width) { int ret = 0; - if (!dai->active) + if (!snd_soc_dai_active(dai)) return ret; ret = sst_fill_ssp_slot(dai, tx_mask, rx_mask, slots, slot_width); @@ -442,7 +442,7 @@ static int sst_platform_set_ssp_slot(struct snd_soc_dai *dai, static void sst_disable_ssp(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - if (!dai->active) { + if (!snd_soc_dai_active(dai)) { send_ssp_cmd(dai, dai->name, 0); sst_handle_vb_timer(dai, false); } @@ -743,7 +743,7 @@ static int sst_soc_prepare(struct device *dev) for_each_card_rtds(drv->soc_card, rtd) { struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); - if (dai->active) { + if (snd_soc_dai_active(dai)) { send_ssp_cmd(dai, dai->name, 0); sst_handle_vb_timer(dai, false); } @@ -764,7 +764,7 @@ static void sst_soc_complete(struct device *dev) for_each_card_rtds(drv->soc_card, rtd) { struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); - if (dai->active) { + if (snd_soc_dai_active(dai)) { sst_handle_vb_timer(dai, true); send_ssp_cmd(dai, dai->name, 1); } |