Loading include/sound/soc-dpcm.h +19 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #define __LINUX_SND_SOC_DPCM_H #include <linux/list.h> #include <linux/slab.h> #include <sound/pcm.h> struct snd_soc_pcm_runtime; Loading Loading @@ -135,4 +136,22 @@ int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute); int soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd); int soc_dpcm_runtime_update(struct snd_soc_dapm_widget *); int dpcm_path_get(struct snd_soc_pcm_runtime *fe, int stream, 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); int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream); void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream); void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream); int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream); int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int tream); int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd); int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream); static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list) { kfree(*list); } #endif sound/soc/soc-pcm.c +10 −16 Original line number Diff line number Diff line Loading @@ -793,7 +793,7 @@ static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe, } /* disconnect a BE and FE */ static void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm, *d; Loading Loading @@ -889,7 +889,7 @@ static int widget_in_list(struct snd_soc_dapm_widget_list *list, return 0; } static int dpcm_path_get(struct snd_soc_pcm_runtime *fe, int dpcm_path_get(struct snd_soc_pcm_runtime *fe, int stream, struct snd_soc_dapm_widget_list **list_) { struct snd_soc_dai *cpu_dai = fe->cpu_dai; Loading @@ -911,11 +911,6 @@ static int dpcm_path_get(struct snd_soc_pcm_runtime *fe, return paths; } static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list) { kfree(*list); } static int dpcm_prune_paths(struct snd_soc_pcm_runtime *fe, int stream, struct snd_soc_dapm_widget_list **list_) { Loading Loading @@ -1010,7 +1005,7 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream, * Find the corresponding BE DAIs that source or sink audio to this * FE substream. */ static int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, int stream, struct snd_soc_dapm_widget_list **list, int new) { if (new) Loading @@ -1019,7 +1014,7 @@ static int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, return dpcm_prune_paths(fe, stream, list); } static void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream) void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; Loading Loading @@ -1057,7 +1052,7 @@ static void dpcm_be_dai_startup_unwind(struct snd_soc_pcm_runtime *fe, } } static int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; int err, count = 0; Loading Loading @@ -1199,7 +1194,7 @@ be_err: return ret; } static int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; Loading Loading @@ -1260,7 +1255,7 @@ static int dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream) return 0; } static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; Loading Loading @@ -1325,7 +1320,7 @@ static int dpcm_fe_dai_hw_free(struct snd_pcm_substream *substream) return 0; } static int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; int ret; Loading Loading @@ -1455,8 +1450,7 @@ static int dpcm_do_trigger(struct snd_soc_dpcm *dpcm, return ret; } static int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd) int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd) { struct snd_soc_dpcm *dpcm; int ret = 0; Loading Loading @@ -1625,7 +1619,7 @@ out: return ret; } static int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; int ret = 0; Loading Loading
include/sound/soc-dpcm.h +19 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #define __LINUX_SND_SOC_DPCM_H #include <linux/list.h> #include <linux/slab.h> #include <sound/pcm.h> struct snd_soc_pcm_runtime; Loading Loading @@ -135,4 +136,22 @@ int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute); int soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd); int soc_dpcm_runtime_update(struct snd_soc_dapm_widget *); int dpcm_path_get(struct snd_soc_pcm_runtime *fe, int stream, 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); int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream); void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream); void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream); int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream); int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int tream); int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd); int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream); static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list) { kfree(*list); } #endif
sound/soc/soc-pcm.c +10 −16 Original line number Diff line number Diff line Loading @@ -793,7 +793,7 @@ static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe, } /* disconnect a BE and FE */ static void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm, *d; Loading Loading @@ -889,7 +889,7 @@ static int widget_in_list(struct snd_soc_dapm_widget_list *list, return 0; } static int dpcm_path_get(struct snd_soc_pcm_runtime *fe, int dpcm_path_get(struct snd_soc_pcm_runtime *fe, int stream, struct snd_soc_dapm_widget_list **list_) { struct snd_soc_dai *cpu_dai = fe->cpu_dai; Loading @@ -911,11 +911,6 @@ static int dpcm_path_get(struct snd_soc_pcm_runtime *fe, return paths; } static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list) { kfree(*list); } static int dpcm_prune_paths(struct snd_soc_pcm_runtime *fe, int stream, struct snd_soc_dapm_widget_list **list_) { Loading Loading @@ -1010,7 +1005,7 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream, * Find the corresponding BE DAIs that source or sink audio to this * FE substream. */ static int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, int stream, struct snd_soc_dapm_widget_list **list, int new) { if (new) Loading @@ -1019,7 +1014,7 @@ static int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, return dpcm_prune_paths(fe, stream, list); } static void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream) void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; Loading Loading @@ -1057,7 +1052,7 @@ static void dpcm_be_dai_startup_unwind(struct snd_soc_pcm_runtime *fe, } } static int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; int err, count = 0; Loading Loading @@ -1199,7 +1194,7 @@ be_err: return ret; } static int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; Loading Loading @@ -1260,7 +1255,7 @@ static int dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream) return 0; } static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; Loading Loading @@ -1325,7 +1320,7 @@ static int dpcm_fe_dai_hw_free(struct snd_pcm_substream *substream) return 0; } static int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; int ret; Loading Loading @@ -1455,8 +1450,7 @@ static int dpcm_do_trigger(struct snd_soc_dpcm *dpcm, return ret; } static int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd) int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd) { struct snd_soc_dpcm *dpcm; int ret = 0; Loading Loading @@ -1625,7 +1619,7 @@ out: return ret; } static int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) { struct snd_soc_dpcm *dpcm; int ret = 0; Loading