summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-02-25 00:48:25 +0300
committerMark Brown <broonie@kernel.org>2020-02-25 00:48:25 +0300
commit6bff73c6115d088fee4d09aff65e145b990382eb (patch)
tree1ed2b6350e794c49f389f0fec2c7e1234941ed3b /include/sound
parentd2aaa8d8bfba93237ac944ee058fb98e2c2ef983 (diff)
parent154dae87e73faa6d56265f22cae16dcdcea3dbb0 (diff)
downloadlinux-6bff73c6115d088fee4d09aff65e145b990382eb.tar.xz
ASoC: soc-pcm cleanup step4
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: Hi Mark These are soc-pcm cleanup step4. [01/13] - [06/13] are posted but not yet accepted patches. To avoid conflict, I merged these into step4. These patches are already received Reviewed-by from Pierre-Louis. Subject: [PATCH 0/6] ASoC: use for_each_rtd_codec_dai() macro Date: Thu, 13 Feb 2020 13:08:07 +0900 Kuninori Morimoto (13): 1) ASoC: soundwaire: qcom: use for_each_rtd_codec_dai() macro 2) ASoC: qcom: sdm845: use for_each_rtd_codec_dai() macro 3) ASoC: qcom: apq8016_sbc: use for_each_rtd_codec_dai() macro 4) ASoC: intel: cml_rt1011_rt5682: use for_each_rtd_codec_dai() macro 5) ASoC: intel: kbl_da7219_max98927: use for_each_rtd_codec_dai() macro 6) ASoC: mediatek: mt8183-da7219-max98357: use for_each_rtd_codec_dai() macro 7) ASoC: soc-pcm: add snd_soc_dai_get_pcm_stream() 8) ASoC: soc-pcm: cleanup soc_pcm_apply_msb() 9) ASoC: soc-pcm: add snd_soc_dai_get_widget() 10) ASoC: soc-pcm: merge dpcm_run_new/old_update() into dpcm_fe_runtime_update() 11) ASoC: soc-pcm: move dpcm_path_put() to soc-pcm.c 12) ASoC: soc-pcm: move CONFIG_DEBUG_FS functions to top side 13) ASoC: soc-pcm: add dpcm_create/remove_debugfs_state() drivers/soundwire/qcom.c | 7 +- include/sound/soc-dai.h | 15 + include/sound/soc-dapm.h | 1 + include/sound/soc-dpcm.h | 7 +- sound/soc/intel/boards/cml_rt1011_rt5682.c | 3 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 8 +- sound/soc/intel/skylake/skl-pcm.c | 10 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 8 +- sound/soc/qcom/apq8016_sbc.c | 7 +- sound/soc/qcom/sdm845.c | 20 +- sound/soc/soc-dai.c | 7 +- sound/soc/soc-dapm.c | 20 +- sound/soc/soc-pcm.c | 462 ++++++++---------- 13 files changed, 266 insertions(+), 309 deletions(-) -- 2.17.1 Thank you for your help !! Best regards --- Kuninori Morimoto
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dai.h15
-rw-r--r--include/sound/soc-dapm.h1
-rw-r--r--include/sound/soc-dpcm.h7
3 files changed, 17 insertions, 6 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 7481e468be39..92c382690930 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -352,6 +352,21 @@ struct snd_soc_dai {
unsigned int started:1;
};
+static inline struct snd_soc_pcm_stream *
+snd_soc_dai_get_pcm_stream(const struct snd_soc_dai *dai, int stream)
+{
+ return (stream == SNDRV_PCM_STREAM_PLAYBACK) ?
+ &dai->driver->playback : &dai->driver->capture;
+}
+
+static inline
+struct snd_soc_dapm_widget *snd_soc_dai_get_widget(
+ struct snd_soc_dai *dai, int stream)
+{
+ return (stream == SNDRV_PCM_STREAM_PLAYBACK) ?
+ dai->playback_widget : dai->capture_widget;
+}
+
static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai,
const struct snd_pcm_substream *ss)
{
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 9439e75945f6..464b20acd720 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -484,6 +484,7 @@ int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream,
struct snd_soc_dapm_widget_list **list,
bool (*custom_stop_condition)(struct snd_soc_dapm_widget *,
enum snd_soc_dapm_direction));
+void snd_soc_dapm_dai_free_widgets(struct snd_soc_dapm_widget_list **list);
struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm(
struct snd_kcontrol *kcontrol);
diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h
index 3e7819d2a6aa..40223577ec4a 100644
--- a/include/sound/soc-dpcm.h
+++ b/include/sound/soc-dpcm.h
@@ -145,6 +145,7 @@ static inline void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd)
int dpcm_path_get(struct snd_soc_pcm_runtime *fe,
int stream, struct snd_soc_dapm_widget_list **list_);
+void dpcm_path_put(struct snd_soc_dapm_widget_list **list);
int dpcm_process_paths(struct snd_soc_pcm_runtime *fe,
int stream, struct snd_soc_dapm_widget_list **list, int new);
int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream);
@@ -158,10 +159,4 @@ int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream);
int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
int event);
-static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list)
-{
- kfree(*list);
-}
-
-
#endif