Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: convert asoc_xxx() to snd_soc_xxx()

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

ASoC is using 2 type of prefix (asoc_xxx() vs snd_soc_xxx()), but there
is no particular reason about that [1].
To reduce confusing, standarding these to snd_soc_xxx() is sensible.

This patch adds asoc_xxx() macro to keep compatible for a while.
It will be removed if all drivers were switched to new style.

Link: https://lore.kernel.org/r/87h6td3hus.wl-kuninori.morimoto.gx@renesas.com [1]

+1295 -1240
+1 -1
drivers/soundwire/intel.c
··· 759 759 } 760 760 761 761 if (dai_runtime->suspended) { 762 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 762 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 763 763 struct snd_pcm_hw_params *hw_params; 764 764 765 765 hw_params = &rtd->dpcm[substream->stream].hw_params;
+1 -1
drivers/soundwire/intel_ace2x.c
··· 327 327 } 328 328 329 329 if (dai_runtime->suspended) { 330 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 330 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 331 331 struct snd_pcm_hw_params *hw_params; 332 332 333 333 hw_params = &rtd->dpcm[substream->stream].hw_params;
+1 -1
drivers/soundwire/stream.c
··· 1819 1819 struct snd_soc_dai *dai; 1820 1820 1821 1821 /* Find stream from first CPU DAI */ 1822 - dai = asoc_rtd_to_cpu(rtd, 0); 1822 + dai = snd_soc_rtd_to_cpu(rtd, 0); 1823 1823 1824 1824 sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); 1825 1825
+8 -8
include/sound/graph_card.h
··· 9 9 10 10 #include <sound/simple_card_utils.h> 11 11 12 - typedef int (*GRAPH2_CUSTOM)(struct asoc_simple_priv *priv, 12 + typedef int (*GRAPH2_CUSTOM)(struct simple_util_priv *priv, 13 13 struct device_node *lnk, 14 14 struct link_info *li); 15 15 16 16 struct graph2_custom_hooks { 17 - int (*hook_pre)(struct asoc_simple_priv *priv); 18 - int (*hook_post)(struct asoc_simple_priv *priv); 17 + int (*hook_pre)(struct simple_util_priv *priv); 18 + int (*hook_post)(struct simple_util_priv *priv); 19 19 GRAPH2_CUSTOM custom_normal; 20 20 GRAPH2_CUSTOM custom_dpcm; 21 21 GRAPH2_CUSTOM custom_c2c; 22 22 }; 23 23 24 - int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev); 25 - int audio_graph2_parse_of(struct asoc_simple_priv *priv, struct device *dev, 24 + int audio_graph_parse_of(struct simple_util_priv *priv, struct device *dev); 25 + int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev, 26 26 struct graph2_custom_hooks *hooks); 27 27 28 - int audio_graph2_link_normal(struct asoc_simple_priv *priv, 28 + int audio_graph2_link_normal(struct simple_util_priv *priv, 29 29 struct device_node *lnk, struct link_info *li); 30 - int audio_graph2_link_dpcm(struct asoc_simple_priv *priv, 30 + int audio_graph2_link_dpcm(struct simple_util_priv *priv, 31 31 struct device_node *lnk, struct link_info *li); 32 - int audio_graph2_link_c2c(struct asoc_simple_priv *priv, 32 + int audio_graph2_link_c2c(struct simple_util_priv *priv, 33 33 struct device_node *lnk, struct link_info *li); 34 34 35 35 #endif /* __GRAPH_CARD_H */
+6 -3
include/sound/simple_card.h
··· 12 12 #include <sound/soc.h> 13 13 #include <sound/simple_card_utils.h> 14 14 15 - struct asoc_simple_card_info { 15 + /* REMOVE ME */ 16 + #define asoc_simple_card_info simple_util_info 17 + 18 + struct simple_util_info { 16 19 const char *name; 17 20 const char *card; 18 21 const char *codec; 19 22 const char *platform; 20 23 21 24 unsigned int daifmt; 22 - struct asoc_simple_dai cpu_dai; 23 - struct asoc_simple_dai codec_dai; 25 + struct simple_util_dai cpu_dai; 26 + struct simple_util_dai codec_dai; 24 27 }; 25 28 26 29 #endif /* __SIMPLE_CARD_H */
+93 -53
include/sound/simple_card_utils.h
··· 11 11 #include <linux/clk.h> 12 12 #include <sound/soc.h> 13 13 14 - #define asoc_simple_init_hp(card, sjack, prefix) \ 15 - asoc_simple_init_jack(card, sjack, 1, prefix, NULL) 16 - #define asoc_simple_init_mic(card, sjack, prefix) \ 17 - asoc_simple_init_jack(card, sjack, 0, prefix, NULL) 14 + /* REMOVE ME */ 15 + #define asoc_simple_init_hp simple_util_init_hp 16 + #define asoc_simple_init_mic simple_util_init_mic 18 17 19 - struct asoc_simple_tdm_width_map { 18 + #define simple_util_init_hp(card, sjack, prefix) \ 19 + simple_util_init_jack(card, sjack, 1, prefix, NULL) 20 + #define simple_util_init_mic(card, sjack, prefix) \ 21 + simple_util_init_jack(card, sjack, 0, prefix, NULL) 22 + 23 + /* REMOVE ME */ 24 + #define asoc_simple_tdm_width_map simple_util_tdm_width_map 25 + #define asoc_simple_dai simple_util_dai 26 + #define asoc_simple_data simple_util_data 27 + #define asoc_simple_jack simple_util_jack 28 + #define asoc_simple_priv simple_util_priv 29 + 30 + struct simple_util_tdm_width_map { 20 31 u8 sample_bits; 21 32 u8 slot_count; 22 33 u16 slot_width; 23 34 }; 24 35 25 - struct asoc_simple_dai { 36 + struct simple_util_dai { 26 37 const char *name; 27 38 unsigned int sysclk; 28 39 int clk_direction; ··· 43 32 unsigned int rx_slot_mask; 44 33 struct clk *clk; 45 34 bool clk_fixed; 46 - struct asoc_simple_tdm_width_map *tdm_width_map; 35 + struct simple_util_tdm_width_map *tdm_width_map; 47 36 int n_tdm_widths; 48 37 }; 49 38 50 - struct asoc_simple_data { 39 + struct simple_util_data { 51 40 u32 convert_rate; 52 41 u32 convert_channels; 53 42 const char *convert_sample_format; 54 43 }; 55 44 56 - struct asoc_simple_jack { 45 + struct simple_util_jack { 57 46 struct snd_soc_jack jack; 58 47 struct snd_soc_jack_pin pin; 59 48 struct snd_soc_jack_gpio gpio; ··· 65 54 int platforms; 66 55 }; 67 56 68 - struct asoc_simple_priv { 57 + struct simple_util_priv { 69 58 struct snd_soc_card snd_card; 70 59 struct simple_dai_props { 71 - struct asoc_simple_dai *cpu_dai; 72 - struct asoc_simple_dai *codec_dai; 73 - struct asoc_simple_data adata; 60 + struct simple_util_dai *cpu_dai; 61 + struct simple_util_dai *codec_dai; 62 + struct simple_util_data adata; 74 63 struct snd_soc_codec_conf *codec_conf; 75 64 struct prop_nums num; 76 65 unsigned int mclk_fs; 77 66 } *dai_props; 78 - struct asoc_simple_jack hp_jack; 79 - struct asoc_simple_jack mic_jack; 67 + struct simple_util_jack hp_jack; 68 + struct simple_util_jack mic_jack; 80 69 struct snd_soc_jack *aux_jacks; 81 70 struct snd_soc_dai_link *dai_link; 82 - struct asoc_simple_dai *dais; 71 + struct simple_util_dai *dais; 83 72 struct snd_soc_dai_link_component *dlcs; 84 73 struct snd_soc_codec_conf *codec_conf; 85 74 struct gpio_desc *pa_gpio; ··· 141 130 struct prop_nums num[SNDRV_MAX_LINKS]; 142 131 }; 143 132 144 - int asoc_simple_parse_daifmt(struct device *dev, 133 + /* REMOVE ME */ 134 + #define asoc_simple_parse_daifmt simple_util_parse_daifmt 135 + #define asoc_simple_parse_tdm_width_map simple_util_parse_tdm_width_map 136 + #define asoc_simple_set_dailink_name simple_util_set_dailink_name 137 + #define asoc_simple_parse_card_name simple_util_parse_card_name 138 + #define asoc_simple_parse_clk simple_util_parse_clk 139 + #define asoc_simple_startup simple_util_startup 140 + #define asoc_simple_shutdown simple_util_shutdown 141 + #define asoc_simple_hw_params simple_util_hw_params 142 + #define asoc_simple_dai_init simple_util_dai_init 143 + #define asoc_simple_be_hw_params_fixup simple_util_be_hw_params_fixup 144 + #define asoc_simple_parse_tdm simple_util_parse_tdm 145 + #define asoc_simple_canonicalize_platform simple_util_canonicalize_platform 146 + #define asoc_simple_canonicalize_cpu simple_util_canonicalize_cpu 147 + #define asoc_simple_clean_reference simple_util_clean_reference 148 + #define asoc_simple_parse_convert simple_util_parse_convert 149 + #define asoc_simple_is_convert_required simple_util_is_convert_required 150 + #define asoc_simple_parse_routing simple_util_parse_routing 151 + #define asoc_simple_parse_widgets simple_util_parse_widgets 152 + #define asoc_simple_parse_pin_switches simple_util_parse_pin_switches 153 + #define asoc_simple_init_jack simple_util_init_jack 154 + #define asoc_simple_init_aux_jacks simple_util_init_aux_jacks 155 + #define asoc_simple_init_priv simple_util_init_priv 156 + #define asoc_simple_remove simple_util_remove 157 + #define asoc_simple_debug_info simple_util_debug_info 158 + #define asoc_graph_card_probe graph_util_card_probe 159 + #define asoc_graph_is_ports0 graph_util_is_ports0 160 + #define asoc_graph_parse_dai graph_util_parse_dai 161 + 162 + int simple_util_parse_daifmt(struct device *dev, 145 163 struct device_node *node, 146 164 struct device_node *codec, 147 165 char *prefix, 148 166 unsigned int *retfmt); 149 - int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np, 150 - struct asoc_simple_dai *dai); 167 + int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np, 168 + struct simple_util_dai *dai); 151 169 152 170 __printf(3, 4) 153 - int asoc_simple_set_dailink_name(struct device *dev, 171 + int simple_util_set_dailink_name(struct device *dev, 154 172 struct snd_soc_dai_link *dai_link, 155 173 const char *fmt, ...); 156 - int asoc_simple_parse_card_name(struct snd_soc_card *card, 174 + int simple_util_parse_card_name(struct snd_soc_card *card, 157 175 char *prefix); 158 176 159 - int asoc_simple_parse_clk(struct device *dev, 177 + int simple_util_parse_clk(struct device *dev, 160 178 struct device_node *node, 161 - struct asoc_simple_dai *simple_dai, 179 + struct simple_util_dai *simple_dai, 162 180 struct snd_soc_dai_link_component *dlc); 163 - int asoc_simple_startup(struct snd_pcm_substream *substream); 164 - void asoc_simple_shutdown(struct snd_pcm_substream *substream); 165 - int asoc_simple_hw_params(struct snd_pcm_substream *substream, 181 + int simple_util_startup(struct snd_pcm_substream *substream); 182 + void simple_util_shutdown(struct snd_pcm_substream *substream); 183 + int simple_util_hw_params(struct snd_pcm_substream *substream, 166 184 struct snd_pcm_hw_params *params); 167 - int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd); 168 - int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, 185 + int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd); 186 + int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, 169 187 struct snd_pcm_hw_params *params); 170 188 171 - #define asoc_simple_parse_tdm(np, dai) \ 189 + #define simple_util_parse_tdm(np, dai) \ 172 190 snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \ 173 191 &(dai)->rx_slot_mask, \ 174 192 &(dai)->slots, \ 175 193 &(dai)->slot_width); 176 194 177 - void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms, 195 + void simple_util_canonicalize_platform(struct snd_soc_dai_link_component *platforms, 178 196 struct snd_soc_dai_link_component *cpus); 179 - void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, 197 + void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, 180 198 int is_single_links); 181 199 182 - void asoc_simple_clean_reference(struct snd_soc_card *card); 200 + void simple_util_clean_reference(struct snd_soc_card *card); 183 201 184 - void asoc_simple_parse_convert(struct device_node *np, char *prefix, 185 - struct asoc_simple_data *data); 186 - bool asoc_simple_is_convert_required(const struct asoc_simple_data *data); 202 + void simple_util_parse_convert(struct device_node *np, char *prefix, 203 + struct simple_util_data *data); 204 + bool simple_util_is_convert_required(const struct simple_util_data *data); 187 205 188 - int asoc_simple_parse_routing(struct snd_soc_card *card, 206 + int simple_util_parse_routing(struct snd_soc_card *card, 189 207 char *prefix); 190 - int asoc_simple_parse_widgets(struct snd_soc_card *card, 208 + int simple_util_parse_widgets(struct snd_soc_card *card, 191 209 char *prefix); 192 - int asoc_simple_parse_pin_switches(struct snd_soc_card *card, 210 + int simple_util_parse_pin_switches(struct snd_soc_card *card, 193 211 char *prefix); 194 212 195 - int asoc_simple_init_jack(struct snd_soc_card *card, 196 - struct asoc_simple_jack *sjack, 213 + int simple_util_init_jack(struct snd_soc_card *card, 214 + struct simple_util_jack *sjack, 197 215 int is_hp, char *prefix, char *pin); 198 - int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv, 216 + int simple_util_init_aux_jacks(struct simple_util_priv *priv, 199 217 char *prefix); 200 - int asoc_simple_init_priv(struct asoc_simple_priv *priv, 218 + int simple_util_init_priv(struct simple_util_priv *priv, 201 219 struct link_info *li); 202 - int asoc_simple_remove(struct platform_device *pdev); 220 + int simple_util_remove(struct platform_device *pdev); 203 221 204 - int asoc_graph_card_probe(struct snd_soc_card *card); 205 - int asoc_graph_is_ports0(struct device_node *port); 206 - int asoc_graph_parse_dai(struct device *dev, struct device_node *ep, 222 + int graph_util_card_probe(struct snd_soc_card *card); 223 + int graph_util_is_ports0(struct device_node *port); 224 + int graph_util_parse_dai(struct device *dev, struct device_node *ep, 207 225 struct snd_soc_dai_link_component *dlc, int *is_single_link); 208 226 209 227 #ifdef DEBUG 210 - static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, 228 + static inline void simple_util_debug_dai(struct simple_util_priv *priv, 211 229 char *name, 212 - struct asoc_simple_dai *dai) 230 + struct simple_util_dai *dai) 213 231 { 214 232 struct device *dev = simple_priv_to_dev(priv); 215 233 ··· 268 228 name, dai->clk_direction ? "OUT" : "IN"); 269 229 } 270 230 271 - static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv) 231 + static inline void simple_util_debug_info(struct simple_util_priv *priv) 272 232 { 273 233 struct snd_soc_card *card = simple_priv_to_card(priv); 274 234 struct device *dev = simple_priv_to_dev(priv); ··· 281 241 for (i = 0; i < card->num_links; i++) { 282 242 struct simple_dai_props *props = simple_priv_to_props(priv, i); 283 243 struct snd_soc_dai_link *link = simple_priv_to_link(priv, i); 284 - struct asoc_simple_dai *dai; 244 + struct simple_util_dai *dai; 285 245 struct snd_soc_codec_conf *cnf; 286 246 int j; 287 247 ··· 289 249 290 250 dev_dbg(dev, "cpu num = %d\n", link->num_cpus); 291 251 for_each_prop_dai_cpu(props, j, dai) 292 - asoc_simple_debug_dai(priv, "cpu", dai); 252 + simple_util_debug_dai(priv, "cpu", dai); 293 253 dev_dbg(dev, "codec num = %d\n", link->num_codecs); 294 254 for_each_prop_dai_codec(props, j, dai) 295 - asoc_simple_debug_dai(priv, "codec", dai); 255 + simple_util_debug_dai(priv, "codec", dai); 296 256 297 257 if (link->name) 298 258 dev_dbg(dev, "dai name = %s\n", link->name); ··· 310 270 } 311 271 } 312 272 #else 313 - #define asoc_simple_debug_info(priv) 273 + #define simple_util_debug_info(priv) 314 274 #endif /* DEBUG */ 315 275 316 276 #endif /* __SIMPLE_CARD_UTILS_H */
+2 -2
include/sound/soc-card.h
··· 115 115 struct snd_soc_pcm_runtime *rtd; 116 116 117 117 for_each_card_rtds(card, rtd) { 118 - if (!strcmp(asoc_rtd_to_codec(rtd, 0)->name, dai_name)) 119 - return asoc_rtd_to_codec(rtd, 0); 118 + if (!strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, dai_name)) 119 + return snd_soc_rtd_to_codec(rtd, 0); 120 120 } 121 121 122 122 return NULL;
+28 -14
include/sound/soc.h
··· 775 775 #endif 776 776 }; 777 777 778 + /* REMOVE ME */ 779 + #define asoc_link_to_cpu snd_soc_link_to_cpu 780 + #define asoc_link_to_codec snd_soc_link_to_codec 781 + #define asoc_link_to_platform snd_soc_link_to_platform 782 + 778 783 static inline struct snd_soc_dai_link_component* 779 - asoc_link_to_cpu(struct snd_soc_dai_link *link, int n) { 784 + snd_soc_link_to_cpu(struct snd_soc_dai_link *link, int n) { 780 785 return &(link)->cpus[n]; 781 786 } 782 787 783 788 static inline struct snd_soc_dai_link_component* 784 - asoc_link_to_codec(struct snd_soc_dai_link *link, int n) { 789 + snd_soc_link_to_codec(struct snd_soc_dai_link *link, int n) { 785 790 return &(link)->codecs[n]; 786 791 } 787 792 788 793 static inline struct snd_soc_dai_link_component* 789 - asoc_link_to_platform(struct snd_soc_dai_link *link, int n) { 794 + snd_soc_link_to_platform(struct snd_soc_dai_link *link, int n) { 790 795 return &(link)->platforms[n]; 791 796 } 792 797 793 798 #define for_each_link_codecs(link, i, codec) \ 794 799 for ((i) = 0; \ 795 800 ((i) < link->num_codecs) && \ 796 - ((codec) = asoc_link_to_codec(link, i)); \ 801 + ((codec) = snd_soc_link_to_codec(link, i)); \ 797 802 (i)++) 798 803 799 804 #define for_each_link_platforms(link, i, platform) \ 800 805 for ((i) = 0; \ 801 806 ((i) < link->num_platforms) && \ 802 - ((platform) = asoc_link_to_platform(link, i)); \ 807 + ((platform) = snd_soc_link_to_platform(link, i)); \ 803 808 (i)++) 804 809 805 810 #define for_each_link_cpus(link, i, cpu) \ 806 811 for ((i) = 0; \ 807 812 ((i) < link->num_cpus) && \ 808 - ((cpu) = asoc_link_to_cpu(link, i)); \ 813 + ((cpu) = snd_soc_link_to_cpu(link, i)); \ 809 814 (i)++) 810 815 811 816 /* ··· 896 891 #define COMP_CODEC_CONF(_name) { .name = _name } 897 892 #define COMP_DUMMY() { .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", } 898 893 894 + /* REMOVE ME */ 895 + #define asoc_dummy_dlc snd_soc_dummy_dlc 896 + 899 897 extern struct snd_soc_dai_link_component null_dailink_component[0]; 900 - extern struct snd_soc_dai_link_component asoc_dummy_dlc; 898 + extern struct snd_soc_dai_link_component snd_soc_dummy_dlc; 901 899 902 900 903 901 struct snd_soc_codec_conf { ··· 1118 1110 * dais = cpu_dai + codec_dai 1119 1111 * see 1120 1112 * soc_new_pcm_runtime() 1121 - * asoc_rtd_to_cpu() 1122 - * asoc_rtd_to_codec() 1113 + * snd_soc_rtd_to_cpu() 1114 + * snd_soc_rtd_to_codec() 1123 1115 */ 1124 1116 struct snd_soc_dai **dais; 1125 1117 ··· 1145 1137 int num_components; 1146 1138 struct snd_soc_component *components[]; /* CPU/Codec/Platform */ 1147 1139 }; 1140 + 1141 + /* REMOVE ME */ 1142 + #define asoc_rtd_to_cpu snd_soc_rtd_to_cpu 1143 + #define asoc_rtd_to_codec snd_soc_rtd_to_codec 1144 + #define asoc_substream_to_rtd snd_soc_substream_to_rtd 1145 + 1148 1146 /* see soc_new_pcm_runtime() */ 1149 - #define asoc_rtd_to_cpu(rtd, n) (rtd)->dais[n] 1150 - #define asoc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->dai_link->num_cpus] 1151 - #define asoc_substream_to_rtd(substream) \ 1147 + #define snd_soc_rtd_to_cpu(rtd, n) (rtd)->dais[n] 1148 + #define snd_soc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->dai_link->num_cpus] 1149 + #define snd_soc_substream_to_rtd(substream) \ 1152 1150 (struct snd_soc_pcm_runtime *)snd_pcm_substream_chip(substream) 1153 1151 1154 1152 #define for_each_rtd_components(rtd, i, component) \ ··· 1163 1149 (i)++) 1164 1150 #define for_each_rtd_cpu_dais(rtd, i, dai) \ 1165 1151 for ((i) = 0; \ 1166 - ((i) < rtd->dai_link->num_cpus) && ((dai) = asoc_rtd_to_cpu(rtd, i)); \ 1152 + ((i) < rtd->dai_link->num_cpus) && ((dai) = snd_soc_rtd_to_cpu(rtd, i)); \ 1167 1153 (i)++) 1168 1154 #define for_each_rtd_codec_dais(rtd, i, dai) \ 1169 1155 for ((i) = 0; \ 1170 - ((i) < rtd->dai_link->num_codecs) && ((dai) = asoc_rtd_to_codec(rtd, i)); \ 1156 + ((i) < rtd->dai_link->num_codecs) && ((dai) = snd_soc_rtd_to_codec(rtd, i)); \ 1171 1157 (i)++) 1172 1158 #define for_each_rtd_dais(rtd, i, dai) \ 1173 1159 for ((i) = 0; \
+4 -4
sound/arm/pxa2xx-pcm-lib.c
··· 38 38 struct dma_slave_config config; 39 39 int ret; 40 40 41 - dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 41 + dma_params = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 42 42 if (!dma_params) 43 43 return 0; 44 44 ··· 47 47 return ret; 48 48 49 49 snd_dmaengine_pcm_set_config_from_dai_data(substream, 50 - snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream), 50 + snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream), 51 51 &config); 52 52 53 53 ret = dmaengine_slave_config(chan, &config); ··· 86 86 87 87 runtime->hw = pxa2xx_pcm_hardware; 88 88 89 - dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 89 + dma_params = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 90 90 if (!dma_params) 91 91 return 0; 92 92 ··· 111 111 return ret; 112 112 113 113 return snd_dmaengine_pcm_open( 114 - substream, dma_request_slave_channel(asoc_rtd_to_cpu(rtd, 0)->dev, 114 + substream, dma_request_slave_channel(snd_soc_rtd_to_cpu(rtd, 0)->dev, 115 115 dma_params->chan_name)); 116 116 } 117 117 EXPORT_SYMBOL(pxa2xx_pcm_open);
+14 -14
sound/soc/amd/acp-da7219-max98357a.c
··· 54 54 { 55 55 int ret; 56 56 struct snd_soc_card *card = rtd->card; 57 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 57 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 58 58 struct snd_soc_component *component = codec_dai->component; 59 59 60 60 dev_info(rtd->dev, "codec dai name = %s\n", codec_dai->name); ··· 106 106 static int da7219_clk_enable(struct snd_pcm_substream *substream) 107 107 { 108 108 int ret = 0; 109 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 109 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 110 110 111 111 /* 112 112 * Set wclk to 48000 because the rate constraint of this driver is ··· 134 134 { 135 135 int ret; 136 136 struct snd_soc_card *card = rtd->card; 137 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 137 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 138 138 struct snd_soc_component *component = codec_dai->component; 139 139 140 140 dev_info(codec_dai->dev, "codec dai name = %s\n", codec_dai->name); ··· 191 191 static int rt5682_clk_enable(struct snd_pcm_substream *substream) 192 192 { 193 193 int ret; 194 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 194 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 195 195 196 196 /* 197 197 * Set wclk to 48000 because the rate constraint of this driver is ··· 245 245 static int cz_da7219_play_startup(struct snd_pcm_substream *substream) 246 246 { 247 247 struct snd_pcm_runtime *runtime = substream->runtime; 248 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 248 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 249 249 struct snd_soc_card *card = rtd->card; 250 250 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 251 251 ··· 266 266 static int cz_da7219_cap_startup(struct snd_pcm_substream *substream) 267 267 { 268 268 struct snd_pcm_runtime *runtime = substream->runtime; 269 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 269 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 270 270 struct snd_soc_card *card = rtd->card; 271 271 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 272 272 ··· 288 288 static int cz_max_startup(struct snd_pcm_substream *substream) 289 289 { 290 290 struct snd_pcm_runtime *runtime = substream->runtime; 291 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 291 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 292 292 struct snd_soc_card *card = rtd->card; 293 293 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 294 294 ··· 309 309 static int cz_dmic0_startup(struct snd_pcm_substream *substream) 310 310 { 311 311 struct snd_pcm_runtime *runtime = substream->runtime; 312 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 312 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 313 313 struct snd_soc_card *card = rtd->card; 314 314 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 315 315 ··· 330 330 static int cz_dmic1_startup(struct snd_pcm_substream *substream) 331 331 { 332 332 struct snd_pcm_runtime *runtime = substream->runtime; 333 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 333 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 334 334 struct snd_soc_card *card = rtd->card; 335 335 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 336 336 ··· 357 357 static int cz_rt5682_play_startup(struct snd_pcm_substream *substream) 358 358 { 359 359 struct snd_pcm_runtime *runtime = substream->runtime; 360 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 360 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 361 361 struct snd_soc_card *card = rtd->card; 362 362 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 363 363 ··· 378 378 static int cz_rt5682_cap_startup(struct snd_pcm_substream *substream) 379 379 { 380 380 struct snd_pcm_runtime *runtime = substream->runtime; 381 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 381 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 382 382 struct snd_soc_card *card = rtd->card; 383 383 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 384 384 ··· 400 400 static int cz_rt5682_max_startup(struct snd_pcm_substream *substream) 401 401 { 402 402 struct snd_pcm_runtime *runtime = substream->runtime; 403 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 403 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 404 404 struct snd_soc_card *card = rtd->card; 405 405 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 406 406 ··· 421 421 static int cz_rt5682_dmic0_startup(struct snd_pcm_substream *substream) 422 422 { 423 423 struct snd_pcm_runtime *runtime = substream->runtime; 424 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 424 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 425 425 struct snd_soc_card *card = rtd->card; 426 426 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 427 427 ··· 442 442 static int cz_rt5682_dmic1_startup(struct snd_pcm_substream *substream) 443 443 { 444 444 struct snd_pcm_runtime *runtime = substream->runtime; 445 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 445 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 446 446 struct snd_soc_card *card = rtd->card; 447 447 struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); 448 448
+3 -3
sound/soc/amd/acp-es8336.c
··· 62 62 struct snd_soc_card *card; 63 63 struct snd_soc_component *codec; 64 64 65 - codec = asoc_rtd_to_codec(rtd, 0)->component; 65 + codec = snd_soc_rtd_to_codec(rtd, 0)->component; 66 66 card = rtd->card; 67 67 68 68 ret = snd_soc_card_jack_new_pins(card, "Headset", SND_JACK_HEADSET | SND_JACK_BTN_0, ··· 111 111 int ret; 112 112 113 113 runtime = substream->runtime; 114 - rtd = asoc_substream_to_rtd(substream); 114 + rtd = snd_soc_substream_to_rtd(substream); 115 115 card = rtd->card; 116 116 machine = snd_soc_card_get_drvdata(card); 117 - codec_dai = asoc_rtd_to_codec(rtd, 0); 117 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 118 118 ret = snd_soc_dai_set_sysclk(codec_dai, 0, ES8336_PLL_FREQ, SND_SOC_CLOCK_IN); 119 119 if (ret < 0) { 120 120 dev_err(rtd->dev, "can't set codec sysclk: %d\n", ret);
+1 -1
sound/soc/amd/acp-pcm-dma.c
··· 849 849 u32 val = 0; 850 850 struct snd_pcm_runtime *runtime; 851 851 struct audio_substream_data *rtd; 852 - struct snd_soc_pcm_runtime *prtd = asoc_substream_to_rtd(substream); 852 + struct snd_soc_pcm_runtime *prtd = snd_soc_substream_to_rtd(substream); 853 853 struct audio_drv_data *adata = dev_get_drvdata(component->dev); 854 854 struct snd_soc_card *card = prtd->card; 855 855 struct acp_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+3 -3
sound/soc/amd/acp-rt5645.c
··· 57 57 struct snd_pcm_hw_params *params) 58 58 { 59 59 int ret = 0; 60 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 61 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 60 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 61 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 62 62 63 63 ret = snd_soc_dai_set_pll(codec_dai, 0, RT5645_PLL1_S_MCLK, 64 64 CZ_PLAT_CLK, params_rate(params) * 512); ··· 83 83 struct snd_soc_card *card; 84 84 struct snd_soc_component *codec; 85 85 86 - codec = asoc_rtd_to_codec(rtd, 0)->component; 86 + codec = snd_soc_rtd_to_codec(rtd, 0)->component; 87 87 card = rtd->card; 88 88 89 89 ret = snd_soc_card_jack_new_pins(card, "Headset Jack",
+4 -4
sound/soc/amd/acp/acp-legacy-common.c
··· 80 80 struct snd_soc_pcm_runtime *soc_runtime; 81 81 u32 ext_int_ctrl; 82 82 83 - soc_runtime = asoc_substream_to_rtd(substream); 84 - dai = asoc_rtd_to_cpu(soc_runtime, 0); 83 + soc_runtime = snd_soc_substream_to_rtd(substream); 84 + dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 85 85 /* Programming channel mask and sampling rate */ 86 86 writel(adata->ch_mask, adata->acp_base + ACP_WOV_PDM_NO_OF_CHANNELS); 87 87 writel(PDM_DEC_64, adata->acp_base + ACP_WOV_PDM_DECIMATION_FACTOR); ··· 192 192 struct snd_soc_pcm_runtime *soc_runtime; 193 193 u32 tdm_fmt, reg_val, fmt_reg, val; 194 194 195 - soc_runtime = asoc_substream_to_rtd(substream); 196 - dai = asoc_rtd_to_cpu(soc_runtime, 0); 195 + soc_runtime = snd_soc_substream_to_rtd(substream); 196 + dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 197 197 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 198 198 tdm_fmt = adata->tdm_tx_fmt[stream->dai_id - 1]; 199 199 switch (stream->dai_id) {
+27 -27
sound/soc/amd/acp/acp-mach-common.c
··· 117 117 { 118 118 struct snd_soc_card *card = rtd->card; 119 119 struct acp_card_drvdata *drvdata = card->drvdata; 120 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 120 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 121 121 struct snd_soc_component *component = codec_dai->component; 122 122 int ret; 123 123 ··· 172 172 static int acp_card_hs_startup(struct snd_pcm_substream *substream) 173 173 { 174 174 struct snd_pcm_runtime *runtime = substream->runtime; 175 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 175 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 176 176 struct snd_soc_card *card = rtd->card; 177 177 struct acp_card_drvdata *drvdata = card->drvdata; 178 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 178 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 179 179 int ret; 180 180 unsigned int fmt; 181 181 ··· 206 206 207 207 static void acp_card_shutdown(struct snd_pcm_substream *substream) 208 208 { 209 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 209 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 210 210 struct snd_soc_card *card = rtd->card; 211 211 struct acp_card_drvdata *drvdata = card->drvdata; 212 212 ··· 220 220 struct snd_soc_pcm_runtime *rtd = substream->private_data; 221 221 struct snd_soc_card *card = rtd->card; 222 222 struct acp_card_drvdata *drvdata = card->drvdata; 223 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 224 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 223 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 224 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 225 225 int ret; 226 226 unsigned int fmt, srate, ch, format; 227 227 ··· 342 342 { 343 343 struct snd_soc_card *card = rtd->card; 344 344 struct acp_card_drvdata *drvdata = card->drvdata; 345 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 345 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 346 346 struct snd_soc_component *component = codec_dai->component; 347 347 int ret; 348 348 ··· 402 402 struct snd_soc_pcm_runtime *rtd = substream->private_data; 403 403 struct snd_soc_card *card = rtd->card; 404 404 struct acp_card_drvdata *drvdata = card->drvdata; 405 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 406 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 405 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 406 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 407 407 int ret; 408 408 unsigned int fmt, srate, ch, format; 409 409 ··· 573 573 struct snd_soc_card *card = rtd->card; 574 574 struct acp_card_drvdata *drvdata = card->drvdata; 575 575 struct snd_soc_dai *codec_dai; 576 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 576 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 577 577 int i, ret = 0; 578 578 unsigned int fmt, srate, ch, format; 579 579 ··· 737 737 struct snd_soc_pcm_runtime *rtd = substream->private_data; 738 738 struct snd_soc_card *card = rtd->card; 739 739 struct acp_card_drvdata *drvdata = card->drvdata; 740 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 740 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 741 741 unsigned int fmt, srate, ch, format; 742 742 int ret; 743 743 ··· 928 928 { 929 929 struct snd_soc_card *card = rtd->card; 930 930 struct acp_card_drvdata *drvdata = card->drvdata; 931 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 931 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 932 932 struct snd_soc_component *component = codec_dai->component; 933 933 int ret; 934 934 ··· 980 980 static int acp_nau8825_hw_params(struct snd_pcm_substream *substream, 981 981 struct snd_pcm_hw_params *params) 982 982 { 983 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 983 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 984 984 struct snd_soc_card *card = rtd->card; 985 985 struct acp_card_drvdata *drvdata = card->drvdata; 986 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 987 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 986 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 987 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 988 988 int ret; 989 989 unsigned int fmt; 990 990 ··· 1142 1142 static int acp_8821_init(struct snd_soc_pcm_runtime *rtd) 1143 1143 { 1144 1144 struct snd_soc_card *card = rtd->card; 1145 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 1145 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 1146 1146 struct snd_soc_component *component = codec_dai->component; 1147 1147 int ret; 1148 1148 ··· 1204 1204 static int acp_nau8821_hw_params(struct snd_pcm_substream *substream, 1205 1205 struct snd_pcm_hw_params *params) 1206 1206 { 1207 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1207 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1208 1208 struct snd_soc_card *card = rtd->card; 1209 1209 struct acp_card_drvdata *drvdata = card->drvdata; 1210 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 1210 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 1211 1211 int ret; 1212 1212 unsigned int fmt; 1213 1213 ··· 1358 1358 links[i].no_pcm = 1; 1359 1359 if (!drv_data->hs_codec_id) { 1360 1360 /* Use dummy codec if codec id not specified */ 1361 - links[i].codecs = &asoc_dummy_dlc; 1361 + links[i].codecs = &snd_soc_dummy_dlc; 1362 1362 links[i].num_codecs = 1; 1363 1363 } 1364 1364 if (drv_data->hs_codec_id == RT5682) { ··· 1395 1395 links[i].no_pcm = 1; 1396 1396 if (!drv_data->hs_codec_id) { 1397 1397 /* Use dummy codec if codec id not specified */ 1398 - links[i].codecs = &asoc_dummy_dlc; 1398 + links[i].codecs = &snd_soc_dummy_dlc; 1399 1399 links[i].num_codecs = 1; 1400 1400 } 1401 1401 if (drv_data->hs_codec_id == NAU8825) { ··· 1425 1425 links[i].no_pcm = 1; 1426 1426 if (!drv_data->amp_codec_id) { 1427 1427 /* Use dummy codec if codec id not specified */ 1428 - links[i].codecs = &asoc_dummy_dlc; 1428 + links[i].codecs = &snd_soc_dummy_dlc; 1429 1429 links[i].num_codecs = 1; 1430 1430 } 1431 1431 if (drv_data->amp_codec_id == RT1019) { ··· 1457 1457 links[i].no_pcm = 1; 1458 1458 if (!drv_data->amp_codec_id) { 1459 1459 /* Use dummy codec if codec id not specified */ 1460 - links[i].codecs = &asoc_dummy_dlc; 1460 + links[i].codecs = &snd_soc_dummy_dlc; 1461 1461 links[i].num_codecs = 1; 1462 1462 } 1463 1463 if (drv_data->amp_codec_id == MAX98360A) { ··· 1537 1537 links[i].dpcm_capture = 1; 1538 1538 if (!drv_data->hs_codec_id) { 1539 1539 /* Use dummy codec if codec id not specified */ 1540 - links[i].codecs = &asoc_dummy_dlc; 1540 + links[i].codecs = &snd_soc_dummy_dlc; 1541 1541 links[i].num_codecs = 1; 1542 1542 } 1543 1543 if (drv_data->hs_codec_id == RT5682) { ··· 1578 1578 links[i].dpcm_capture = 1; 1579 1579 if (!drv_data->hs_codec_id) { 1580 1580 /* Use dummy codec if codec id not specified */ 1581 - links[i].codecs = &asoc_dummy_dlc; 1581 + links[i].codecs = &snd_soc_dummy_dlc; 1582 1582 links[i].num_codecs = 1; 1583 1583 } 1584 1584 if (drv_data->hs_codec_id == NAU8825) { ··· 1606 1606 links[i].dpcm_playback = 1; 1607 1607 if (!drv_data->amp_codec_id) { 1608 1608 /* Use dummy codec if codec id not specified */ 1609 - links[i].codecs = &asoc_dummy_dlc; 1609 + links[i].codecs = &snd_soc_dummy_dlc; 1610 1610 links[i].num_codecs = 1; 1611 1611 } 1612 1612 if (drv_data->amp_codec_id == RT1019) { ··· 1641 1641 links[i].dpcm_playback = 1; 1642 1642 if (!drv_data->amp_codec_id) { 1643 1643 /* Use dummy codec if codec id not specified */ 1644 - links[i].codecs = &asoc_dummy_dlc; 1644 + links[i].codecs = &snd_soc_dummy_dlc; 1645 1645 links[i].num_codecs = 1; 1646 1646 } 1647 1647 if (drv_data->amp_codec_id == MAX98360A) { ··· 1669 1669 links[i].num_codecs = ARRAY_SIZE(dmic_codec); 1670 1670 } else { 1671 1671 /* Use dummy codec if codec id not specified */ 1672 - links[i].codecs = &asoc_dummy_dlc; 1672 + links[i].codecs = &snd_soc_dummy_dlc; 1673 1673 links[i].num_codecs = 1; 1674 1674 } 1675 1675 links[i].cpus = pdm_dmic;
+6 -6
sound/soc/amd/acp3x-rt5682-max9836.c
··· 54 54 { 55 55 int ret; 56 56 struct snd_soc_card *card = rtd->card; 57 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 57 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 58 58 struct snd_soc_component *component = codec_dai->component; 59 59 60 60 dev_info(rtd->dev, "codec dai name = %s\n", codec_dai->name); ··· 126 126 static int rt5682_clk_enable(struct snd_pcm_substream *substream) 127 127 { 128 128 int ret = 0; 129 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 129 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 130 130 131 131 /* RT5682 will support only 48K output with 48M mclk */ 132 132 clk_set_rate(rt5682_dai_wclk, 48000); ··· 194 194 static int acp3x_5682_startup(struct snd_pcm_substream *substream) 195 195 { 196 196 struct snd_pcm_runtime *runtime = substream->runtime; 197 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 197 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 198 198 struct snd_soc_card *card = rtd->card; 199 199 struct acp3x_platform_info *machine = snd_soc_card_get_drvdata(card); 200 200 ··· 212 212 static int acp3x_max_startup(struct snd_pcm_substream *substream) 213 213 { 214 214 struct snd_pcm_runtime *runtime = substream->runtime; 215 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 215 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 216 216 struct snd_soc_card *card = rtd->card; 217 217 struct acp3x_platform_info *machine = snd_soc_card_get_drvdata(card); 218 218 ··· 228 228 229 229 static int acp3x_ec_dmic0_startup(struct snd_pcm_substream *substream) 230 230 { 231 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 231 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 232 232 struct snd_soc_card *card = rtd->card; 233 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 233 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 234 234 struct acp3x_platform_info *machine = snd_soc_card_get_drvdata(card); 235 235 236 236 machine->cap_i2s_instance = I2S_BT_INSTANCE;
+1 -1
sound/soc/amd/ps/ps-sdw-dma.c
··· 222 222 int ret; 223 223 224 224 runtime = substream->runtime; 225 - cpu_dai = asoc_rtd_to_cpu(prtd, 0); 225 + cpu_dai = snd_soc_rtd_to_cpu(prtd, 0); 226 226 amd_manager = snd_soc_dai_get_drvdata(cpu_dai); 227 227 stream = kzalloc(sizeof(*stream), GFP_KERNEL); 228 228 if (!stream)
+1 -1
sound/soc/amd/raven/acp3x-i2s.c
··· 80 80 u32 val; 81 81 u32 reg_val, frmt_reg; 82 82 83 - prtd = asoc_substream_to_rtd(substream); 83 + prtd = snd_soc_substream_to_rtd(substream); 84 84 rtd = substream->runtime->private_data; 85 85 card = prtd->card; 86 86 adata = snd_soc_dai_get_drvdata(dai);
+3 -3
sound/soc/amd/raven/acp3x-pcm-dma.c
··· 215 215 int ret; 216 216 217 217 runtime = substream->runtime; 218 - prtd = asoc_substream_to_rtd(substream); 218 + prtd = snd_soc_substream_to_rtd(substream); 219 219 component = snd_soc_rtdcom_lookup(prtd, DRV_NAME); 220 220 adata = dev_get_drvdata(component->dev); 221 221 i2s_data = kzalloc(sizeof(*i2s_data), GFP_KERNEL); ··· 252 252 struct i2s_dev_data *adata; 253 253 u64 size; 254 254 255 - prtd = asoc_substream_to_rtd(substream); 255 + prtd = snd_soc_substream_to_rtd(substream); 256 256 card = prtd->card; 257 257 pinfo = snd_soc_card_get_drvdata(card); 258 258 adata = dev_get_drvdata(component->dev); ··· 327 327 struct i2s_dev_data *adata; 328 328 struct i2s_stream_instance *ins; 329 329 330 - prtd = asoc_substream_to_rtd(substream); 330 + prtd = snd_soc_substream_to_rtd(substream); 331 331 component = snd_soc_rtdcom_lookup(prtd, DRV_NAME); 332 332 adata = dev_get_drvdata(component->dev); 333 333 ins = substream->runtime->private_data;
+1 -1
sound/soc/amd/vangogh/acp5x-i2s.c
··· 95 95 96 96 lrclk_div_val = 0; 97 97 bclk_div_val = 0; 98 - prtd = asoc_substream_to_rtd(substream); 98 + prtd = snd_soc_substream_to_rtd(substream); 99 99 rtd = substream->runtime->private_data; 100 100 card = prtd->card; 101 101 adata = snd_soc_dai_get_drvdata(dai);
+6 -6
sound/soc/amd/vangogh/acp5x-mach.c
··· 92 92 93 93 static int acp5x_8821_init(struct snd_soc_pcm_runtime *rtd) 94 94 { 95 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 95 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 96 96 int ret; 97 97 98 98 /* ··· 144 144 static int acp5x_8821_startup(struct snd_pcm_substream *substream) 145 145 { 146 146 struct snd_pcm_runtime *runtime = substream->runtime; 147 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 147 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 148 148 struct acp5x_platform_info *machine = snd_soc_card_get_drvdata(rtd->card); 149 149 150 150 machine->play_i2s_instance = I2S_SP_INSTANCE; ··· 165 165 static int acp5x_nau8821_hw_params(struct snd_pcm_substream *substream, 166 166 struct snd_pcm_hw_params *params) 167 167 { 168 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 168 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 169 169 struct snd_soc_card *card = rtd->card; 170 170 struct snd_soc_dai *dai = snd_soc_card_get_codec_dai(card, ACP5X_NAU8821_DAI_NAME); 171 171 int ret, bclk; ··· 197 197 198 198 static int acp5x_cs35l41_startup(struct snd_pcm_substream *substream) 199 199 { 200 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 200 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 201 201 struct acp5x_platform_info *machine = snd_soc_card_get_drvdata(rtd->card); 202 202 struct snd_pcm_runtime *runtime = substream->runtime; 203 203 ··· 215 215 static int acp5x_cs35l41_hw_params(struct snd_pcm_substream *substream, 216 216 struct snd_pcm_hw_params *params) 217 217 { 218 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 218 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 219 219 unsigned int bclk, rate = params_rate(params); 220 220 struct snd_soc_component *comp; 221 221 int ret, i; ··· 334 334 335 335 static int acp5x_max98388_startup(struct snd_pcm_substream *substream) 336 336 { 337 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 337 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 338 338 struct acp5x_platform_info *machine = snd_soc_card_get_drvdata(rtd->card); 339 339 struct snd_pcm_runtime *runtime = substream->runtime; 340 340
+3 -3
sound/soc/amd/vangogh/acp5x-pcm-dma.c
··· 209 209 int ret; 210 210 211 211 runtime = substream->runtime; 212 - prtd = asoc_substream_to_rtd(substream); 212 + prtd = snd_soc_substream_to_rtd(substream); 213 213 component = snd_soc_rtdcom_lookup(prtd, DRV_NAME); 214 214 adata = dev_get_drvdata(component->dev); 215 215 ··· 245 245 struct i2s_dev_data *adata; 246 246 u64 size; 247 247 248 - prtd = asoc_substream_to_rtd(substream); 248 + prtd = snd_soc_substream_to_rtd(substream); 249 249 card = prtd->card; 250 250 pinfo = snd_soc_card_get_drvdata(card); 251 251 adata = dev_get_drvdata(component->dev); ··· 322 322 struct i2s_dev_data *adata; 323 323 struct i2s_stream_instance *ins; 324 324 325 - prtd = asoc_substream_to_rtd(substream); 325 + prtd = snd_soc_substream_to_rtd(substream); 326 326 component = snd_soc_rtdcom_lookup(prtd, DRV_NAME); 327 327 adata = dev_get_drvdata(component->dev); 328 328 ins = substream->runtime->private_data;
+13 -13
sound/soc/apple/mca.c
··· 546 546 547 547 static int mca_fe_get_port(struct snd_pcm_substream *substream) 548 548 { 549 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 549 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 550 550 struct snd_soc_pcm_runtime *be; 551 551 struct snd_soc_dpcm *dpcm; 552 552 ··· 559 559 if (!be) 560 560 return -EINVAL; 561 561 562 - return mca_dai_to_cluster(asoc_rtd_to_cpu(be, 0))->no; 562 + return mca_dai_to_cluster(snd_soc_rtd_to_cpu(be, 0))->no; 563 563 } 564 564 565 565 static int mca_fe_hw_params(struct snd_pcm_substream *substream, ··· 700 700 static int mca_be_startup(struct snd_pcm_substream *substream, 701 701 struct snd_soc_dai *dai) 702 702 { 703 - struct snd_soc_pcm_runtime *be = asoc_substream_to_rtd(substream); 703 + struct snd_soc_pcm_runtime *be = snd_soc_substream_to_rtd(substream); 704 704 struct snd_soc_pcm_runtime *fe; 705 705 struct mca_cluster *cl = mca_dai_to_cluster(dai); 706 706 struct mca_cluster *fe_cl; ··· 721 721 if (!fe) 722 722 return -EINVAL; 723 723 724 - fe_cl = mca_dai_to_cluster(asoc_rtd_to_cpu(fe, 0)); 724 + fe_cl = mca_dai_to_cluster(snd_soc_rtd_to_cpu(fe, 0)); 725 725 726 726 if (mca_be_started(cl)) { 727 727 /* ··· 811 811 static int mca_pcm_open(struct snd_soc_component *component, 812 812 struct snd_pcm_substream *substream) 813 813 { 814 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 815 - struct mca_cluster *cl = mca_dai_to_cluster(asoc_rtd_to_cpu(rtd, 0)); 814 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 815 + struct mca_cluster *cl = mca_dai_to_cluster(snd_soc_rtd_to_cpu(rtd, 0)); 816 816 struct dma_chan *chan = cl->dma_chans[substream->stream]; 817 817 int ret; 818 818 ··· 830 830 struct snd_pcm_substream *substream, 831 831 struct snd_pcm_hw_params *params) 832 832 { 833 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 833 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 834 834 struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); 835 835 struct dma_slave_config slave_config; 836 836 int ret; ··· 857 857 static int mca_close(struct snd_soc_component *component, 858 858 struct snd_pcm_substream *substream) 859 859 { 860 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 860 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 861 861 862 862 if (rtd->dai_link->no_pcm) 863 863 return 0; ··· 868 868 static int mca_trigger(struct snd_soc_component *component, 869 869 struct snd_pcm_substream *substream, int cmd) 870 870 { 871 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 871 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 872 872 873 873 if (rtd->dai_link->no_pcm) 874 874 return 0; ··· 877 877 * Before we do the PCM trigger proper, insert an opportunity 878 878 * to reset the frontend's SERDES. 879 879 */ 880 - mca_fe_early_trigger(substream, cmd, asoc_rtd_to_cpu(rtd, 0)); 880 + mca_fe_early_trigger(substream, cmd, snd_soc_rtd_to_cpu(rtd, 0)); 881 881 882 882 return snd_dmaengine_pcm_trigger(substream, cmd); 883 883 } ··· 885 885 static snd_pcm_uframes_t mca_pointer(struct snd_soc_component *component, 886 886 struct snd_pcm_substream *substream) 887 887 { 888 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 888 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 889 889 890 890 if (rtd->dai_link->no_pcm) 891 891 return -ENOTSUPP; ··· 911 911 struct snd_pcm *pcm) 912 912 { 913 913 struct snd_soc_pcm_runtime *rtd = snd_pcm_chip(pcm); 914 - struct mca_cluster *cl = mca_dai_to_cluster(asoc_rtd_to_cpu(rtd, 0)); 914 + struct mca_cluster *cl = mca_dai_to_cluster(snd_soc_rtd_to_cpu(rtd, 0)); 915 915 unsigned int i; 916 916 917 917 if (rtd->dai_link->no_pcm) ··· 933 933 static int mca_pcm_new(struct snd_soc_component *component, 934 934 struct snd_soc_pcm_runtime *rtd) 935 935 { 936 - struct mca_cluster *cl = mca_dai_to_cluster(asoc_rtd_to_cpu(rtd, 0)); 936 + struct mca_cluster *cl = mca_dai_to_cluster(snd_soc_rtd_to_cpu(rtd, 0)); 937 937 unsigned int i; 938 938 939 939 if (rtd->dai_link->no_pcm)
+5 -5
sound/soc/atmel/atmel-classd.c
··· 118 118 static int atmel_classd_cpu_dai_startup(struct snd_pcm_substream *substream, 119 119 struct snd_soc_dai *cpu_dai) 120 120 { 121 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 121 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 122 122 struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card); 123 123 int err; 124 124 ··· 141 141 struct snd_pcm_hw_params *params, 142 142 struct dma_slave_config *slave_config) 143 143 { 144 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 144 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 145 145 struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card); 146 146 147 147 if (params_physical_width(params) != 16) { ··· 338 338 struct snd_pcm_hw_params *params, 339 339 struct snd_soc_dai *cpu_dai) 340 340 { 341 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 341 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 342 342 struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card); 343 343 struct snd_soc_component *component = cpu_dai->component; 344 344 int fs; ··· 381 381 atmel_classd_cpu_dai_shutdown(struct snd_pcm_substream *substream, 382 382 struct snd_soc_dai *cpu_dai) 383 383 { 384 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 384 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 385 385 struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card); 386 386 387 387 clk_disable_unprepare(dd->gclk); ··· 478 478 return -ENOMEM; 479 479 480 480 dai_link->cpus = comp; 481 - dai_link->codecs = &asoc_dummy_dlc; 481 + dai_link->codecs = &snd_soc_dummy_dlc; 482 482 483 483 dai_link->num_cpus = 1; 484 484 dai_link->num_codecs = 1;
+4 -4
sound/soc/atmel/atmel-pcm-dma.c
··· 52 52 static void atmel_pcm_dma_irq(u32 ssc_sr, 53 53 struct snd_pcm_substream *substream) 54 54 { 55 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 55 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 56 56 struct atmel_pcm_dma_params *prtd; 57 57 58 - prtd = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 58 + prtd = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 59 59 60 60 if (ssc_sr & prtd->mask->ssc_error) { 61 61 if (snd_pcm_running(substream)) ··· 77 77 static int atmel_pcm_configure_dma(struct snd_pcm_substream *substream, 78 78 struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) 79 79 { 80 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 80 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 81 81 struct atmel_pcm_dma_params *prtd; 82 82 struct ssc_device *ssc; 83 83 int ret; 84 84 85 - prtd = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 85 + prtd = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 86 86 ssc = prtd->ssc; 87 87 88 88 ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config);
+2 -2
sound/soc/atmel/atmel-pcm-pdc.c
··· 140 140 { 141 141 struct snd_pcm_runtime *runtime = substream->runtime; 142 142 struct atmel_runtime_data *prtd = runtime->private_data; 143 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 143 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 144 144 145 145 /* this may get called several times by oss emulation 146 146 * with different params */ 147 147 148 - prtd->params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 148 + prtd->params = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 149 149 prtd->params->dma_intr_handler = atmel_pcm_dma_irq; 150 150 151 151 prtd->dma_buffer = runtime->dma_addr;
+6 -6
sound/soc/atmel/atmel-pdmic.c
··· 104 104 static int atmel_pdmic_cpu_dai_startup(struct snd_pcm_substream *substream, 105 105 struct snd_soc_dai *cpu_dai) 106 106 { 107 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 107 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 108 108 struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card); 109 109 int ret; 110 110 ··· 132 132 static void atmel_pdmic_cpu_dai_shutdown(struct snd_pcm_substream *substream, 133 133 struct snd_soc_dai *cpu_dai) 134 134 { 135 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 135 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 136 136 struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card); 137 137 138 138 /* Disable the overrun error interrupt */ ··· 145 145 static int atmel_pdmic_cpu_dai_prepare(struct snd_pcm_substream *substream, 146 146 struct snd_soc_dai *cpu_dai) 147 147 { 148 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 148 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 149 149 struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card); 150 150 struct snd_soc_component *component = cpu_dai->component; 151 151 u32 val; ··· 191 191 struct snd_pcm_hw_params *params, 192 192 struct dma_slave_config *slave_config) 193 193 { 194 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 194 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 195 195 struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card); 196 196 int ret; 197 197 ··· 356 356 struct snd_pcm_hw_params *params, 357 357 struct snd_soc_dai *cpu_dai) 358 358 { 359 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 359 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 360 360 struct atmel_pdmic *dd = snd_soc_card_get_drvdata(rtd->card); 361 361 struct snd_soc_component *component = cpu_dai->component; 362 362 unsigned int rate_min = substream->runtime->hw.rate_min; ··· 501 501 return -ENOMEM; 502 502 503 503 dai_link->cpus = comp; 504 - dai_link->codecs = &asoc_dummy_dlc; 504 + dai_link->codecs = &snd_soc_dummy_dlc; 505 505 506 506 dai_link->num_cpus = 1; 507 507 dai_link->num_codecs = 1;
+2 -2
sound/soc/atmel/atmel_wm8904.c
··· 26 26 static int atmel_asoc_wm8904_hw_params(struct snd_pcm_substream *substream, 27 27 struct snd_pcm_hw_params *params) 28 28 { 29 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 30 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 29 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 30 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 31 31 int ret; 32 32 33 33 ret = snd_soc_dai_set_pll(codec_dai, WM8904_FLL_MCLK, WM8904_FLL_MCLK,
+1 -1
sound/soc/atmel/mikroe-proto.c
··· 21 21 static int snd_proto_init(struct snd_soc_pcm_runtime *rtd) 22 22 { 23 23 struct snd_soc_card *card = rtd->card; 24 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 24 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 25 25 26 26 /* Set proto sysclk */ 27 27 int ret = snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK_XTAL,
+1 -1
sound/soc/atmel/sam9g20_wm8731.c
··· 66 66 */ 67 67 static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd) 68 68 { 69 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 69 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 70 70 struct device *dev = rtd->dev; 71 71 int ret; 72 72
+1 -1
sound/soc/atmel/sam9x5_wm8731.c
··· 40 40 */ 41 41 static int sam9x5_wm8731_init(struct snd_soc_pcm_runtime *rtd) 42 42 { 43 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 43 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 44 44 struct device *dev = rtd->dev; 45 45 int ret; 46 46
+2 -2
sound/soc/au1x/db1200.c
··· 94 94 95 95 static int db1200_i2s_startup(struct snd_pcm_substream *substream) 96 96 { 97 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 98 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 97 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 98 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 99 99 100 100 /* WM8731 has its own 12MHz crystal */ 101 101 snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK_XTAL,
+2 -2
sound/soc/au1x/dbdma2.c
··· 278 278 struct snd_pcm_substream *substream) 279 279 { 280 280 struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream, component); 281 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 281 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 282 282 int stype = substream->stream, *dmaids; 283 283 284 - dmaids = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 284 + dmaids = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 285 285 if (!dmaids) 286 286 return -ENODEV; /* whoa, has ordering changed? */ 287 287
+2 -2
sound/soc/au1x/dma.c
··· 191 191 struct snd_pcm_substream *substream) 192 192 { 193 193 struct alchemy_pcm_ctx *ctx = ss_to_ctx(substream, component); 194 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 194 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 195 195 int *dmaids, s = substream->stream; 196 196 char *name; 197 197 198 - dmaids = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 198 + dmaids = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 199 199 if (!dmaids) 200 200 return -ENODEV; /* whoa, has ordering changed? */ 201 201
+1 -1
sound/soc/au1x/psc-ac97.c
··· 58 58 static inline struct au1xpsc_audio_data *ac97_to_pscdata(struct snd_ac97 *x) 59 59 { 60 60 struct snd_soc_card *c = x->bus->card->private_data; 61 - return snd_soc_dai_get_drvdata(c->asoc_rtd_to_cpu(rtd, 0)); 61 + return snd_soc_dai_get_drvdata(c->snd_soc_rtd_to_cpu(rtd, 0)); 62 62 } 63 63 64 64 #else
+14 -14
sound/soc/bcm/bcm63xx-pcm-whistler.c
··· 46 46 struct snd_pcm_hw_params *params) 47 47 { 48 48 struct i2s_dma_desc *dma_desc; 49 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 49 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 50 50 51 51 dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT); 52 52 if (!dma_desc) 53 53 return -ENOMEM; 54 54 55 - snd_soc_dai_set_dma_data(asoc_rtd_to_cpu(rtd, 0), substream, dma_desc); 55 + snd_soc_dai_set_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream, dma_desc); 56 56 57 57 return 0; 58 58 } ··· 61 61 struct snd_pcm_substream *substream) 62 62 { 63 63 struct i2s_dma_desc *dma_desc; 64 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 64 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 65 65 66 - dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 66 + dma_desc = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 67 67 kfree(dma_desc); 68 68 69 69 return 0; ··· 77 77 struct bcm_i2s_priv *i2s_priv; 78 78 struct regmap *regmap_i2s; 79 79 80 - rtd = asoc_substream_to_rtd(substream); 81 - i2s_priv = dev_get_drvdata(asoc_rtd_to_cpu(rtd, 0)->dev); 80 + rtd = snd_soc_substream_to_rtd(substream); 81 + i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev); 82 82 regmap_i2s = i2s_priv->regmap_i2s; 83 83 84 84 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ··· 144 144 struct i2s_dma_desc *dma_desc; 145 145 struct regmap *regmap_i2s; 146 146 struct bcm_i2s_priv *i2s_priv; 147 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 147 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 148 148 struct snd_pcm_runtime *runtime = substream->runtime; 149 149 uint32_t regaddr_desclen, regaddr_descaddr; 150 150 151 - dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 151 + dma_desc = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 152 152 dma_desc->dma_len = snd_pcm_lib_period_bytes(substream); 153 153 dma_desc->dma_addr = runtime->dma_addr; 154 154 dma_desc->dma_area = runtime->dma_area; ··· 161 161 regaddr_descaddr = I2S_RX_DESC_IFF_ADDR; 162 162 } 163 163 164 - i2s_priv = dev_get_drvdata(asoc_rtd_to_cpu(rtd, 0)->dev); 164 + i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev); 165 165 regmap_i2s = i2s_priv->regmap_i2s; 166 166 167 167 regmap_write(regmap_i2s, regaddr_desclen, dma_desc->dma_len); ··· 250 250 if (int_status & I2S_RX_DESC_OFF_INTR_EN_MSK) { 251 251 substream = i2s_priv->capture_substream; 252 252 runtime = substream->runtime; 253 - rtd = asoc_substream_to_rtd(substream); 253 + rtd = snd_soc_substream_to_rtd(substream); 254 254 prtd = runtime->private_data; 255 - dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 255 + dma_desc = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 256 256 257 257 offlevel = (int_status & I2S_RX_DESC_OFF_LEVEL_MASK) >> 258 258 I2S_RX_DESC_OFF_LEVEL_SHIFT; ··· 298 298 if (int_status & I2S_TX_DESC_OFF_INTR_EN_MSK) { 299 299 substream = i2s_priv->play_substream; 300 300 runtime = substream->runtime; 301 - rtd = asoc_substream_to_rtd(substream); 301 + rtd = snd_soc_substream_to_rtd(substream); 302 302 prtd = runtime->private_data; 303 - dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 303 + dma_desc = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 304 304 305 305 offlevel = (int_status & I2S_TX_DESC_OFF_LEVEL_MASK) >> 306 306 I2S_TX_DESC_OFF_LEVEL_SHIFT; ··· 352 352 struct bcm_i2s_priv *i2s_priv; 353 353 int ret; 354 354 355 - i2s_priv = dev_get_drvdata(asoc_rtd_to_cpu(rtd, 0)->dev); 355 + i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev); 356 356 357 357 of_dma_configure(pcm->card->dev, pcm->card->dev->of_node, 1); 358 358
+12 -12
sound/soc/bcm/cygnus-pcm.c
··· 197 197 static struct cygnus_aio_port *cygnus_dai_get_dma_data( 198 198 struct snd_pcm_substream *substream) 199 199 { 200 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 200 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 201 201 202 - return snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(soc_runtime, 0), substream); 202 + return snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(soc_runtime, 0), substream); 203 203 } 204 204 205 205 static void ringbuf_set_initial(void __iomem *audio_io, ··· 343 343 344 344 static void disable_intr(struct snd_pcm_substream *substream) 345 345 { 346 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 346 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 347 347 struct cygnus_aio_port *aio; 348 348 u32 set_mask; 349 349 350 350 aio = cygnus_dai_get_dma_data(substream); 351 351 352 - dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s on port %d\n", __func__, aio->portnum); 352 + dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s on port %d\n", __func__, aio->portnum); 353 353 354 354 /* The port number maps to the bit position to be set */ 355 355 set_mask = BIT(aio->portnum); ··· 571 571 static int cygnus_pcm_open(struct snd_soc_component *component, 572 572 struct snd_pcm_substream *substream) 573 573 { 574 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 574 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 575 575 struct snd_pcm_runtime *runtime = substream->runtime; 576 576 struct cygnus_aio_port *aio; 577 577 int ret; ··· 580 580 if (!aio) 581 581 return -ENODEV; 582 582 583 - dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum); 583 + dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum); 584 584 585 585 snd_soc_set_runtime_hwparams(substream, &cygnus_pcm_hw); 586 586 ··· 608 608 static int cygnus_pcm_close(struct snd_soc_component *component, 609 609 struct snd_pcm_substream *substream) 610 610 { 611 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 611 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 612 612 struct cygnus_aio_port *aio; 613 613 614 614 aio = cygnus_dai_get_dma_data(substream); 615 615 616 - dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum); 616 + dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum); 617 617 618 618 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 619 619 aio->play_stream = NULL; ··· 621 621 aio->capture_stream = NULL; 622 622 623 623 if (!aio->play_stream && !aio->capture_stream) 624 - dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "freed port %d\n", aio->portnum); 624 + dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "freed port %d\n", aio->portnum); 625 625 626 626 return 0; 627 627 } ··· 629 629 static int cygnus_pcm_prepare(struct snd_soc_component *component, 630 630 struct snd_pcm_substream *substream) 631 631 { 632 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 632 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 633 633 struct snd_pcm_runtime *runtime = substream->runtime; 634 634 struct cygnus_aio_port *aio; 635 635 unsigned long bufsize, periodsize; ··· 638 638 struct ringbuf_regs *p_rbuf = NULL; 639 639 640 640 aio = cygnus_dai_get_dma_data(substream); 641 - dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum); 641 + dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum); 642 642 643 643 bufsize = snd_pcm_lib_buffer_bytes(substream); 644 644 periodsize = snd_pcm_lib_period_bytes(substream); 645 645 646 - dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s (buf_size %lu) (period_size %lu)\n", 646 + dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s (buf_size %lu) (period_size %lu)\n", 647 647 __func__, bufsize, periodsize); 648 648 649 649 configure_ringbuf_regs(substream);
+3 -3
sound/soc/cirrus/edb93xx.c
··· 22 22 static int edb93xx_hw_params(struct snd_pcm_substream *substream, 23 23 struct snd_pcm_hw_params *params) 24 24 { 25 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 26 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 27 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 25 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 26 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 27 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 28 28 int err; 29 29 unsigned int mclk_rate; 30 30 unsigned int rate = params_rate(params);
+2 -2
sound/soc/codecs/cs47l15.c
··· 1246 1246 struct madera *madera = priv->madera; 1247 1247 int n_adsp; 1248 1248 1249 - if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l15-dsp-trace") == 0) { 1249 + if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l15-dsp-trace") == 0) { 1250 1250 n_adsp = 0; 1251 1251 } else { 1252 1252 dev_err(madera->dev, 1253 1253 "No suitable compressed stream for DAI '%s'\n", 1254 - asoc_rtd_to_codec(rtd, 0)->name); 1254 + snd_soc_rtd_to_codec(rtd, 0)->name); 1255 1255 return -EINVAL; 1256 1256 } 1257 1257
+3 -3
sound/soc/codecs/cs47l24.c
··· 1080 1080 struct arizona *arizona = priv->core.arizona; 1081 1081 int n_adsp; 1082 1082 1083 - if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l24-dsp-voicectrl") == 0) { 1083 + if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l24-dsp-voicectrl") == 0) { 1084 1084 n_adsp = 2; 1085 - } else if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l24-dsp-trace") == 0) { 1085 + } else if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l24-dsp-trace") == 0) { 1086 1086 n_adsp = 1; 1087 1087 } else { 1088 1088 dev_err(arizona->dev, 1089 1089 "No suitable compressed stream for DAI '%s'\n", 1090 - asoc_rtd_to_codec(rtd, 0)->name); 1090 + snd_soc_rtd_to_codec(rtd, 0)->name); 1091 1091 return -EINVAL; 1092 1092 } 1093 1093
+3 -3
sound/soc/codecs/cs47l35.c
··· 1510 1510 struct madera *madera = priv->madera; 1511 1511 int n_adsp; 1512 1512 1513 - if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l35-dsp-voicectrl") == 0) { 1513 + if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l35-dsp-voicectrl") == 0) { 1514 1514 n_adsp = 2; 1515 - } else if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l35-dsp-trace") == 0) { 1515 + } else if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l35-dsp-trace") == 0) { 1516 1516 n_adsp = 0; 1517 1517 } else { 1518 1518 dev_err(madera->dev, 1519 1519 "No suitable compressed stream for DAI '%s'\n", 1520 - asoc_rtd_to_codec(rtd, 0)->name); 1520 + snd_soc_rtd_to_codec(rtd, 0)->name); 1521 1521 return -EINVAL; 1522 1522 } 1523 1523
+3 -3
sound/soc/codecs/cs47l85.c
··· 2452 2452 struct madera *madera = priv->madera; 2453 2453 int n_adsp; 2454 2454 2455 - if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l85-dsp-voicectrl") == 0) { 2455 + if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l85-dsp-voicectrl") == 0) { 2456 2456 n_adsp = 5; 2457 - } else if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l85-dsp-trace") == 0) { 2457 + } else if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l85-dsp-trace") == 0) { 2458 2458 n_adsp = 0; 2459 2459 } else { 2460 2460 dev_err(madera->dev, 2461 2461 "No suitable compressed stream for DAI '%s'\n", 2462 - asoc_rtd_to_codec(rtd, 0)->name); 2462 + snd_soc_rtd_to_codec(rtd, 0)->name); 2463 2463 return -EINVAL; 2464 2464 } 2465 2465
+3 -3
sound/soc/codecs/cs47l90.c
··· 2371 2371 struct madera *madera = priv->madera; 2372 2372 int n_adsp; 2373 2373 2374 - if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l90-dsp-voicectrl") == 0) { 2374 + if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l90-dsp-voicectrl") == 0) { 2375 2375 n_adsp = 5; 2376 - } else if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l90-dsp-trace") == 0) { 2376 + } else if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l90-dsp-trace") == 0) { 2377 2377 n_adsp = 0; 2378 2378 } else { 2379 2379 dev_err(madera->dev, 2380 2380 "No suitable compressed stream for DAI '%s'\n", 2381 - asoc_rtd_to_codec(rtd, 0)->name); 2381 + snd_soc_rtd_to_codec(rtd, 0)->name); 2382 2382 return -EINVAL; 2383 2383 } 2384 2384
+2 -2
sound/soc/codecs/cs47l92.c
··· 1850 1850 struct madera *madera = priv->madera; 1851 1851 int n_adsp; 1852 1852 1853 - if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "cs47l92-dsp-trace") == 0) { 1853 + if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "cs47l92-dsp-trace") == 0) { 1854 1854 n_adsp = 0; 1855 1855 } else { 1856 1856 dev_err(madera->dev, 1857 1857 "No suitable compressed stream for DAI '%s'\n", 1858 - asoc_rtd_to_codec(rtd, 0)->name); 1858 + snd_soc_rtd_to_codec(rtd, 0)->name); 1859 1859 return -EINVAL; 1860 1860 } 1861 1861
+2 -2
sound/soc/codecs/rt5677-spi.c
··· 112 112 struct snd_soc_component *component, 113 113 struct snd_pcm_substream *substream) 114 114 { 115 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 115 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 116 116 struct snd_soc_component *codec_component = 117 117 snd_soc_rtdcom_lookup(rtd, "rt5677"); 118 118 struct rt5677_priv *rt5677 = ··· 158 158 struct snd_soc_component *component, 159 159 struct snd_pcm_substream *substream) 160 160 { 161 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 161 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 162 162 struct snd_soc_component *rt5677_component = 163 163 snd_soc_rtdcom_lookup(rtd, "rt5677"); 164 164 struct rt5677_priv *rt5677 =
+3 -3
sound/soc/codecs/wm5110.c
··· 2253 2253 struct arizona *arizona = priv->core.arizona; 2254 2254 int n_adsp; 2255 2255 2256 - if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "wm5110-dsp-voicectrl") == 0) { 2256 + if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "wm5110-dsp-voicectrl") == 0) { 2257 2257 n_adsp = 2; 2258 - } else if (strcmp(asoc_rtd_to_codec(rtd, 0)->name, "wm5110-dsp-trace") == 0) { 2258 + } else if (strcmp(snd_soc_rtd_to_codec(rtd, 0)->name, "wm5110-dsp-trace") == 0) { 2259 2259 n_adsp = 0; 2260 2260 } else { 2261 2261 dev_err(arizona->dev, 2262 2262 "No suitable compressed stream for DAI '%s'\n", 2263 - asoc_rtd_to_codec(rtd, 0)->name); 2263 + snd_soc_rtd_to_codec(rtd, 0)->name); 2264 2264 return -EINVAL; 2265 2265 } 2266 2266
+5 -5
sound/soc/codecs/wm_adsp.c
··· 1236 1236 1237 1237 if (wm_adsp_fw[dsp->fw].num_caps == 0) { 1238 1238 adsp_err(dsp, "%s: Firmware does not support compressed API\n", 1239 - asoc_rtd_to_codec(rtd, 0)->name); 1239 + snd_soc_rtd_to_codec(rtd, 0)->name); 1240 1240 ret = -ENXIO; 1241 1241 goto out; 1242 1242 } 1243 1243 1244 1244 if (wm_adsp_fw[dsp->fw].compr_direction != stream->direction) { 1245 1245 adsp_err(dsp, "%s: Firmware does not support stream direction\n", 1246 - asoc_rtd_to_codec(rtd, 0)->name); 1246 + snd_soc_rtd_to_codec(rtd, 0)->name); 1247 1247 ret = -EINVAL; 1248 1248 goto out; 1249 1249 } 1250 1250 1251 1251 list_for_each_entry(tmp, &dsp->compr_list, list) { 1252 - if (!strcmp(tmp->name, asoc_rtd_to_codec(rtd, 0)->name)) { 1252 + if (!strcmp(tmp->name, snd_soc_rtd_to_codec(rtd, 0)->name)) { 1253 1253 adsp_err(dsp, "%s: Only a single stream supported per dai\n", 1254 - asoc_rtd_to_codec(rtd, 0)->name); 1254 + snd_soc_rtd_to_codec(rtd, 0)->name); 1255 1255 ret = -EBUSY; 1256 1256 goto out; 1257 1257 } ··· 1265 1265 1266 1266 compr->dsp = dsp; 1267 1267 compr->stream = stream; 1268 - compr->name = asoc_rtd_to_codec(rtd, 0)->name; 1268 + compr->name = snd_soc_rtd_to_codec(rtd, 0)->name; 1269 1269 1270 1270 list_add_tail(&compr->list, &dsp->compr_list); 1271 1271
+1 -1
sound/soc/dwc/dwc-i2s.c
··· 235 235 struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(cpu_dai); 236 236 237 237 if (dev->is_jh7110) { 238 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 238 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 239 239 struct snd_soc_dai_link *dai_link = rtd->dai_link; 240 240 241 241 dai_link->trigger_stop = SND_SOC_TRIGGER_ORDER_LDC;
+2 -2
sound/soc/dwc/dwc-pcm.c
··· 139 139 struct snd_pcm_substream *substream) 140 140 { 141 141 struct snd_pcm_runtime *runtime = substream->runtime; 142 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 143 - struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 142 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 143 + struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 144 144 145 145 snd_soc_set_runtime_hwparams(substream, &dw_pcm_hardware); 146 146 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
+3 -3
sound/soc/fsl/eukrea-tlv320.c
··· 30 30 static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, 31 31 struct snd_pcm_hw_params *params) 32 32 { 33 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 34 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 35 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 33 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 34 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 35 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 36 36 int ret; 37 37 38 38 ret = snd_soc_dai_set_sysclk(codec_dai, 0,
+14 -14
sound/soc/fsl/fsl-asoc-card.c
··· 94 94 95 95 struct fsl_asoc_card_priv { 96 96 struct snd_soc_dai_link dai_link[3]; 97 - struct asoc_simple_jack hp_jack; 98 - struct asoc_simple_jack mic_jack; 97 + struct simple_util_jack hp_jack; 98 + struct simple_util_jack mic_jack; 99 99 struct platform_device *pdev; 100 100 struct codec_priv codec_priv; 101 101 struct cpu_priv cpu_priv; ··· 167 167 static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, 168 168 struct snd_pcm_hw_params *params) 169 169 { 170 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 170 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 171 171 struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); 172 172 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 173 173 struct codec_priv *codec_priv = &priv->codec_priv; ··· 184 184 return 0; 185 185 186 186 /* Specific configurations of DAIs starts from here */ 187 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), cpu_priv->sysclk_id[tx], 187 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), cpu_priv->sysclk_id[tx], 188 188 cpu_priv->sysclk_freq[tx], 189 189 cpu_priv->sysclk_dir[tx]); 190 190 if (ret && ret != -ENOTSUPP) { ··· 196 196 if (!cpu_priv->slot_num) 197 197 cpu_priv->slot_num = 2; 198 198 199 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 199 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 200 200 cpu_priv->slot_num, 201 201 cpu_priv->slot_width); 202 202 if (ret && ret != -ENOTSUPP) { ··· 212 212 else 213 213 pll_out = priv->sample_rate * 256; 214 214 215 - ret = snd_soc_dai_set_pll(asoc_rtd_to_codec(rtd, 0), 215 + ret = snd_soc_dai_set_pll(snd_soc_rtd_to_codec(rtd, 0), 216 216 codec_priv->pll_id, 217 217 codec_priv->mclk_id, 218 218 codec_priv->mclk_freq, pll_out); ··· 221 221 goto fail; 222 222 } 223 223 224 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), 224 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), 225 225 codec_priv->fll_id, 226 226 pll_out, SND_SOC_CLOCK_IN); 227 227 ··· 250 250 251 251 if (!priv->streams && codec_priv->pll_id && codec_priv->fll_id) { 252 252 /* Force freq to be free_freq to avoid error message in codec */ 253 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), 253 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), 254 254 codec_priv->mclk_id, 255 255 codec_priv->free_freq, 256 256 SND_SOC_CLOCK_IN); ··· 259 259 return ret; 260 260 } 261 261 262 - ret = snd_soc_dai_set_pll(asoc_rtd_to_codec(rtd, 0), 262 + ret = snd_soc_dai_set_pll(snd_soc_rtd_to_codec(rtd, 0), 263 263 codec_priv->pll_id, 0, 0, 0); 264 264 if (ret && ret != -ENOTSUPP) { 265 265 dev_err(dev, "failed to stop FLL: %d\n", ret); ··· 503 503 struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(card); 504 504 struct snd_soc_pcm_runtime *rtd = list_first_entry( 505 505 &card->rtd_list, struct snd_soc_pcm_runtime, list); 506 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 506 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 507 507 struct codec_priv *codec_priv = &priv->codec_priv; 508 508 struct device *dev = card->dev; 509 509 int ret; 510 510 511 511 if (fsl_asoc_card_is_ac97(priv)) { 512 512 #if IS_ENABLED(CONFIG_SND_AC97_CODEC) 513 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 513 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 514 514 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); 515 515 516 516 /* ··· 883 883 884 884 /* 885 885 * Properties "hp-det-gpio" and "mic-det-gpio" are optional, and 886 - * asoc_simple_init_jack uses these properties for creating 886 + * simple_util_init_jack() uses these properties for creating 887 887 * Headphone Jack and Microphone Jack. 888 888 * 889 889 * The notifier is initialized in snd_soc_card_jack_new(), then 890 890 * snd_soc_jack_notifier_register can be called. 891 891 */ 892 892 if (of_property_read_bool(np, "hp-det-gpio")) { 893 - ret = asoc_simple_init_jack(&priv->card, &priv->hp_jack, 893 + ret = simple_util_init_jack(&priv->card, &priv->hp_jack, 894 894 1, NULL, "Headphone Jack"); 895 895 if (ret) 896 896 goto asrc_fail; ··· 899 899 } 900 900 901 901 if (of_property_read_bool(np, "mic-det-gpio")) { 902 - ret = asoc_simple_init_jack(&priv->card, &priv->mic_jack, 902 + ret = simple_util_init_jack(&priv->card, &priv->mic_jack, 903 903 0, NULL, "Mic Jack"); 904 904 if (ret) 905 905 goto asrc_fail;
+5 -5
sound/soc/fsl/fsl_asrc_dma.c
··· 130 130 { 131 131 enum dma_slave_buswidth buswidth = DMA_SLAVE_BUSWIDTH_2_BYTES; 132 132 enum sdma_peripheral_type be_peripheral_type = IMX_DMATYPE_SSI; 133 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 133 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 134 134 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 135 135 struct snd_dmaengine_dai_dma_data *dma_params_fe = NULL; 136 136 struct snd_dmaengine_dai_dma_data *dma_params_be = NULL; ··· 156 156 for_each_dpcm_be(rtd, stream, dpcm) { 157 157 struct snd_soc_pcm_runtime *be = dpcm->be; 158 158 struct snd_pcm_substream *substream_be; 159 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(be, 0); 159 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(be, 0); 160 160 161 161 if (dpcm->fe != rtd) 162 162 continue; ··· 173 173 } 174 174 175 175 /* Override dma_data of the Front-End and config its dmaengine */ 176 - dma_params_fe = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 176 + dma_params_fe = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 177 177 dma_params_fe->addr = asrc->paddr + asrc->get_fifo_addr(!dir, index); 178 178 dma_params_fe->maxburst = dma_params_be->maxburst; 179 179 ··· 330 330 struct snd_pcm_substream *substream) 331 331 { 332 332 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 333 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 333 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 334 334 struct snd_pcm_runtime *runtime = substream->runtime; 335 335 struct snd_dmaengine_dai_dma_data *dma_data; 336 336 struct device *dev = component->dev; ··· 375 375 goto dma_chan_err; 376 376 } 377 377 378 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 378 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 379 379 380 380 /* Refine the snd_imx_hardware according to caps of DMA. */ 381 381 ret = snd_dmaengine_pcm_refine_runtime_hwparams(substream,
+1 -1
sound/soc/fsl/fsl_dma.c
··· 200 200 { 201 201 struct fsl_dma_private *dma_private = dev_id; 202 202 struct snd_pcm_substream *substream = dma_private->substream; 203 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 203 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 204 204 struct device *dev = rtd->dev; 205 205 struct ccsr_dma_channel __iomem *dma_channel = dma_private->dma_channel; 206 206 irqreturn_t ret = IRQ_NONE;
+10 -10
sound/soc/fsl/fsl_spdif.c
··· 502 502 static int spdif_set_sample_rate(struct snd_pcm_substream *substream, 503 503 int sample_rate) 504 504 { 505 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 506 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 505 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 506 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 507 507 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; 508 508 struct regmap *regmap = spdif_priv->regmap; 509 509 struct platform_device *pdev = spdif_priv->pdev; ··· 605 605 static int fsl_spdif_startup(struct snd_pcm_substream *substream, 606 606 struct snd_soc_dai *cpu_dai) 607 607 { 608 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 609 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 608 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 609 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 610 610 struct platform_device *pdev = spdif_priv->pdev; 611 611 struct regmap *regmap = spdif_priv->regmap; 612 612 u32 scr, mask; ··· 647 647 static void fsl_spdif_shutdown(struct snd_pcm_substream *substream, 648 648 struct snd_soc_dai *cpu_dai) 649 649 { 650 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 651 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 650 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 651 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 652 652 struct regmap *regmap = spdif_priv->regmap; 653 653 u32 scr, mask; 654 654 ··· 701 701 struct snd_pcm_hw_params *params, 702 702 struct snd_soc_dai *dai) 703 703 { 704 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 705 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 704 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 705 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 706 706 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; 707 707 struct platform_device *pdev = spdif_priv->pdev; 708 708 u32 sample_rate = params_rate(params); ··· 736 736 static int fsl_spdif_trigger(struct snd_pcm_substream *substream, 737 737 int cmd, struct snd_soc_dai *dai) 738 738 { 739 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 740 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 739 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 740 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 741 741 struct regmap *regmap = spdif_priv->regmap; 742 742 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 743 743 u32 intr = SIE_INTR_FOR(tx);
+8 -8
sound/soc/fsl/fsl_ssi.c
··· 634 634 static int fsl_ssi_startup(struct snd_pcm_substream *substream, 635 635 struct snd_soc_dai *dai) 636 636 { 637 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 638 - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 637 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 638 + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 639 639 int ret; 640 640 641 641 ret = clk_prepare_enable(ssi->clk); ··· 658 658 static void fsl_ssi_shutdown(struct snd_pcm_substream *substream, 659 659 struct snd_soc_dai *dai) 660 660 { 661 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 662 - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 661 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 662 + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 663 663 664 664 clk_disable_unprepare(ssi->clk); 665 665 } ··· 890 890 static int fsl_ssi_hw_free(struct snd_pcm_substream *substream, 891 891 struct snd_soc_dai *dai) 892 892 { 893 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 894 - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 893 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 894 + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 895 895 896 896 if (fsl_ssi_is_i2s_clock_provider(ssi) && 897 897 ssi->baudclk_streams & BIT(substream->stream)) { ··· 1107 1107 static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd, 1108 1108 struct snd_soc_dai *dai) 1109 1109 { 1110 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1111 - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 1110 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1111 + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 1112 1112 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 1113 1113 1114 1114 switch (cmd) {
+9 -9
sound/soc/fsl/imx-audmix.c
··· 43 43 44 44 static int imx_audmix_fe_startup(struct snd_pcm_substream *substream) 45 45 { 46 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 46 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 47 47 struct imx_audmix *priv = snd_soc_card_get_drvdata(rtd->card); 48 48 struct snd_pcm_runtime *runtime = substream->runtime; 49 49 struct device *dev = rtd->card->dev; ··· 72 72 static int imx_audmix_fe_hw_params(struct snd_pcm_substream *substream, 73 73 struct snd_pcm_hw_params *params) 74 74 { 75 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 75 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 76 76 struct device *dev = rtd->card->dev; 77 77 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 78 78 unsigned int fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF; ··· 84 84 dir = tx ? SND_SOC_CLOCK_OUT : SND_SOC_CLOCK_IN; 85 85 86 86 /* set DAI configuration */ 87 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), fmt); 87 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), fmt); 88 88 if (ret) { 89 89 dev_err(dev, "failed to set cpu dai fmt: %d\n", ret); 90 90 return ret; 91 91 } 92 92 93 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), FSL_SAI_CLK_MAST1, 0, dir); 93 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), FSL_SAI_CLK_MAST1, 0, dir); 94 94 if (ret) { 95 95 dev_err(dev, "failed to set cpu sysclk: %d\n", ret); 96 96 return ret; ··· 100 100 * Per datasheet, AUDMIX expects 8 slots and 32 bits 101 101 * for every slot in TDM mode. 102 102 */ 103 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), BIT(channels) - 1, 103 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), BIT(channels) - 1, 104 104 BIT(channels) - 1, 8, 32); 105 105 if (ret) 106 106 dev_err(dev, "failed to set cpu dai tdm slot: %d\n", ret); ··· 111 111 static int imx_audmix_be_hw_params(struct snd_pcm_substream *substream, 112 112 struct snd_pcm_hw_params *params) 113 113 { 114 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 114 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 115 115 struct device *dev = rtd->card->dev; 116 116 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 117 117 unsigned int fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF; ··· 124 124 fmt |= SND_SOC_DAIFMT_BC_FC; 125 125 126 126 /* set AUDMIX DAI configuration */ 127 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), fmt); 127 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), fmt); 128 128 if (ret) 129 129 dev_err(dev, "failed to set AUDMIX DAI fmt: %d\n", ret); 130 130 ··· 247 247 */ 248 248 priv->dai[i].cpus = 249 249 priv->dai[i].platforms = &dlc[0]; 250 - priv->dai[i].codecs = &asoc_dummy_dlc; 250 + priv->dai[i].codecs = &snd_soc_dummy_dlc; 251 251 252 252 priv->dai[i].num_cpus = 1; 253 253 priv->dai[i].num_codecs = 1; ··· 274 274 return -ENOMEM; 275 275 276 276 priv->dai[num_dai + i].cpus = &dlc[1]; 277 - priv->dai[num_dai + i].codecs = &asoc_dummy_dlc; 277 + priv->dai[num_dai + i].codecs = &snd_soc_dummy_dlc; 278 278 279 279 priv->dai[num_dai + i].num_cpus = 1; 280 280 priv->dai[num_dai + i].num_codecs = 1;
+3 -3
sound/soc/fsl/imx-card.c
··· 291 291 struct snd_pcm_hw_params *params) 292 292 { 293 293 struct snd_soc_pcm_runtime *rtd = substream->private_data; 294 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 294 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 295 295 struct snd_soc_card *card = rtd->card; 296 296 struct imx_card_data *data = snd_soc_card_get_drvdata(card); 297 297 struct dai_link_data *link_data = &data->link_data[rtd->num]; ··· 607 607 plat_data->type = CODEC_AK5552; 608 608 609 609 } else { 610 - link->codecs = &asoc_dummy_dlc; 610 + link->codecs = &snd_soc_dummy_dlc; 611 611 link->num_codecs = 1; 612 612 } 613 613 ··· 655 655 snd_soc_dai_link_set_capabilities(link); 656 656 657 657 /* Get dai fmt */ 658 - ret = asoc_simple_parse_daifmt(dev, np, codec, 658 + ret = simple_util_parse_daifmt(dev, np, codec, 659 659 NULL, &link->dai_fmt); 660 660 if (ret) 661 661 link->dai_fmt = SND_SOC_DAIFMT_NB_NF |
+2 -2
sound/soc/fsl/imx-hdmi.c
··· 35 35 struct snd_soc_pcm_runtime *rtd = substream->private_data; 36 36 struct imx_hdmi_data *data = snd_soc_card_get_drvdata(rtd->card); 37 37 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 38 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 38 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 39 39 struct snd_soc_card *card = rtd->card; 40 40 struct device *dev = card->dev; 41 41 u32 slot_width = data->cpu_priv.slot_width; ··· 70 70 static int imx_hdmi_init(struct snd_soc_pcm_runtime *rtd) 71 71 { 72 72 struct snd_soc_card *card = rtd->card; 73 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 73 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 74 74 struct snd_soc_component *component = codec_dai->component; 75 75 struct imx_hdmi_data *data = snd_soc_card_get_drvdata(card); 76 76 int ret;
+7 -7
sound/soc/fsl/imx-pcm-rpmsg.c
··· 229 229 struct snd_pcm_substream *substream) 230 230 { 231 231 struct rpmsg_info *info = dev_get_drvdata(component->dev); 232 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 233 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 232 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 233 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 234 234 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 235 235 struct snd_pcm_hardware pcm_hardware; 236 236 struct rpmsg_msg *msg; ··· 284 284 static int imx_rpmsg_pcm_close(struct snd_soc_component *component, 285 285 struct snd_pcm_substream *substream) 286 286 { 287 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 287 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 288 288 struct rpmsg_info *info = dev_get_drvdata(component->dev); 289 289 struct rpmsg_msg *msg; 290 290 ··· 317 317 { 318 318 struct snd_pcm_runtime *runtime = substream->runtime; 319 319 struct snd_soc_pcm_runtime *rtd = substream->private_data; 320 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 320 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 321 321 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 322 322 323 323 /* ··· 462 462 { 463 463 struct snd_pcm_runtime *runtime = substream->runtime; 464 464 struct snd_soc_pcm_runtime *rtd = substream->private_data; 465 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 465 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 466 466 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 467 467 int ret = 0; 468 468 ··· 516 516 { 517 517 struct snd_pcm_runtime *runtime = substream->runtime; 518 518 struct snd_soc_pcm_runtime *rtd = substream->private_data; 519 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 519 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 520 520 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 521 521 struct rpmsg_info *info = dev_get_drvdata(component->dev); 522 522 snd_pcm_uframes_t period_size = runtime->period_size; ··· 595 595 { 596 596 struct snd_card *card = rtd->card->snd_card; 597 597 struct snd_pcm *pcm = rtd->pcm; 598 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 598 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 599 599 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 600 600 int ret; 601 601
+2 -2
sound/soc/fsl/imx-rpmsg.c
··· 34 34 struct imx_rpmsg *data = snd_soc_card_get_drvdata(card); 35 35 struct snd_soc_pcm_runtime *rtd = list_first_entry(&card->rtd_list, 36 36 struct snd_soc_pcm_runtime, list); 37 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 37 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 38 38 struct device *dev = card->dev; 39 39 int ret; 40 40 ··· 92 92 /* Optional codec node */ 93 93 ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args); 94 94 if (ret) { 95 - *data->dai.codecs = asoc_dummy_dlc; 95 + *data->dai.codecs = snd_soc_dummy_dlc; 96 96 } else { 97 97 struct clk *clk; 98 98
+1 -1
sound/soc/fsl/imx-sgtl5000.c
··· 30 30 struct device *dev = rtd->card->dev; 31 31 int ret; 32 32 33 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), SGTL5000_SYSCLK, 33 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), SGTL5000_SYSCLK, 34 34 data->clk_frequency, SND_SOC_CLOCK_IN); 35 35 if (ret) { 36 36 dev_err(dev, "could not set codec driver clock params\n");
+1 -1
sound/soc/fsl/imx-spdif.c
··· 38 38 */ 39 39 data->dai.cpus = 40 40 data->dai.platforms = comp; 41 - data->dai.codecs = &asoc_dummy_dlc; 41 + data->dai.codecs = &snd_soc_dummy_dlc; 42 42 43 43 data->dai.num_cpus = 1; 44 44 data->dai.num_codecs = 1;
+9 -9
sound/soc/fsl/mpc5200_dma.c
··· 107 107 static int psc_dma_trigger(struct snd_soc_component *component, 108 108 struct snd_pcm_substream *substream, int cmd) 109 109 { 110 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 111 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 110 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 111 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 112 112 struct snd_pcm_runtime *runtime = substream->runtime; 113 113 struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma); 114 114 struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; ··· 209 209 struct snd_pcm_substream *substream) 210 210 { 211 211 struct snd_pcm_runtime *runtime = substream->runtime; 212 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 213 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 212 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 213 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 214 214 struct psc_dma_stream *s; 215 215 int rc; 216 216 ··· 237 237 static int psc_dma_close(struct snd_soc_component *component, 238 238 struct snd_pcm_substream *substream) 239 239 { 240 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 241 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 240 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 241 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 242 242 struct psc_dma_stream *s; 243 243 244 244 dev_dbg(psc_dma->dev, "psc_dma_close(substream=%p)\n", substream); ··· 263 263 psc_dma_pointer(struct snd_soc_component *component, 264 264 struct snd_pcm_substream *substream) 265 265 { 266 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 267 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 266 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 267 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 268 268 struct psc_dma_stream *s; 269 269 dma_addr_t count; 270 270 ··· 282 282 struct snd_soc_pcm_runtime *rtd) 283 283 { 284 284 struct snd_card *card = rtd->card->snd_card; 285 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); 285 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 286 286 struct snd_pcm *pcm = rtd->pcm; 287 287 size_t size = psc_dma_hardware.buffer_bytes_max; 288 288 int rc;
+2 -2
sound/soc/fsl/mpc5200_psc_i2s.c
··· 38 38 struct snd_pcm_hw_params *params, 39 39 struct snd_soc_dai *dai) 40 40 { 41 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 42 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 41 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 42 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 43 43 u32 mode; 44 44 45 45 dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i"
+3 -3
sound/soc/fsl/mpc8610_hpcd.c
··· 98 98 */ 99 99 static int mpc8610_hpcd_startup(struct snd_pcm_substream *substream) 100 100 { 101 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 101 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 102 102 struct mpc8610_hpcd_data *machine_data = 103 103 container_of(rtd->card, struct mpc8610_hpcd_data, card); 104 104 struct device *dev = rtd->card->dev; 105 105 int ret = 0; 106 106 107 107 /* Tell the codec driver what the serial protocol is. */ 108 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_codec(rtd, 0), machine_data->dai_format); 108 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_codec(rtd, 0), machine_data->dai_format); 109 109 if (ret < 0) { 110 110 dev_err(dev, "could not set codec driver audio format\n"); 111 111 return ret; ··· 115 115 * Tell the codec driver what the MCLK frequency is, and whether it's 116 116 * a slave or master. 117 117 */ 118 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), 0, 118 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), 0, 119 119 machine_data->clk_frequency, 120 120 machine_data->codec_clk_direction); 121 121 if (ret < 0) {
+3 -3
sound/soc/fsl/p1022_ds.c
··· 121 121 */ 122 122 static int p1022_ds_startup(struct snd_pcm_substream *substream) 123 123 { 124 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 124 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 125 125 struct machine_data *mdata = 126 126 container_of(rtd->card, struct machine_data, card); 127 127 struct device *dev = rtd->card->dev; 128 128 int ret = 0; 129 129 130 130 /* Tell the codec driver what the serial protocol is. */ 131 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_codec(rtd, 0), mdata->dai_format); 131 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_codec(rtd, 0), mdata->dai_format); 132 132 if (ret < 0) { 133 133 dev_err(dev, "could not set codec driver audio format\n"); 134 134 return ret; ··· 138 138 * Tell the codec driver what the MCLK frequency is, and whether it's 139 139 * a slave or master. 140 140 */ 141 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), 0, mdata->clk_frequency, 141 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), 0, mdata->clk_frequency, 142 142 mdata->codec_clk_direction); 143 143 if (ret < 0) { 144 144 dev_err(dev, "could not set codec driver clock params\n");
+3 -3
sound/soc/fsl/p1022_rdk.c
··· 127 127 */ 128 128 static int p1022_rdk_startup(struct snd_pcm_substream *substream) 129 129 { 130 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 130 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 131 131 struct machine_data *mdata = 132 132 container_of(rtd->card, struct machine_data, card); 133 133 struct device *dev = rtd->card->dev; 134 134 int ret = 0; 135 135 136 136 /* Tell the codec driver what the serial protocol is. */ 137 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_codec(rtd, 0), mdata->dai_format); 137 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_codec(rtd, 0), mdata->dai_format); 138 138 if (ret < 0) { 139 139 dev_err(dev, "could not set codec driver audio format (ret=%i)\n", 140 140 ret); 141 141 return ret; 142 142 } 143 143 144 - ret = snd_soc_dai_set_pll(asoc_rtd_to_codec(rtd, 0), 0, 0, mdata->clk_frequency, 144 + ret = snd_soc_dai_set_pll(snd_soc_rtd_to_codec(rtd, 0), 0, 0, mdata->clk_frequency, 145 145 mdata->clk_frequency); 146 146 if (ret < 0) { 147 147 dev_err(dev, "could not set codec PLL frequency (ret=%i)\n",
+57 -57
sound/soc/generic/audio-graph-card.c
··· 27 27 int event) 28 28 { 29 29 struct snd_soc_dapm_context *dapm = w->dapm; 30 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(dapm->card); 30 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(dapm->card); 31 31 32 32 switch (event) { 33 33 case SND_SOC_DAPM_POST_PMU: ··· 50 50 }; 51 51 52 52 static const struct snd_soc_ops graph_ops = { 53 - .startup = asoc_simple_startup, 54 - .shutdown = asoc_simple_shutdown, 55 - .hw_params = asoc_simple_hw_params, 53 + .startup = simple_util_startup, 54 + .shutdown = simple_util_shutdown, 55 + .hw_params = simple_util_hw_params, 56 56 }; 57 57 58 58 static bool soc_component_is_pcm(struct snd_soc_dai_link_component *dlc) ··· 68 68 69 69 static void graph_parse_convert(struct device *dev, 70 70 struct device_node *ep, 71 - struct asoc_simple_data *adata) 71 + struct simple_util_data *adata) 72 72 { 73 73 struct device_node *top = dev->of_node; 74 74 struct device_node *port = of_get_parent(ep); 75 75 struct device_node *ports = of_get_parent(port); 76 76 struct device_node *node = of_graph_get_port_parent(ep); 77 77 78 - asoc_simple_parse_convert(top, NULL, adata); 78 + simple_util_parse_convert(top, NULL, adata); 79 79 if (of_node_name_eq(ports, "ports")) 80 - asoc_simple_parse_convert(ports, NULL, adata); 81 - asoc_simple_parse_convert(port, NULL, adata); 82 - asoc_simple_parse_convert(ep, NULL, adata); 80 + simple_util_parse_convert(ports, NULL, adata); 81 + simple_util_parse_convert(port, NULL, adata); 82 + simple_util_parse_convert(ep, NULL, adata); 83 83 84 84 of_node_put(port); 85 85 of_node_put(ports); ··· 103 103 of_node_put(ports); 104 104 } 105 105 106 - static int graph_parse_node(struct asoc_simple_priv *priv, 106 + static int graph_parse_node(struct simple_util_priv *priv, 107 107 struct device_node *ep, 108 108 struct link_info *li, 109 109 int *cpu) ··· 113 113 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 114 114 struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); 115 115 struct snd_soc_dai_link_component *dlc; 116 - struct asoc_simple_dai *dai; 116 + struct simple_util_dai *dai; 117 117 int ret; 118 118 119 119 if (cpu) { 120 - dlc = asoc_link_to_cpu(dai_link, 0); 120 + dlc = snd_soc_link_to_cpu(dai_link, 0); 121 121 dai = simple_props_to_dai_cpu(dai_props, 0); 122 122 } else { 123 - dlc = asoc_link_to_codec(dai_link, 0); 123 + dlc = snd_soc_link_to_codec(dai_link, 0); 124 124 dai = simple_props_to_dai_codec(dai_props, 0); 125 125 } 126 126 127 127 graph_parse_mclk_fs(top, ep, dai_props); 128 128 129 - ret = asoc_graph_parse_dai(dev, ep, dlc, cpu); 129 + ret = graph_util_parse_dai(dev, ep, dlc, cpu); 130 130 if (ret < 0) 131 131 return ret; 132 132 133 - ret = asoc_simple_parse_tdm(ep, dai); 133 + ret = simple_util_parse_tdm(ep, dai); 134 134 if (ret < 0) 135 135 return ret; 136 136 137 - ret = asoc_simple_parse_clk(dev, ep, dai, dlc); 137 + ret = simple_util_parse_clk(dev, ep, dai, dlc); 138 138 if (ret < 0) 139 139 return ret; 140 140 141 141 return 0; 142 142 } 143 143 144 - static int graph_link_init(struct asoc_simple_priv *priv, 144 + static int graph_link_init(struct simple_util_priv *priv, 145 145 struct device_node *cpu_ep, 146 146 struct device_node *codec_ep, 147 147 struct link_info *li, ··· 151 151 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 152 152 int ret; 153 153 154 - ret = asoc_simple_parse_daifmt(dev, cpu_ep, codec_ep, 154 + ret = simple_util_parse_daifmt(dev, cpu_ep, codec_ep, 155 155 NULL, &dai_link->dai_fmt); 156 156 if (ret < 0) 157 157 return ret; 158 158 159 - dai_link->init = asoc_simple_dai_init; 159 + dai_link->init = simple_util_dai_init; 160 160 dai_link->ops = &graph_ops; 161 161 if (priv->ops) 162 162 dai_link->ops = priv->ops; 163 163 164 - return asoc_simple_set_dailink_name(dev, dai_link, name); 164 + return simple_util_set_dailink_name(dev, dai_link, name); 165 165 } 166 166 167 - static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, 167 + static int graph_dai_link_of_dpcm(struct simple_util_priv *priv, 168 168 struct device_node *cpu_ep, 169 169 struct device_node *codec_ep, 170 170 struct link_info *li) ··· 181 181 182 182 if (li->cpu) { 183 183 struct snd_soc_card *card = simple_priv_to_card(priv); 184 - struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); 185 - struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0); 184 + struct snd_soc_dai_link_component *cpus = snd_soc_link_to_cpu(dai_link, 0); 185 + struct snd_soc_dai_link_component *platforms = snd_soc_link_to_platform(dai_link, 0); 186 186 int is_single_links = 0; 187 187 188 188 /* Codec is dummy */ ··· 209 209 */ 210 210 if (card->component_chaining && !soc_component_is_pcm(cpus)) { 211 211 dai_link->no_pcm = 1; 212 - dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup; 212 + dai_link->be_hw_params_fixup = simple_util_be_hw_params_fixup; 213 213 } 214 214 215 - asoc_simple_canonicalize_cpu(cpus, is_single_links); 216 - asoc_simple_canonicalize_platform(platforms, cpus); 215 + simple_util_canonicalize_cpu(cpus, is_single_links); 216 + simple_util_canonicalize_platform(platforms, cpus); 217 217 } else { 218 218 struct snd_soc_codec_conf *cconf = simple_props_to_codec_conf(dai_props, 0); 219 - struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); 219 + struct snd_soc_dai_link_component *codecs = snd_soc_link_to_codec(dai_link, 0); 220 220 struct device_node *port; 221 221 struct device_node *ports; 222 222 ··· 224 224 225 225 /* BE settings */ 226 226 dai_link->no_pcm = 1; 227 - dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup; 227 + dai_link->be_hw_params_fixup = simple_util_be_hw_params_fixup; 228 228 229 229 ret = graph_parse_node(priv, codec_ep, li, NULL); 230 230 if (ret < 0) ··· 258 258 return ret; 259 259 } 260 260 261 - static int graph_dai_link_of(struct asoc_simple_priv *priv, 261 + static int graph_dai_link_of(struct simple_util_priv *priv, 262 262 struct device_node *cpu_ep, 263 263 struct device_node *codec_ep, 264 264 struct link_info *li) 265 265 { 266 266 struct device *dev = simple_priv_to_dev(priv); 267 267 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 268 - struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); 269 - struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); 270 - struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0); 268 + struct snd_soc_dai_link_component *cpus = snd_soc_link_to_cpu(dai_link, 0); 269 + struct snd_soc_dai_link_component *codecs = snd_soc_link_to_codec(dai_link, 0); 270 + struct snd_soc_dai_link_component *platforms = snd_soc_link_to_platform(dai_link, 0); 271 271 char dai_name[64]; 272 272 int ret, is_single_links = 0; 273 273 ··· 284 284 snprintf(dai_name, sizeof(dai_name), 285 285 "%s-%s", cpus->dai_name, codecs->dai_name); 286 286 287 - asoc_simple_canonicalize_cpu(cpus, is_single_links); 288 - asoc_simple_canonicalize_platform(platforms, cpus); 287 + simple_util_canonicalize_cpu(cpus, is_single_links); 288 + simple_util_canonicalize_platform(platforms, cpus); 289 289 290 290 ret = graph_link_init(priv, cpu_ep, codec_ep, li, dai_name); 291 291 if (ret < 0) ··· 296 296 return 0; 297 297 } 298 298 299 - static inline bool parse_as_dpcm_link(struct asoc_simple_priv *priv, 299 + static inline bool parse_as_dpcm_link(struct simple_util_priv *priv, 300 300 struct device_node *codec_port, 301 - struct asoc_simple_data *adata) 301 + struct simple_util_data *adata) 302 302 { 303 303 if (priv->force_dpcm) 304 304 return true; ··· 312 312 * or has convert-xxx property 313 313 */ 314 314 if ((of_get_child_count(codec_port) > 1) || 315 - asoc_simple_is_convert_required(adata)) 315 + simple_util_is_convert_required(adata)) 316 316 return true; 317 317 318 318 return false; 319 319 } 320 320 321 - static int __graph_for_each_link(struct asoc_simple_priv *priv, 321 + static int __graph_for_each_link(struct simple_util_priv *priv, 322 322 struct link_info *li, 323 - int (*func_noml)(struct asoc_simple_priv *priv, 323 + int (*func_noml)(struct simple_util_priv *priv, 324 324 struct device_node *cpu_ep, 325 325 struct device_node *codec_ep, 326 326 struct link_info *li), 327 - int (*func_dpcm)(struct asoc_simple_priv *priv, 327 + int (*func_dpcm)(struct simple_util_priv *priv, 328 328 struct device_node *cpu_ep, 329 329 struct device_node *codec_ep, 330 330 struct link_info *li)) ··· 337 337 struct device_node *codec_ep; 338 338 struct device_node *codec_port; 339 339 struct device_node *codec_port_old = NULL; 340 - struct asoc_simple_data adata; 340 + struct simple_util_data adata; 341 341 int rc, ret = 0; 342 342 343 343 /* loop for all listed CPU port */ ··· 392 392 return 0; 393 393 } 394 394 395 - static int graph_for_each_link(struct asoc_simple_priv *priv, 395 + static int graph_for_each_link(struct simple_util_priv *priv, 396 396 struct link_info *li, 397 - int (*func_noml)(struct asoc_simple_priv *priv, 397 + int (*func_noml)(struct simple_util_priv *priv, 398 398 struct device_node *cpu_ep, 399 399 struct device_node *codec_ep, 400 400 struct link_info *li), 401 - int (*func_dpcm)(struct asoc_simple_priv *priv, 401 + int (*func_dpcm)(struct simple_util_priv *priv, 402 402 struct device_node *cpu_ep, 403 403 struct device_node *codec_ep, 404 404 struct link_info *li)) ··· 425 425 return ret; 426 426 } 427 427 428 - static int graph_count_noml(struct asoc_simple_priv *priv, 428 + static int graph_count_noml(struct simple_util_priv *priv, 429 429 struct device_node *cpu_ep, 430 430 struct device_node *codec_ep, 431 431 struct link_info *li) ··· 454 454 return 0; 455 455 } 456 456 457 - static int graph_count_dpcm(struct asoc_simple_priv *priv, 457 + static int graph_count_dpcm(struct simple_util_priv *priv, 458 458 struct device_node *cpu_ep, 459 459 struct device_node *codec_ep, 460 460 struct link_info *li) ··· 487 487 return 0; 488 488 } 489 489 490 - static int graph_get_dais_count(struct asoc_simple_priv *priv, 490 + static int graph_get_dais_count(struct simple_util_priv *priv, 491 491 struct link_info *li) 492 492 { 493 493 /* ··· 541 541 graph_count_dpcm); 542 542 } 543 543 544 - int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev) 544 + int audio_graph_parse_of(struct simple_util_priv *priv, struct device *dev) 545 545 { 546 546 struct snd_soc_card *card = simple_priv_to_card(priv); 547 547 struct link_info *li; ··· 561 561 if (!li->link) 562 562 return -EINVAL; 563 563 564 - ret = asoc_simple_init_priv(priv, li); 564 + ret = simple_util_init_priv(priv, li); 565 565 if (ret < 0) 566 566 return ret; 567 567 ··· 572 572 return ret; 573 573 } 574 574 575 - ret = asoc_simple_parse_widgets(card, NULL); 575 + ret = simple_util_parse_widgets(card, NULL); 576 576 if (ret < 0) 577 577 return ret; 578 578 579 - ret = asoc_simple_parse_routing(card, NULL); 579 + ret = simple_util_parse_routing(card, NULL); 580 580 if (ret < 0) 581 581 return ret; 582 582 ··· 587 587 if (ret < 0) 588 588 goto err; 589 589 590 - ret = asoc_simple_parse_card_name(card, NULL); 590 + ret = simple_util_parse_card_name(card, NULL); 591 591 if (ret < 0) 592 592 goto err; 593 593 594 594 snd_soc_card_set_drvdata(card, priv); 595 595 596 - asoc_simple_debug_info(priv); 596 + simple_util_debug_info(priv); 597 597 598 598 ret = devm_snd_soc_register_card(dev, card); 599 599 if (ret < 0) ··· 603 603 return 0; 604 604 605 605 err: 606 - asoc_simple_clean_reference(card); 606 + simple_util_clean_reference(card); 607 607 608 608 return dev_err_probe(dev, ret, "parse error\n"); 609 609 } ··· 611 611 612 612 static int graph_probe(struct platform_device *pdev) 613 613 { 614 - struct asoc_simple_priv *priv; 614 + struct simple_util_priv *priv; 615 615 struct device *dev = &pdev->dev; 616 616 struct snd_soc_card *card; 617 617 ··· 623 623 card = simple_priv_to_card(priv); 624 624 card->dapm_widgets = graph_dapm_widgets; 625 625 card->num_dapm_widgets = ARRAY_SIZE(graph_dapm_widgets); 626 - card->probe = asoc_graph_card_probe; 626 + card->probe = graph_util_card_probe; 627 627 628 628 if (of_device_get_match_data(dev)) 629 629 priv->dpcm_selectable = 1; ··· 646 646 .of_match_table = graph_of_match, 647 647 }, 648 648 .probe = graph_probe, 649 - .remove = asoc_simple_remove, 649 + .remove = simple_util_remove, 650 650 }; 651 651 module_platform_driver(graph_card); 652 652
+16 -16
sound/soc/generic/audio-graph-card2-custom-sample.c
··· 12 12 13 13 /* 14 14 * Custom driver can have own priv 15 - * which includes asoc_simple_priv. 15 + * which includes simple_util_priv. 16 16 */ 17 17 struct custom_priv { 18 - struct asoc_simple_priv simple_priv; 18 + struct simple_util_priv simple_priv; 19 19 20 20 /* custom driver's own params */ 21 21 int custom_params; ··· 26 26 27 27 static int custom_card_probe(struct snd_soc_card *card) 28 28 { 29 - struct asoc_simple_priv *simple_priv = snd_soc_card_get_drvdata(card); 29 + struct simple_util_priv *simple_priv = snd_soc_card_get_drvdata(card); 30 30 struct custom_priv *custom_priv = simple_to_custom(simple_priv); 31 31 struct device *dev = simple_priv_to_dev(simple_priv); 32 32 ··· 35 35 custom_priv->custom_params = 1; 36 36 37 37 /* you can use generic probe function */ 38 - return asoc_graph_card_probe(card); 38 + return graph_util_card_probe(card); 39 39 } 40 40 41 - static int custom_hook_pre(struct asoc_simple_priv *priv) 41 + static int custom_hook_pre(struct simple_util_priv *priv) 42 42 { 43 43 struct device *dev = simple_priv_to_dev(priv); 44 44 ··· 48 48 return 0; 49 49 } 50 50 51 - static int custom_hook_post(struct asoc_simple_priv *priv) 51 + static int custom_hook_post(struct simple_util_priv *priv) 52 52 { 53 53 struct device *dev = simple_priv_to_dev(priv); 54 54 struct snd_soc_card *card; ··· 63 63 return 0; 64 64 } 65 65 66 - static int custom_normal(struct asoc_simple_priv *priv, 66 + static int custom_normal(struct simple_util_priv *priv, 67 67 struct device_node *lnk, 68 68 struct link_info *li) 69 69 { ··· 78 78 return audio_graph2_link_normal(priv, lnk, li); 79 79 } 80 80 81 - static int custom_dpcm(struct asoc_simple_priv *priv, 81 + static int custom_dpcm(struct simple_util_priv *priv, 82 82 struct device_node *lnk, 83 83 struct link_info *li) 84 84 { ··· 93 93 return audio_graph2_link_dpcm(priv, lnk, li); 94 94 } 95 95 96 - static int custom_c2c(struct asoc_simple_priv *priv, 96 + static int custom_c2c(struct simple_util_priv *priv, 97 97 struct device_node *lnk, 98 98 struct link_info *li) 99 99 { ··· 121 121 122 122 static int custom_startup(struct snd_pcm_substream *substream) 123 123 { 124 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 125 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); 124 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 125 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); 126 126 struct device *dev = simple_priv_to_dev(priv); 127 127 128 128 dev_info(dev, "custom startup\n"); 129 129 130 - return asoc_simple_startup(substream); 130 + return simple_util_startup(substream); 131 131 } 132 132 133 133 /* You can use custom ops */ 134 134 static const struct snd_soc_ops custom_ops = { 135 135 .startup = custom_startup, 136 - .shutdown = asoc_simple_shutdown, 137 - .hw_params = asoc_simple_hw_params, 136 + .shutdown = simple_util_shutdown, 137 + .hw_params = simple_util_hw_params, 138 138 }; 139 139 140 140 static int custom_probe(struct platform_device *pdev) 141 141 { 142 142 struct custom_priv *custom_priv; 143 - struct asoc_simple_priv *simple_priv; 143 + struct simple_util_priv *simple_priv; 144 144 struct device *dev = &pdev->dev; 145 145 int ret; 146 146 ··· 176 176 .of_match_table = custom_of_match, 177 177 }, 178 178 .probe = custom_probe, 179 - .remove = asoc_simple_remove, 179 + .remove = simple_util_remove, 180 180 }; 181 181 module_platform_driver(custom_card); 182 182
+54 -54
sound/soc/generic/audio-graph-card2.c
··· 282 282 283 283 } 284 284 285 - static enum graph_type graph_get_type(struct asoc_simple_priv *priv, 285 + static enum graph_type graph_get_type(struct simple_util_priv *priv, 286 286 struct device_node *lnk) 287 287 { 288 288 enum graph_type type = __graph_get_type(lnk); ··· 298 298 299 299 switch (type) { 300 300 case GRAPH_DPCM: 301 - if (asoc_graph_is_ports0(lnk)) 301 + if (graph_util_is_ports0(lnk)) 302 302 str = "DPCM Front-End"; 303 303 else 304 304 str = "DPCM Back-End"; ··· 360 360 } 361 361 362 362 static const struct snd_soc_ops graph_ops = { 363 - .startup = asoc_simple_startup, 364 - .shutdown = asoc_simple_shutdown, 365 - .hw_params = asoc_simple_hw_params, 363 + .startup = simple_util_startup, 364 + .shutdown = simple_util_shutdown, 365 + .hw_params = simple_util_hw_params, 366 366 }; 367 367 368 368 static void graph_parse_convert(struct device_node *ep, ··· 370 370 { 371 371 struct device_node *port = of_get_parent(ep); 372 372 struct device_node *ports = of_get_parent(port); 373 - struct asoc_simple_data *adata = &props->adata; 373 + struct simple_util_data *adata = &props->adata; 374 374 375 375 if (of_node_name_eq(ports, "ports")) 376 - asoc_simple_parse_convert(ports, NULL, adata); 377 - asoc_simple_parse_convert(port, NULL, adata); 378 - asoc_simple_parse_convert(ep, NULL, adata); 376 + simple_util_parse_convert(ports, NULL, adata); 377 + simple_util_parse_convert(port, NULL, adata); 378 + simple_util_parse_convert(ep, NULL, adata); 379 379 380 380 of_node_put(port); 381 381 of_node_put(ports); ··· 396 396 of_node_put(ports); 397 397 } 398 398 399 - static int __graph_parse_node(struct asoc_simple_priv *priv, 399 + static int __graph_parse_node(struct simple_util_priv *priv, 400 400 enum graph_type gtype, 401 401 struct device_node *ep, 402 402 struct link_info *li, ··· 406 406 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 407 407 struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); 408 408 struct snd_soc_dai_link_component *dlc; 409 - struct asoc_simple_dai *dai; 409 + struct simple_util_dai *dai; 410 410 int ret, is_single_links = 0; 411 411 412 412 if (is_cpu) { 413 - dlc = asoc_link_to_cpu(dai_link, idx); 413 + dlc = snd_soc_link_to_cpu(dai_link, idx); 414 414 dai = simple_props_to_dai_cpu(dai_props, idx); 415 415 } else { 416 - dlc = asoc_link_to_codec(dai_link, idx); 416 + dlc = snd_soc_link_to_codec(dai_link, idx); 417 417 dai = simple_props_to_dai_codec(dai_props, idx); 418 418 } 419 419 420 420 graph_parse_mclk_fs(ep, dai_props); 421 421 422 - ret = asoc_graph_parse_dai(dev, ep, dlc, &is_single_links); 422 + ret = graph_util_parse_dai(dev, ep, dlc, &is_single_links); 423 423 if (ret < 0) 424 424 return ret; 425 425 426 - ret = asoc_simple_parse_tdm(ep, dai); 426 + ret = simple_util_parse_tdm(ep, dai); 427 427 if (ret < 0) 428 428 return ret; 429 429 430 - ret = asoc_simple_parse_tdm_width_map(dev, ep, dai); 430 + ret = simple_util_parse_tdm_width_map(dev, ep, dai); 431 431 if (ret < 0) 432 432 return ret; 433 433 434 - ret = asoc_simple_parse_clk(dev, ep, dai, dlc); 434 + ret = simple_util_parse_clk(dev, ep, dai, dlc); 435 435 if (ret < 0) 436 436 return ret; 437 437 ··· 440 440 */ 441 441 if (!dai_link->name) { 442 442 struct snd_soc_dai_link_component *cpus = dlc; 443 - struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, idx); 443 + struct snd_soc_dai_link_component *codecs = snd_soc_link_to_codec(dai_link, idx); 444 444 char *cpu_multi = ""; 445 445 char *codec_multi = ""; 446 446 ··· 453 453 case GRAPH_NORMAL: 454 454 /* run is_cpu only. see audio_graph2_link_normal() */ 455 455 if (is_cpu) 456 - asoc_simple_set_dailink_name(dev, dai_link, "%s%s-%s%s", 456 + simple_util_set_dailink_name(dev, dai_link, "%s%s-%s%s", 457 457 cpus->dai_name, cpu_multi, 458 458 codecs->dai_name, codec_multi); 459 459 break; 460 460 case GRAPH_DPCM: 461 461 if (is_cpu) 462 - asoc_simple_set_dailink_name(dev, dai_link, "fe.%pOFP.%s%s", 462 + simple_util_set_dailink_name(dev, dai_link, "fe.%pOFP.%s%s", 463 463 cpus->of_node, cpus->dai_name, cpu_multi); 464 464 else 465 - asoc_simple_set_dailink_name(dev, dai_link, "be.%pOFP.%s%s", 465 + simple_util_set_dailink_name(dev, dai_link, "be.%pOFP.%s%s", 466 466 codecs->of_node, codecs->dai_name, codec_multi); 467 467 break; 468 468 case GRAPH_C2C: 469 469 /* run is_cpu only. see audio_graph2_link_c2c() */ 470 470 if (is_cpu) 471 - asoc_simple_set_dailink_name(dev, dai_link, "c2c.%s%s-%s%s", 471 + simple_util_set_dailink_name(dev, dai_link, "c2c.%s%s-%s%s", 472 472 cpus->dai_name, cpu_multi, 473 473 codecs->dai_name, codec_multi); 474 474 break; ··· 482 482 * if DPCM-BE case 483 483 */ 484 484 if (!is_cpu && gtype == GRAPH_DPCM) { 485 - struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, idx); 485 + struct snd_soc_dai_link_component *codecs = snd_soc_link_to_codec(dai_link, idx); 486 486 struct snd_soc_codec_conf *cconf = simple_props_to_codec_conf(dai_props, idx); 487 487 struct device_node *rport = of_get_parent(ep); 488 488 struct device_node *rports = of_get_parent(rport); ··· 497 497 498 498 if (is_cpu) { 499 499 struct snd_soc_dai_link_component *cpus = dlc; 500 - struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, idx); 500 + struct snd_soc_dai_link_component *platforms = snd_soc_link_to_platform(dai_link, idx); 501 501 502 - asoc_simple_canonicalize_cpu(cpus, is_single_links); 503 - asoc_simple_canonicalize_platform(platforms, cpus); 502 + simple_util_canonicalize_cpu(cpus, is_single_links); 503 + simple_util_canonicalize_platform(platforms, cpus); 504 504 } 505 505 506 506 return 0; 507 507 } 508 508 509 - static int graph_parse_node(struct asoc_simple_priv *priv, 509 + static int graph_parse_node(struct simple_util_priv *priv, 510 510 enum graph_type gtype, 511 511 struct device_node *port, 512 512 struct link_info *li, int is_cpu) ··· 590 590 update_daifmt(INV); 591 591 } 592 592 593 - static void graph_link_init(struct asoc_simple_priv *priv, 593 + static void graph_link_init(struct simple_util_priv *priv, 594 594 struct device_node *port, 595 595 struct link_info *li, 596 596 int is_cpu_node) ··· 638 638 daiclk = snd_soc_daifmt_clock_provider_flipped(daiclk); 639 639 640 640 dai_link->dai_fmt = daifmt | daiclk; 641 - dai_link->init = asoc_simple_dai_init; 641 + dai_link->init = simple_util_dai_init; 642 642 dai_link->ops = &graph_ops; 643 643 if (priv->ops) 644 644 dai_link->ops = priv->ops; 645 645 } 646 646 647 - int audio_graph2_link_normal(struct asoc_simple_priv *priv, 647 + int audio_graph2_link_normal(struct simple_util_priv *priv, 648 648 struct device_node *lnk, 649 649 struct link_info *li) 650 650 { ··· 678 678 } 679 679 EXPORT_SYMBOL_GPL(audio_graph2_link_normal); 680 680 681 - int audio_graph2_link_dpcm(struct asoc_simple_priv *priv, 681 + int audio_graph2_link_dpcm(struct simple_util_priv *priv, 682 682 struct device_node *lnk, 683 683 struct link_info *li) 684 684 { ··· 687 687 struct device_node *rport = of_graph_get_remote_port(ep); 688 688 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 689 689 struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); 690 - int is_cpu = asoc_graph_is_ports0(lnk); 690 + int is_cpu = graph_util_is_ports0(lnk); 691 691 int ret; 692 692 693 693 if (is_cpu) { ··· 713 713 /* 714 714 * setup CPU here, Codec is already set as dummy. 715 715 * see 716 - * asoc_simple_init_priv() 716 + * simple_util_init_priv() 717 717 */ 718 718 dai_link->dynamic = 1; 719 719 dai_link->dpcm_merged_format = 1; ··· 744 744 /* 745 745 * setup Codec here, CPU is already set as dummy. 746 746 * see 747 - * asoc_simple_init_priv() 747 + * simple_util_init_priv() 748 748 */ 749 749 750 750 /* BE settings */ 751 751 dai_link->no_pcm = 1; 752 - dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup; 752 + dai_link->be_hw_params_fixup = simple_util_be_hw_params_fixup; 753 753 754 754 ret = graph_parse_node(priv, GRAPH_DPCM, rport, li, 0); 755 755 if (ret < 0) ··· 771 771 } 772 772 EXPORT_SYMBOL_GPL(audio_graph2_link_dpcm); 773 773 774 - int audio_graph2_link_c2c(struct asoc_simple_priv *priv, 774 + int audio_graph2_link_c2c(struct simple_util_priv *priv, 775 775 struct device_node *lnk, 776 776 struct link_info *li) 777 777 { ··· 807 807 * Card2 can use original Codec2Codec settings if DT has. 808 808 * It will use default settings if no settings on DT. 809 809 * see 810 - * asoc_simple_init_for_codec2codec() 810 + * simple_util_init_for_codec2codec() 811 811 * 812 812 * Add more settings here if needed 813 813 */ ··· 868 868 } 869 869 EXPORT_SYMBOL_GPL(audio_graph2_link_c2c); 870 870 871 - static int graph_link(struct asoc_simple_priv *priv, 871 + static int graph_link(struct simple_util_priv *priv, 872 872 struct graph2_custom_hooks *hooks, 873 873 enum graph_type gtype, 874 874 struct device_node *lnk, ··· 940 940 return 1; 941 941 } 942 942 943 - static int graph_count_normal(struct asoc_simple_priv *priv, 943 + static int graph_count_normal(struct simple_util_priv *priv, 944 944 struct device_node *lnk, 945 945 struct link_info *li) 946 946 { ··· 969 969 return 0; 970 970 } 971 971 972 - static int graph_count_dpcm(struct asoc_simple_priv *priv, 972 + static int graph_count_dpcm(struct simple_util_priv *priv, 973 973 struct device_node *lnk, 974 974 struct link_info *li) 975 975 { ··· 991 991 * }; 992 992 */ 993 993 994 - if (asoc_graph_is_ports0(lnk)) { 994 + if (graph_util_is_ports0(lnk)) { 995 995 /* 996 996 * DON'T REMOVE platforms 997 997 * see ··· 1009 1009 return 0; 1010 1010 } 1011 1011 1012 - static int graph_count_c2c(struct asoc_simple_priv *priv, 1012 + static int graph_count_c2c(struct simple_util_priv *priv, 1013 1013 struct device_node *lnk, 1014 1014 struct link_info *li) 1015 1015 { ··· 1051 1051 return 0; 1052 1052 } 1053 1053 1054 - static int graph_count(struct asoc_simple_priv *priv, 1054 + static int graph_count(struct simple_util_priv *priv, 1055 1055 struct graph2_custom_hooks *hooks, 1056 1056 enum graph_type gtype, 1057 1057 struct device_node *lnk, ··· 1094 1094 return ret; 1095 1095 } 1096 1096 1097 - static int graph_for_each_link(struct asoc_simple_priv *priv, 1097 + static int graph_for_each_link(struct simple_util_priv *priv, 1098 1098 struct graph2_custom_hooks *hooks, 1099 1099 struct link_info *li, 1100 - int (*func)(struct asoc_simple_priv *priv, 1100 + int (*func)(struct simple_util_priv *priv, 1101 1101 struct graph2_custom_hooks *hooks, 1102 1102 enum graph_type gtype, 1103 1103 struct device_node *lnk, ··· 1124 1124 return 0; 1125 1125 } 1126 1126 1127 - int audio_graph2_parse_of(struct asoc_simple_priv *priv, struct device *dev, 1127 + int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev, 1128 1128 struct graph2_custom_hooks *hooks) 1129 1129 { 1130 1130 struct snd_soc_card *card = simple_priv_to_card(priv); ··· 1135 1135 if (!li) 1136 1136 return -ENOMEM; 1137 1137 1138 - card->probe = asoc_graph_card_probe; 1138 + card->probe = graph_util_card_probe; 1139 1139 card->owner = THIS_MODULE; 1140 1140 card->dev = dev; 1141 1141 ··· 1151 1151 if (ret < 0) 1152 1152 goto err; 1153 1153 1154 - ret = asoc_simple_init_priv(priv, li); 1154 + ret = simple_util_init_priv(priv, li); 1155 1155 if (ret < 0) 1156 1156 goto err; 1157 1157 ··· 1162 1162 goto err; 1163 1163 } 1164 1164 1165 - ret = asoc_simple_parse_widgets(card, NULL); 1165 + ret = simple_util_parse_widgets(card, NULL); 1166 1166 if (ret < 0) 1167 1167 goto err; 1168 1168 1169 - ret = asoc_simple_parse_routing(card, NULL); 1169 + ret = simple_util_parse_routing(card, NULL); 1170 1170 if (ret < 0) 1171 1171 goto err; 1172 1172 ··· 1175 1175 if (ret < 0) 1176 1176 goto err; 1177 1177 1178 - ret = asoc_simple_parse_card_name(card, NULL); 1178 + ret = simple_util_parse_card_name(card, NULL); 1179 1179 if (ret < 0) 1180 1180 goto err; 1181 1181 ··· 1187 1187 goto err; 1188 1188 } 1189 1189 1190 - asoc_simple_debug_info(priv); 1190 + simple_util_debug_info(priv); 1191 1191 1192 1192 ret = devm_snd_soc_register_card(dev, card); 1193 1193 err: ··· 1202 1202 1203 1203 static int graph_probe(struct platform_device *pdev) 1204 1204 { 1205 - struct asoc_simple_priv *priv; 1205 + struct simple_util_priv *priv; 1206 1206 struct device *dev = &pdev->dev; 1207 1207 1208 1208 /* Allocate the private data and the DAI link array */ ··· 1226 1226 .of_match_table = graph_of_match, 1227 1227 }, 1228 1228 .probe = graph_probe, 1229 - .remove = asoc_simple_remove, 1229 + .remove = simple_util_remove, 1230 1230 }; 1231 1231 module_platform_driver(graph_card); 1232 1232
+109 -110
sound/soc/generic/simple-card-utils.c
··· 14 14 #include <sound/pcm_params.h> 15 15 #include <sound/simple_card_utils.h> 16 16 17 - static void asoc_simple_fixup_sample_fmt(struct asoc_simple_data *data, 17 + static void simple_fixup_sample_fmt(struct simple_util_data *data, 18 18 struct snd_pcm_hw_params *params) 19 19 { 20 20 int i; ··· 41 41 } 42 42 } 43 43 44 - void asoc_simple_parse_convert(struct device_node *np, 44 + void simple_util_parse_convert(struct device_node *np, 45 45 char *prefix, 46 - struct asoc_simple_data *data) 46 + struct simple_util_data *data) 47 47 { 48 48 char prop[128]; 49 49 ··· 62 62 snprintf(prop, sizeof(prop), "%s%s", prefix, "convert-sample-format"); 63 63 of_property_read_string(np, prop, &data->convert_sample_format); 64 64 } 65 - EXPORT_SYMBOL_GPL(asoc_simple_parse_convert); 65 + EXPORT_SYMBOL_GPL(simple_util_parse_convert); 66 66 67 67 /** 68 - * asoc_simple_is_convert_required() - Query if HW param conversion was requested 68 + * simple_util_is_convert_required() - Query if HW param conversion was requested 69 69 * @data: Link data. 70 70 * 71 71 * Returns true if any HW param conversion was requested for this DAI link with 72 72 * any "convert-xxx" properties. 73 73 */ 74 - bool asoc_simple_is_convert_required(const struct asoc_simple_data *data) 74 + bool simple_util_is_convert_required(const struct simple_util_data *data) 75 75 { 76 76 return data->convert_rate || 77 77 data->convert_channels || 78 78 data->convert_sample_format; 79 79 } 80 - EXPORT_SYMBOL_GPL(asoc_simple_is_convert_required); 80 + EXPORT_SYMBOL_GPL(simple_util_is_convert_required); 81 81 82 - int asoc_simple_parse_daifmt(struct device *dev, 82 + int simple_util_parse_daifmt(struct device *dev, 83 83 struct device_node *node, 84 84 struct device_node *codec, 85 85 char *prefix, ··· 113 113 114 114 return 0; 115 115 } 116 - EXPORT_SYMBOL_GPL(asoc_simple_parse_daifmt); 116 + EXPORT_SYMBOL_GPL(simple_util_parse_daifmt); 117 117 118 - int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np, 119 - struct asoc_simple_dai *dai) 118 + int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np, 119 + struct simple_util_dai *dai) 120 120 { 121 121 u32 *array_values, *p; 122 122 int n, i, ret; ··· 158 158 159 159 return ret; 160 160 } 161 - EXPORT_SYMBOL_GPL(asoc_simple_parse_tdm_width_map); 161 + EXPORT_SYMBOL_GPL(simple_util_parse_tdm_width_map); 162 162 163 - int asoc_simple_set_dailink_name(struct device *dev, 163 + int simple_util_set_dailink_name(struct device *dev, 164 164 struct snd_soc_dai_link *dai_link, 165 165 const char *fmt, ...) 166 166 { ··· 181 181 182 182 return ret; 183 183 } 184 - EXPORT_SYMBOL_GPL(asoc_simple_set_dailink_name); 184 + EXPORT_SYMBOL_GPL(simple_util_set_dailink_name); 185 185 186 - int asoc_simple_parse_card_name(struct snd_soc_card *card, 186 + int simple_util_parse_card_name(struct snd_soc_card *card, 187 187 char *prefix) 188 188 { 189 189 int ret; ··· 207 207 208 208 return 0; 209 209 } 210 - EXPORT_SYMBOL_GPL(asoc_simple_parse_card_name); 210 + EXPORT_SYMBOL_GPL(simple_util_parse_card_name); 211 211 212 - static int asoc_simple_clk_enable(struct asoc_simple_dai *dai) 212 + static int simple_clk_enable(struct simple_util_dai *dai) 213 213 { 214 214 if (dai) 215 215 return clk_prepare_enable(dai->clk); ··· 217 217 return 0; 218 218 } 219 219 220 - static void asoc_simple_clk_disable(struct asoc_simple_dai *dai) 220 + static void simple_clk_disable(struct simple_util_dai *dai) 221 221 { 222 222 if (dai) 223 223 clk_disable_unprepare(dai->clk); 224 224 } 225 225 226 - int asoc_simple_parse_clk(struct device *dev, 226 + int simple_util_parse_clk(struct device *dev, 227 227 struct device_node *node, 228 - struct asoc_simple_dai *simple_dai, 228 + struct simple_util_dai *simple_dai, 229 229 struct snd_soc_dai_link_component *dlc) 230 230 { 231 231 struct clk *clk; ··· 258 258 259 259 return 0; 260 260 } 261 - EXPORT_SYMBOL_GPL(asoc_simple_parse_clk); 261 + EXPORT_SYMBOL_GPL(simple_util_parse_clk); 262 262 263 - static int asoc_simple_check_fixed_sysclk(struct device *dev, 264 - struct asoc_simple_dai *dai, 263 + static int simple_check_fixed_sysclk(struct device *dev, 264 + struct simple_util_dai *dai, 265 265 unsigned int *fixed_sysclk) 266 266 { 267 267 if (dai->clk_fixed) { ··· 276 276 return 0; 277 277 } 278 278 279 - int asoc_simple_startup(struct snd_pcm_substream *substream) 279 + int simple_util_startup(struct snd_pcm_substream *substream) 280 280 { 281 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 282 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); 281 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 282 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); 283 283 struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); 284 - struct asoc_simple_dai *dai; 284 + struct simple_util_dai *dai; 285 285 unsigned int fixed_sysclk = 0; 286 286 int i1, i2, i; 287 287 int ret; 288 288 289 289 for_each_prop_dai_cpu(props, i1, dai) { 290 - ret = asoc_simple_clk_enable(dai); 290 + ret = simple_clk_enable(dai); 291 291 if (ret) 292 292 goto cpu_err; 293 - ret = asoc_simple_check_fixed_sysclk(rtd->dev, dai, &fixed_sysclk); 293 + ret = simple_check_fixed_sysclk(rtd->dev, dai, &fixed_sysclk); 294 294 if (ret) 295 295 goto cpu_err; 296 296 } 297 297 298 298 for_each_prop_dai_codec(props, i2, dai) { 299 - ret = asoc_simple_clk_enable(dai); 299 + ret = simple_clk_enable(dai); 300 300 if (ret) 301 301 goto codec_err; 302 - ret = asoc_simple_check_fixed_sysclk(rtd->dev, dai, &fixed_sysclk); 302 + ret = simple_check_fixed_sysclk(rtd->dev, dai, &fixed_sysclk); 303 303 if (ret) 304 304 goto codec_err; 305 305 } ··· 324 324 for_each_prop_dai_codec(props, i, dai) { 325 325 if (i >= i2) 326 326 break; 327 - asoc_simple_clk_disable(dai); 327 + simple_clk_disable(dai); 328 328 } 329 329 cpu_err: 330 330 for_each_prop_dai_cpu(props, i, dai) { 331 331 if (i >= i1) 332 332 break; 333 - asoc_simple_clk_disable(dai); 333 + simple_clk_disable(dai); 334 334 } 335 335 return ret; 336 336 } 337 - EXPORT_SYMBOL_GPL(asoc_simple_startup); 337 + EXPORT_SYMBOL_GPL(simple_util_startup); 338 338 339 - void asoc_simple_shutdown(struct snd_pcm_substream *substream) 339 + void simple_util_shutdown(struct snd_pcm_substream *substream) 340 340 { 341 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 342 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); 341 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 342 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); 343 343 struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); 344 - struct asoc_simple_dai *dai; 344 + struct simple_util_dai *dai; 345 345 int i; 346 346 347 347 for_each_prop_dai_cpu(props, i, dai) { 348 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, i); 348 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, i); 349 349 350 350 if (props->mclk_fs && !dai->clk_fixed && !snd_soc_dai_active(cpu_dai)) 351 351 snd_soc_dai_set_sysclk(cpu_dai, 352 352 0, 0, SND_SOC_CLOCK_OUT); 353 353 354 - asoc_simple_clk_disable(dai); 354 + simple_clk_disable(dai); 355 355 } 356 356 for_each_prop_dai_codec(props, i, dai) { 357 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, i); 357 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, i); 358 358 359 359 if (props->mclk_fs && !dai->clk_fixed && !snd_soc_dai_active(codec_dai)) 360 360 snd_soc_dai_set_sysclk(codec_dai, 361 361 0, 0, SND_SOC_CLOCK_IN); 362 362 363 - asoc_simple_clk_disable(dai); 363 + simple_clk_disable(dai); 364 364 } 365 365 } 366 - EXPORT_SYMBOL_GPL(asoc_simple_shutdown); 366 + EXPORT_SYMBOL_GPL(simple_util_shutdown); 367 367 368 - static int asoc_simple_set_clk_rate(struct device *dev, 369 - struct asoc_simple_dai *simple_dai, 368 + static int simple_set_clk_rate(struct device *dev, 369 + struct simple_util_dai *simple_dai, 370 370 unsigned long rate) 371 371 { 372 372 if (!simple_dai) ··· 386 386 return clk_set_rate(simple_dai->clk, rate); 387 387 } 388 388 389 - static int asoc_simple_set_tdm(struct snd_soc_dai *dai, 390 - struct asoc_simple_dai *simple_dai, 389 + static int simple_set_tdm(struct snd_soc_dai *dai, 390 + struct simple_util_dai *simple_dai, 391 391 struct snd_pcm_hw_params *params) 392 392 { 393 393 int sample_bits = params_width(params); ··· 424 424 return 0; 425 425 } 426 426 427 - int asoc_simple_hw_params(struct snd_pcm_substream *substream, 427 + int simple_util_hw_params(struct snd_pcm_substream *substream, 428 428 struct snd_pcm_hw_params *params) 429 429 { 430 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 431 - struct asoc_simple_dai *pdai; 430 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 431 + struct simple_util_dai *pdai; 432 432 struct snd_soc_dai *sdai; 433 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); 433 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); 434 434 struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); 435 435 unsigned int mclk, mclk_fs = 0; 436 436 int i, ret; ··· 443 443 mclk = params_rate(params) * mclk_fs; 444 444 445 445 for_each_prop_dai_codec(props, i, pdai) { 446 - ret = asoc_simple_set_clk_rate(rtd->dev, pdai, mclk); 446 + ret = simple_set_clk_rate(rtd->dev, pdai, mclk); 447 447 if (ret < 0) 448 448 return ret; 449 449 } 450 450 451 451 for_each_prop_dai_cpu(props, i, pdai) { 452 - ret = asoc_simple_set_clk_rate(rtd->dev, pdai, mclk); 452 + ret = simple_set_clk_rate(rtd->dev, pdai, mclk); 453 453 if (ret < 0) 454 454 return ret; 455 455 } ··· 479 479 } 480 480 481 481 for_each_prop_dai_codec(props, i, pdai) { 482 - sdai = asoc_rtd_to_codec(rtd, i); 483 - ret = asoc_simple_set_tdm(sdai, pdai, params); 482 + sdai = snd_soc_rtd_to_codec(rtd, i); 483 + ret = simple_set_tdm(sdai, pdai, params); 484 484 if (ret < 0) 485 485 return ret; 486 486 } 487 487 488 488 for_each_prop_dai_cpu(props, i, pdai) { 489 - sdai = asoc_rtd_to_cpu(rtd, i); 490 - ret = asoc_simple_set_tdm(sdai, pdai, params); 489 + sdai = snd_soc_rtd_to_cpu(rtd, i); 490 + ret = simple_set_tdm(sdai, pdai, params); 491 491 if (ret < 0) 492 492 return ret; 493 493 } 494 494 495 495 return 0; 496 496 } 497 - EXPORT_SYMBOL_GPL(asoc_simple_hw_params); 497 + EXPORT_SYMBOL_GPL(simple_util_hw_params); 498 498 499 - int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, 499 + int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, 500 500 struct snd_pcm_hw_params *params) 501 501 { 502 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); 502 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); 503 503 struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->num); 504 - struct asoc_simple_data *data = &dai_props->adata; 504 + struct simple_util_data *data = &dai_props->adata; 505 505 struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 506 506 struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 507 507 ··· 514 514 channels->max = data->convert_channels; 515 515 516 516 if (data->convert_sample_format) 517 - asoc_simple_fixup_sample_fmt(data, params); 517 + simple_fixup_sample_fmt(data, params); 518 518 519 519 return 0; 520 520 } 521 - EXPORT_SYMBOL_GPL(asoc_simple_be_hw_params_fixup); 521 + EXPORT_SYMBOL_GPL(simple_util_be_hw_params_fixup); 522 522 523 - static int asoc_simple_init_dai(struct snd_soc_dai *dai, 524 - struct asoc_simple_dai *simple_dai) 523 + static int simple_init_dai(struct snd_soc_dai *dai, struct simple_util_dai *simple_dai) 525 524 { 526 525 int ret; 527 526 ··· 551 552 return 0; 552 553 } 553 554 554 - static inline int asoc_simple_component_is_codec(struct snd_soc_component *component) 555 + static inline int simple_component_is_codec(struct snd_soc_component *component) 555 556 { 556 557 return component->driver->endianness; 557 558 } 558 559 559 - static int asoc_simple_init_for_codec2codec(struct snd_soc_pcm_runtime *rtd, 560 - struct simple_dai_props *dai_props) 560 + static int simple_init_for_codec2codec(struct snd_soc_pcm_runtime *rtd, 561 + struct simple_dai_props *dai_props) 561 562 { 562 563 struct snd_soc_dai_link *dai_link = rtd->dai_link; 563 564 struct snd_soc_component *component; ··· 575 576 576 577 /* Only Codecs */ 577 578 for_each_rtd_components(rtd, i, component) { 578 - if (!asoc_simple_component_is_codec(component)) 579 + if (!simple_component_is_codec(component)) 579 580 return 0; 580 581 } 581 582 ··· 608 609 return 0; 609 610 } 610 611 611 - int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd) 612 + int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd) 612 613 { 613 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); 614 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); 614 615 struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); 615 - struct asoc_simple_dai *dai; 616 + struct simple_util_dai *dai; 616 617 int i, ret; 617 618 618 619 for_each_prop_dai_codec(props, i, dai) { 619 - ret = asoc_simple_init_dai(asoc_rtd_to_codec(rtd, i), dai); 620 + ret = simple_init_dai(snd_soc_rtd_to_codec(rtd, i), dai); 620 621 if (ret < 0) 621 622 return ret; 622 623 } 623 624 for_each_prop_dai_cpu(props, i, dai) { 624 - ret = asoc_simple_init_dai(asoc_rtd_to_cpu(rtd, i), dai); 625 + ret = simple_init_dai(snd_soc_rtd_to_cpu(rtd, i), dai); 625 626 if (ret < 0) 626 627 return ret; 627 628 } 628 629 629 - ret = asoc_simple_init_for_codec2codec(rtd, props); 630 + ret = simple_init_for_codec2codec(rtd, props); 630 631 if (ret < 0) 631 632 return ret; 632 633 633 634 return 0; 634 635 } 635 - EXPORT_SYMBOL_GPL(asoc_simple_dai_init); 636 + EXPORT_SYMBOL_GPL(simple_util_dai_init); 636 637 637 - void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms, 638 + void simple_util_canonicalize_platform(struct snd_soc_dai_link_component *platforms, 638 639 struct snd_soc_dai_link_component *cpus) 639 640 { 640 641 /* ··· 650 651 if (!platforms->of_node) 651 652 snd_soc_dlc_use_cpu_as_platform(platforms, cpus); 652 653 } 653 - EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_platform); 654 + EXPORT_SYMBOL_GPL(simple_util_canonicalize_platform); 654 655 655 - void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, 656 + void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, 656 657 int is_single_links) 657 658 { 658 659 /* ··· 667 668 if (is_single_links) 668 669 cpus->dai_name = NULL; 669 670 } 670 - EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_cpu); 671 + EXPORT_SYMBOL_GPL(simple_util_canonicalize_cpu); 671 672 672 - void asoc_simple_clean_reference(struct snd_soc_card *card) 673 + void simple_util_clean_reference(struct snd_soc_card *card) 673 674 { 674 675 struct snd_soc_dai_link *dai_link; 675 676 struct snd_soc_dai_link_component *cpu; ··· 683 684 of_node_put(codec->of_node); 684 685 } 685 686 } 686 - EXPORT_SYMBOL_GPL(asoc_simple_clean_reference); 687 + EXPORT_SYMBOL_GPL(simple_util_clean_reference); 687 688 688 - int asoc_simple_parse_routing(struct snd_soc_card *card, 689 + int simple_util_parse_routing(struct snd_soc_card *card, 689 690 char *prefix) 690 691 { 691 692 struct device_node *node = card->dev->of_node; ··· 701 702 702 703 return snd_soc_of_parse_audio_routing(card, prop); 703 704 } 704 - EXPORT_SYMBOL_GPL(asoc_simple_parse_routing); 705 + EXPORT_SYMBOL_GPL(simple_util_parse_routing); 705 706 706 - int asoc_simple_parse_widgets(struct snd_soc_card *card, 707 + int simple_util_parse_widgets(struct snd_soc_card *card, 707 708 char *prefix) 708 709 { 709 710 struct device_node *node = card->dev->of_node; ··· 720 721 /* no widgets is not error */ 721 722 return 0; 722 723 } 723 - EXPORT_SYMBOL_GPL(asoc_simple_parse_widgets); 724 + EXPORT_SYMBOL_GPL(simple_util_parse_widgets); 724 725 725 - int asoc_simple_parse_pin_switches(struct snd_soc_card *card, 726 + int simple_util_parse_pin_switches(struct snd_soc_card *card, 726 727 char *prefix) 727 728 { 728 729 char prop[128]; ··· 734 735 735 736 return snd_soc_of_parse_pin_switches(card, prop); 736 737 } 737 - EXPORT_SYMBOL_GPL(asoc_simple_parse_pin_switches); 738 + EXPORT_SYMBOL_GPL(simple_util_parse_pin_switches); 738 739 739 - int asoc_simple_init_jack(struct snd_soc_card *card, 740 - struct asoc_simple_jack *sjack, 740 + int simple_util_init_jack(struct snd_soc_card *card, 741 + struct simple_util_jack *sjack, 741 742 int is_hp, char *prefix, 742 743 char *pin) 743 744 { ··· 792 793 793 794 return 0; 794 795 } 795 - EXPORT_SYMBOL_GPL(asoc_simple_init_jack); 796 + EXPORT_SYMBOL_GPL(simple_util_init_jack); 796 797 797 - int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv, char *prefix) 798 + int simple_util_init_aux_jacks(struct simple_util_priv *priv, char *prefix) 798 799 { 799 800 struct snd_soc_card *card = simple_priv_to_card(priv); 800 801 struct snd_soc_component *component; ··· 841 842 } 842 843 return 0; 843 844 } 844 - EXPORT_SYMBOL_GPL(asoc_simple_init_aux_jacks); 845 + EXPORT_SYMBOL_GPL(simple_util_init_aux_jacks); 845 846 846 - int asoc_simple_init_priv(struct asoc_simple_priv *priv, 847 + int simple_util_init_priv(struct simple_util_priv *priv, 847 848 struct link_info *li) 848 849 { 849 850 struct snd_soc_card *card = simple_priv_to_card(priv); 850 851 struct device *dev = simple_priv_to_dev(priv); 851 852 struct snd_soc_dai_link *dai_link; 852 853 struct simple_dai_props *dai_props; 853 - struct asoc_simple_dai *dais; 854 + struct simple_util_dai *dais; 854 855 struct snd_soc_dai_link_component *dlcs; 855 856 struct snd_soc_codec_conf *cconf = NULL; 856 857 int i, dai_num = 0, dlc_num = 0, cnf_num = 0; ··· 911 912 dais += li->num[i].cpus; 912 913 } else { 913 914 /* DPCM Be's CPU = dummy */ 914 - dai_link[i].cpus = &asoc_dummy_dlc; 915 + dai_link[i].cpus = &snd_soc_dummy_dlc; 915 916 dai_props[i].num.cpus = 916 917 dai_link[i].num_cpus = 1; 917 918 } ··· 933 934 } 934 935 } else { 935 936 /* DPCM Fe's Codec = dummy */ 936 - dai_link[i].codecs = &asoc_dummy_dlc; 937 + dai_link[i].codecs = &snd_soc_dummy_dlc; 937 938 dai_props[i].num.codecs = 938 939 dai_link[i].num_codecs = 1; 939 940 } ··· 955 956 956 957 return 0; 957 958 } 958 - EXPORT_SYMBOL_GPL(asoc_simple_init_priv); 959 + EXPORT_SYMBOL_GPL(simple_util_init_priv); 959 960 960 - int asoc_simple_remove(struct platform_device *pdev) 961 + int simple_util_remove(struct platform_device *pdev) 961 962 { 962 963 struct snd_soc_card *card = platform_get_drvdata(pdev); 963 964 964 - asoc_simple_clean_reference(card); 965 + simple_util_clean_reference(card); 965 966 966 967 return 0; 967 968 } 968 - EXPORT_SYMBOL_GPL(asoc_simple_remove); 969 + EXPORT_SYMBOL_GPL(simple_util_remove); 969 970 970 - int asoc_graph_card_probe(struct snd_soc_card *card) 971 + int graph_util_card_probe(struct snd_soc_card *card) 971 972 { 972 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); 973 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(card); 973 974 int ret; 974 975 975 - ret = asoc_simple_init_hp(card, &priv->hp_jack, NULL); 976 + ret = simple_util_init_hp(card, &priv->hp_jack, NULL); 976 977 if (ret < 0) 977 978 return ret; 978 979 979 - ret = asoc_simple_init_mic(card, &priv->mic_jack, NULL); 980 + ret = simple_util_init_mic(card, &priv->mic_jack, NULL); 980 981 if (ret < 0) 981 982 return ret; 982 983 983 984 return 0; 984 985 } 985 - EXPORT_SYMBOL_GPL(asoc_graph_card_probe); 986 + EXPORT_SYMBOL_GPL(graph_util_card_probe); 986 987 987 - int asoc_graph_is_ports0(struct device_node *np) 988 + int graph_util_is_ports0(struct device_node *np) 988 989 { 989 990 struct device_node *port, *ports, *ports0, *top; 990 991 int ret; ··· 1010 1011 1011 1012 return ret; 1012 1013 } 1013 - EXPORT_SYMBOL_GPL(asoc_graph_is_ports0); 1014 + EXPORT_SYMBOL_GPL(graph_util_is_ports0); 1014 1015 1015 1016 static int graph_get_dai_id(struct device_node *ep) 1016 1017 { ··· 1065 1066 return id; 1066 1067 } 1067 1068 1068 - int asoc_graph_parse_dai(struct device *dev, struct device_node *ep, 1069 + int graph_util_parse_dai(struct device *dev, struct device_node *ep, 1069 1070 struct snd_soc_dai_link_component *dlc, int *is_single_link) 1070 1071 { 1071 1072 struct device_node *node; ··· 1128 1129 1129 1130 return 0; 1130 1131 } 1131 - EXPORT_SYMBOL_GPL(asoc_graph_parse_dai); 1132 + EXPORT_SYMBOL_GPL(graph_util_parse_dai); 1132 1133 1133 1134 /* Module information */ 1134 1135 MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
+73 -74
sound/soc/generic/simple-card.c
··· 23 23 #define PREFIX "simple-audio-card," 24 24 25 25 static const struct snd_soc_ops simple_ops = { 26 - .startup = asoc_simple_startup, 27 - .shutdown = asoc_simple_shutdown, 28 - .hw_params = asoc_simple_hw_params, 26 + .startup = simple_util_startup, 27 + .shutdown = simple_util_shutdown, 28 + .hw_params = simple_util_hw_params, 29 29 }; 30 30 31 - static int asoc_simple_parse_platform(struct device_node *node, 32 - struct snd_soc_dai_link_component *dlc) 31 + static int simple_parse_platform(struct device_node *node, struct snd_soc_dai_link_component *dlc) 33 32 { 34 33 struct of_phandle_args args; 35 34 int ret; ··· 51 52 return 0; 52 53 } 53 54 54 - static int asoc_simple_parse_dai(struct device *dev, 55 - struct device_node *node, 56 - struct snd_soc_dai_link_component *dlc, 57 - int *is_single_link) 55 + static int simple_parse_dai(struct device *dev, 56 + struct device_node *node, 57 + struct snd_soc_dai_link_component *dlc, 58 + int *is_single_link) 58 59 { 59 60 struct of_phandle_args args; 60 61 struct snd_soc_dai *dai; ··· 116 117 117 118 static void simple_parse_convert(struct device *dev, 118 119 struct device_node *np, 119 - struct asoc_simple_data *adata) 120 + struct simple_util_data *adata) 120 121 { 121 122 struct device_node *top = dev->of_node; 122 123 struct device_node *node = of_get_parent(np); 123 124 124 - asoc_simple_parse_convert(top, PREFIX, adata); 125 - asoc_simple_parse_convert(node, PREFIX, adata); 126 - asoc_simple_parse_convert(node, NULL, adata); 127 - asoc_simple_parse_convert(np, NULL, adata); 125 + simple_util_parse_convert(top, PREFIX, adata); 126 + simple_util_parse_convert(node, PREFIX, adata); 127 + simple_util_parse_convert(node, NULL, adata); 128 + simple_util_parse_convert(np, NULL, adata); 128 129 129 130 of_node_put(node); 130 131 } ··· 147 148 of_node_put(node); 148 149 } 149 150 150 - static int simple_parse_node(struct asoc_simple_priv *priv, 151 + static int simple_parse_node(struct simple_util_priv *priv, 151 152 struct device_node *np, 152 153 struct link_info *li, 153 154 char *prefix, ··· 158 159 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 159 160 struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); 160 161 struct snd_soc_dai_link_component *dlc; 161 - struct asoc_simple_dai *dai; 162 + struct simple_util_dai *dai; 162 163 int ret; 163 164 164 165 if (cpu) { 165 - dlc = asoc_link_to_cpu(dai_link, 0); 166 + dlc = snd_soc_link_to_cpu(dai_link, 0); 166 167 dai = simple_props_to_dai_cpu(dai_props, 0); 167 168 } else { 168 - dlc = asoc_link_to_codec(dai_link, 0); 169 + dlc = snd_soc_link_to_codec(dai_link, 0); 169 170 dai = simple_props_to_dai_codec(dai_props, 0); 170 171 } 171 172 172 173 simple_parse_mclk_fs(top, np, dai_props, prefix); 173 174 174 - ret = asoc_simple_parse_dai(dev, np, dlc, cpu); 175 + ret = simple_parse_dai(dev, np, dlc, cpu); 175 176 if (ret) 176 177 return ret; 177 178 178 - ret = asoc_simple_parse_clk(dev, np, dai, dlc); 179 + ret = simple_util_parse_clk(dev, np, dai, dlc); 179 180 if (ret) 180 181 return ret; 181 182 182 - ret = asoc_simple_parse_tdm(np, dai); 183 + ret = simple_util_parse_tdm(np, dai); 183 184 if (ret) 184 185 return ret; 185 186 186 187 return 0; 187 188 } 188 189 189 - static int simple_link_init(struct asoc_simple_priv *priv, 190 + static int simple_link_init(struct simple_util_priv *priv, 190 191 struct device_node *node, 191 192 struct device_node *codec, 192 193 struct link_info *li, ··· 196 197 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 197 198 int ret; 198 199 199 - ret = asoc_simple_parse_daifmt(dev, node, codec, 200 + ret = simple_util_parse_daifmt(dev, node, codec, 200 201 prefix, &dai_link->dai_fmt); 201 202 if (ret < 0) 202 203 return 0; 203 204 204 - dai_link->init = asoc_simple_dai_init; 205 + dai_link->init = simple_util_dai_init; 205 206 dai_link->ops = &simple_ops; 206 207 207 - return asoc_simple_set_dailink_name(dev, dai_link, name); 208 + return simple_util_set_dailink_name(dev, dai_link, name); 208 209 } 209 210 210 - static int simple_dai_link_of_dpcm(struct asoc_simple_priv *priv, 211 + static int simple_dai_link_of_dpcm(struct simple_util_priv *priv, 211 212 struct device_node *np, 212 213 struct device_node *codec, 213 214 struct link_info *li, ··· 229 230 prefix = PREFIX; 230 231 231 232 if (li->cpu) { 232 - struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); 233 - struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0); 233 + struct snd_soc_dai_link_component *cpus = snd_soc_link_to_cpu(dai_link, 0); 234 + struct snd_soc_dai_link_component *platforms = snd_soc_link_to_platform(dai_link, 0); 234 235 int is_single_links = 0; 235 236 236 237 /* Codec is dummy */ ··· 245 246 246 247 snprintf(dai_name, sizeof(dai_name), "fe.%s", cpus->dai_name); 247 248 248 - asoc_simple_canonicalize_cpu(cpus, is_single_links); 249 - asoc_simple_canonicalize_platform(platforms, cpus); 249 + simple_util_canonicalize_cpu(cpus, is_single_links); 250 + simple_util_canonicalize_platform(platforms, cpus); 250 251 } else { 251 - struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); 252 + struct snd_soc_dai_link_component *codecs = snd_soc_link_to_codec(dai_link, 0); 252 253 struct snd_soc_codec_conf *cconf; 253 254 254 255 /* CPU is dummy */ 255 256 256 257 /* BE settings */ 257 258 dai_link->no_pcm = 1; 258 - dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup; 259 + dai_link->be_hw_params_fixup = simple_util_be_hw_params_fixup; 259 260 260 261 cconf = simple_props_to_codec_conf(dai_props, 0); 261 262 ··· 287 288 return ret; 288 289 } 289 290 290 - static int simple_dai_link_of(struct asoc_simple_priv *priv, 291 + static int simple_dai_link_of(struct simple_util_priv *priv, 291 292 struct device_node *np, 292 293 struct device_node *codec, 293 294 struct link_info *li, ··· 295 296 { 296 297 struct device *dev = simple_priv_to_dev(priv); 297 298 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 298 - struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); 299 - struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); 300 - struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0); 299 + struct snd_soc_dai_link_component *cpus = snd_soc_link_to_cpu(dai_link, 0); 300 + struct snd_soc_dai_link_component *codecs = snd_soc_link_to_codec(dai_link, 0); 301 + struct snd_soc_dai_link_component *platforms = snd_soc_link_to_platform(dai_link, 0); 301 302 struct device_node *cpu = NULL; 302 303 struct device_node *node = NULL; 303 304 struct device_node *plat = NULL; ··· 326 327 if (ret < 0) 327 328 goto dai_link_of_err; 328 329 329 - ret = asoc_simple_parse_platform(plat, platforms); 330 + ret = simple_parse_platform(plat, platforms); 330 331 if (ret < 0) 331 332 goto dai_link_of_err; 332 333 333 334 snprintf(dai_name, sizeof(dai_name), 334 335 "%s-%s", cpus->dai_name, codecs->dai_name); 335 336 336 - asoc_simple_canonicalize_cpu(cpus, single_cpu); 337 - asoc_simple_canonicalize_platform(platforms, cpus); 337 + simple_util_canonicalize_cpu(cpus, single_cpu); 338 + simple_util_canonicalize_platform(platforms, cpus); 338 339 339 340 ret = simple_link_init(priv, node, codec, li, prefix, dai_name); 340 341 ··· 347 348 return ret; 348 349 } 349 350 350 - static int __simple_for_each_link(struct asoc_simple_priv *priv, 351 + static int __simple_for_each_link(struct simple_util_priv *priv, 351 352 struct link_info *li, 352 - int (*func_noml)(struct asoc_simple_priv *priv, 353 + int (*func_noml)(struct simple_util_priv *priv, 353 354 struct device_node *np, 354 355 struct device_node *codec, 355 356 struct link_info *li, bool is_top), 356 - int (*func_dpcm)(struct asoc_simple_priv *priv, 357 + int (*func_dpcm)(struct simple_util_priv *priv, 357 358 struct device_node *np, 358 359 struct device_node *codec, 359 360 struct link_info *li, bool is_top)) ··· 377 378 378 379 /* loop for all dai-link */ 379 380 do { 380 - struct asoc_simple_data adata; 381 + struct simple_util_data adata; 381 382 struct device_node *codec; 382 383 struct device_node *plat; 383 384 struct device_node *np; ··· 418 419 * or has convert-xxx property 419 420 */ 420 421 if (dpcm_selectable && 421 - (num > 2 || asoc_simple_is_convert_required(&adata))) { 422 + (num > 2 || simple_util_is_convert_required(&adata))) { 422 423 /* 423 424 * np 424 425 * |1(CPU)|0(Codec) li->cpu ··· 458 459 return ret; 459 460 } 460 461 461 - static int simple_for_each_link(struct asoc_simple_priv *priv, 462 + static int simple_for_each_link(struct simple_util_priv *priv, 462 463 struct link_info *li, 463 - int (*func_noml)(struct asoc_simple_priv *priv, 464 + int (*func_noml)(struct simple_util_priv *priv, 464 465 struct device_node *np, 465 466 struct device_node *codec, 466 467 struct link_info *li, bool is_top), 467 - int (*func_dpcm)(struct asoc_simple_priv *priv, 468 + int (*func_dpcm)(struct simple_util_priv *priv, 468 469 struct device_node *np, 469 470 struct device_node *codec, 470 471 struct link_info *li, bool is_top)) ··· 493 494 494 495 static void simple_depopulate_aux(void *data) 495 496 { 496 - struct asoc_simple_priv *priv = data; 497 + struct simple_util_priv *priv = data; 497 498 498 499 of_platform_depopulate(simple_priv_to_dev(priv)); 499 500 } 500 501 501 - static int simple_populate_aux(struct asoc_simple_priv *priv) 502 + static int simple_populate_aux(struct simple_util_priv *priv) 502 503 { 503 504 struct device *dev = simple_priv_to_dev(priv); 504 505 struct device_node *node; ··· 516 517 return devm_add_action_or_reset(dev, simple_depopulate_aux, priv); 517 518 } 518 519 519 - static int simple_parse_of(struct asoc_simple_priv *priv, struct link_info *li) 520 + static int simple_parse_of(struct simple_util_priv *priv, struct link_info *li) 520 521 { 521 522 struct snd_soc_card *card = simple_priv_to_card(priv); 522 523 int ret; 523 524 524 - ret = asoc_simple_parse_widgets(card, PREFIX); 525 + ret = simple_util_parse_widgets(card, PREFIX); 525 526 if (ret < 0) 526 527 return ret; 527 528 528 - ret = asoc_simple_parse_routing(card, PREFIX); 529 + ret = simple_util_parse_routing(card, PREFIX); 529 530 if (ret < 0) 530 531 return ret; 531 532 532 - ret = asoc_simple_parse_pin_switches(card, PREFIX); 533 + ret = simple_util_parse_pin_switches(card, PREFIX); 533 534 if (ret < 0) 534 535 return ret; 535 536 ··· 541 542 if (ret < 0) 542 543 return ret; 543 544 544 - ret = asoc_simple_parse_card_name(card, PREFIX); 545 + ret = simple_util_parse_card_name(card, PREFIX); 545 546 if (ret < 0) 546 547 return ret; 547 548 ··· 554 555 return ret; 555 556 } 556 557 557 - static int simple_count_noml(struct asoc_simple_priv *priv, 558 + static int simple_count_noml(struct simple_util_priv *priv, 558 559 struct device_node *np, 559 560 struct device_node *codec, 560 561 struct link_info *li, bool is_top) ··· 578 579 * ignored by snd_soc_rtd_add_component(). 579 580 * 580 581 * see 581 - * simple-card-utils.c :: asoc_simple_canonicalize_platform() 582 + * simple-card-utils.c :: simple_util_canonicalize_platform() 582 583 */ 583 584 li->num[li->link].cpus = 1; 584 585 li->num[li->link].platforms = 1; ··· 590 591 return 0; 591 592 } 592 593 593 - static int simple_count_dpcm(struct asoc_simple_priv *priv, 594 + static int simple_count_dpcm(struct simple_util_priv *priv, 594 595 struct device_node *np, 595 596 struct device_node *codec, 596 597 struct link_info *li, bool is_top) ··· 621 622 return 0; 622 623 } 623 624 624 - static int simple_get_dais_count(struct asoc_simple_priv *priv, 625 + static int simple_get_dais_count(struct simple_util_priv *priv, 625 626 struct link_info *li) 626 627 { 627 628 struct device *dev = simple_priv_to_dev(priv); ··· 689 690 690 691 static int simple_soc_probe(struct snd_soc_card *card) 691 692 { 692 - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); 693 + struct simple_util_priv *priv = snd_soc_card_get_drvdata(card); 693 694 int ret; 694 695 695 - ret = asoc_simple_init_hp(card, &priv->hp_jack, PREFIX); 696 + ret = simple_util_init_hp(card, &priv->hp_jack, PREFIX); 696 697 if (ret < 0) 697 698 return ret; 698 699 699 - ret = asoc_simple_init_mic(card, &priv->mic_jack, PREFIX); 700 + ret = simple_util_init_mic(card, &priv->mic_jack, PREFIX); 700 701 if (ret < 0) 701 702 return ret; 702 703 703 - ret = asoc_simple_init_aux_jacks(priv, PREFIX); 704 + ret = simple_util_init_aux_jacks(priv, PREFIX); 704 705 if (ret < 0) 705 706 return ret; 706 707 707 708 return 0; 708 709 } 709 710 710 - static int asoc_simple_probe(struct platform_device *pdev) 711 + static int simple_probe(struct platform_device *pdev) 711 712 { 712 - struct asoc_simple_priv *priv; 713 + struct simple_util_priv *priv; 713 714 struct device *dev = &pdev->dev; 714 715 struct device_node *np = dev->of_node; 715 716 struct snd_soc_card *card; ··· 738 739 if (!li->link) 739 740 return -EINVAL; 740 741 741 - ret = asoc_simple_init_priv(priv, li); 742 + ret = simple_util_init_priv(priv, li); 742 743 if (ret < 0) 743 744 return ret; 744 745 ··· 751 752 } 752 753 753 754 } else { 754 - struct asoc_simple_card_info *cinfo; 755 + struct simple_util_info *cinfo; 755 756 struct snd_soc_dai_link_component *cpus; 756 757 struct snd_soc_dai_link_component *codecs; 757 758 struct snd_soc_dai_link_component *platform; ··· 769 770 !cinfo->codec || 770 771 !cinfo->platform || 771 772 !cinfo->cpu_dai.name) { 772 - dev_err(dev, "insufficient asoc_simple_card_info settings\n"); 773 + dev_err(dev, "insufficient simple_util_info settings\n"); 773 774 return -EINVAL; 774 775 } 775 776 ··· 787 788 dai_link->name = cinfo->name; 788 789 dai_link->stream_name = cinfo->name; 789 790 dai_link->dai_fmt = cinfo->daifmt; 790 - dai_link->init = asoc_simple_dai_init; 791 + dai_link->init = simple_util_dai_init; 791 792 memcpy(dai_props->cpu_dai, &cinfo->cpu_dai, 792 793 sizeof(*dai_props->cpu_dai)); 793 794 memcpy(dai_props->codec_dai, &cinfo->codec_dai, ··· 796 797 797 798 snd_soc_card_set_drvdata(card, priv); 798 799 799 - asoc_simple_debug_info(priv); 800 + simple_util_debug_info(priv); 800 801 801 802 ret = devm_snd_soc_register_card(dev, card); 802 803 if (ret < 0) ··· 805 806 devm_kfree(dev, li); 806 807 return 0; 807 808 err: 808 - asoc_simple_clean_reference(card); 809 + simple_util_clean_reference(card); 809 810 810 811 return ret; 811 812 } ··· 818 819 }; 819 820 MODULE_DEVICE_TABLE(of, simple_of_match); 820 821 821 - static struct platform_driver asoc_simple_card = { 822 + static struct platform_driver simple_card = { 822 823 .driver = { 823 824 .name = "asoc-simple-card", 824 825 .pm = &snd_soc_pm_ops, 825 826 .of_match_table = simple_of_match, 826 827 }, 827 - .probe = asoc_simple_probe, 828 - .remove = asoc_simple_remove, 828 + .probe = simple_probe, 829 + .remove = simple_util_remove, 829 830 }; 830 831 831 - module_platform_driver(asoc_simple_card); 832 + module_platform_driver(simple_card); 832 833 833 834 MODULE_ALIAS("platform:asoc-simple-card"); 834 835 MODULE_LICENSE("GPL v2");
+1 -1
sound/soc/generic/test-component.c
··· 352 352 static int test_component_open(struct snd_soc_component *component, 353 353 struct snd_pcm_substream *substream) 354 354 { 355 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 355 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 356 356 357 357 mile_stone(component); 358 358
+11 -11
sound/soc/google/chv3-i2s.c
··· 131 131 static int chv3_dma_open(struct snd_soc_component *component, 132 132 struct snd_pcm_substream *substream) 133 133 { 134 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 135 - struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 134 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 135 + struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 136 136 int res; 137 137 138 138 snd_soc_set_runtime_hwparams(substream, &chv3_dma_hw); ··· 152 152 static int chv3_dma_close(struct snd_soc_component *component, 153 153 struct snd_pcm_substream *substream) 154 154 { 155 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 156 - struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 155 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 156 + struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 157 157 158 158 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) 159 159 chv3_i2s_wr(i2s, I2S_RX_ENABLE, 0); ··· 166 166 static int chv3_dma_pcm_construct(struct snd_soc_component *component, 167 167 struct snd_soc_pcm_runtime *rtd) 168 168 { 169 - struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 169 + struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 170 170 struct snd_pcm_substream *substream; 171 171 int res; 172 172 ··· 200 200 static int chv3_dma_prepare(struct snd_soc_component *component, 201 201 struct snd_pcm_substream *substream) 202 202 { 203 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 204 - struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 203 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 204 + struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 205 205 unsigned int buffer_bytes, period_bytes, period_size; 206 206 207 207 buffer_bytes = snd_pcm_lib_buffer_bytes(substream); ··· 229 229 static snd_pcm_uframes_t chv3_dma_pointer(struct snd_soc_component *component, 230 230 struct snd_pcm_substream *substream) 231 231 { 232 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 233 - struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 232 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 233 + struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 234 234 u32 frame_bytes, buffer_bytes; 235 235 u32 idx_bytes; 236 236 ··· 252 252 struct snd_pcm_substream *substream) 253 253 { 254 254 struct snd_pcm_runtime *runtime = substream->runtime; 255 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 256 - struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 255 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 256 + struct chv3_i2s_dev *i2s = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 257 257 unsigned int bytes, idx; 258 258 259 259 bytes = frames_to_bytes(runtime, runtime->control->appl_ptr);
+1 -1
sound/soc/img/img-i2s-in.c
··· 399 399 struct snd_dmaengine_dai_dma_data *dma_data; 400 400 int ret; 401 401 402 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), st); 402 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), st); 403 403 404 404 ret = snd_hwparams_to_dma_slave_config(st, params, sc); 405 405 if (ret)
+1 -1
sound/soc/img/img-i2s-out.c
··· 405 405 struct snd_dmaengine_dai_dma_data *dma_data; 406 406 int ret; 407 407 408 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), st); 408 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), st); 409 409 410 410 ret = snd_hwparams_to_dma_slave_config(st, params, sc); 411 411 if (ret)
+2 -2
sound/soc/intel/avs/boards/da7219.c
··· 90 90 91 91 static int avs_da7219_codec_init(struct snd_soc_pcm_runtime *runtime) 92 92 { 93 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 93 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 94 94 struct snd_soc_component *component = codec_dai->component; 95 95 struct snd_soc_card *card = runtime->card; 96 96 struct snd_soc_jack_pin *pins; ··· 140 140 141 141 static void avs_da7219_codec_exit(struct snd_soc_pcm_runtime *rtd) 142 142 { 143 - snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 143 + snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 144 144 } 145 145 146 146 static int
+4 -4
sound/soc/intel/avs/boards/es8336.c
··· 97 97 98 98 static int avs_es8336_codec_init(struct snd_soc_pcm_runtime *runtime) 99 99 { 100 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 100 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 101 101 struct snd_soc_component *component = codec_dai->component; 102 102 struct snd_soc_card *card = runtime->card; 103 103 struct snd_soc_jack_pin *pins; ··· 138 138 static void avs_es8336_codec_exit(struct snd_soc_pcm_runtime *runtime) 139 139 { 140 140 struct avs_card_drvdata *data = snd_soc_card_get_drvdata(runtime->card); 141 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 141 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 142 142 143 143 snd_soc_component_set_jack(codec_dai->component, NULL, NULL); 144 144 gpiod_put(data->gpiod); ··· 147 147 static int avs_es8336_hw_params(struct snd_pcm_substream *substream, 148 148 struct snd_pcm_hw_params *params) 149 149 { 150 - struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream); 151 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 150 + struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream); 151 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 152 152 int clk_freq; 153 153 int ret; 154 154
+1 -1
sound/soc/intel/avs/boards/i2s_test.c
··· 32 32 return -ENOMEM; 33 33 34 34 dl->cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", ssp_port); 35 - dl->codecs = &asoc_dummy_dlc; 35 + dl->codecs = &snd_soc_dummy_dlc; 36 36 if (!dl->cpus->dai_name || !dl->codecs->name || !dl->codecs->dai_name) 37 37 return -ENOMEM; 38 38
+1 -1
sound/soc/intel/avs/boards/max98373.c
··· 66 66 static int avs_max98373_hw_params(struct snd_pcm_substream *substream, 67 67 struct snd_pcm_hw_params *params) 68 68 { 69 - struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream); 69 + struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream); 70 70 struct snd_soc_dai *codec_dai; 71 71 int ret, i; 72 72
+1 -1
sound/soc/intel/avs/boards/max98927.c
··· 66 66 static int avs_max98927_hw_params(struct snd_pcm_substream *substream, 67 67 struct snd_pcm_hw_params *params) 68 68 { 69 - struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream); 69 + struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream); 70 70 struct snd_soc_dai *codec_dai; 71 71 int ret = 0; 72 72 int i;
+4 -4
sound/soc/intel/avs/boards/nau8825.c
··· 106 106 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); 107 107 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); 108 108 109 - return snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL); 109 + return snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, jack, NULL); 110 110 } 111 111 112 112 static void avs_nau8825_codec_exit(struct snd_soc_pcm_runtime *rtd) 113 113 { 114 - snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 114 + snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 115 115 } 116 116 117 117 static int ··· 138 138 static int avs_nau8825_trigger(struct snd_pcm_substream *substream, int cmd) 139 139 { 140 140 struct snd_pcm_runtime *runtime = substream->runtime; 141 - struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream); 142 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtm, 0); 141 + struct snd_soc_pcm_runtime *rtm = snd_soc_substream_to_rtd(substream); 142 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtm, 0); 143 143 int ret = 0; 144 144 145 145 switch (cmd) {
+2 -2
sound/soc/intel/avs/boards/rt274.c
··· 87 87 88 88 static int avs_rt274_codec_init(struct snd_soc_pcm_runtime *runtime) 89 89 { 90 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 90 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 91 91 struct snd_soc_component *component = codec_dai->component; 92 92 struct snd_soc_jack_pin *pins; 93 93 struct snd_soc_jack *jack; ··· 121 121 122 122 static void avs_rt274_codec_exit(struct snd_soc_pcm_runtime *rtd) 123 123 { 124 - snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 124 + snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 125 125 } 126 126 127 127 static int avs_rt274_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pcm_hw_params *params)
+4 -4
sound/soc/intel/avs/boards/rt286.c
··· 67 67 if (ret) 68 68 return ret; 69 69 70 - return snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL); 70 + return snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, jack, NULL); 71 71 } 72 72 73 73 static void avs_rt286_codec_exit(struct snd_soc_pcm_runtime *rtd) 74 74 { 75 - snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 75 + snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 76 76 } 77 77 78 78 static int avs_rt286_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pcm_hw_params *params) ··· 98 98 static int 99 99 avs_rt286_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) 100 100 { 101 - struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream); 102 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 101 + struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream); 102 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 103 103 int ret; 104 104 105 105 ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000, SND_SOC_CLOCK_IN);
+4 -4
sound/soc/intel/avs/boards/rt298.c
··· 78 78 if (ret) 79 79 return ret; 80 80 81 - return snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL); 81 + return snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, jack, NULL); 82 82 } 83 83 84 84 static void avs_rt298_codec_exit(struct snd_soc_pcm_runtime *rtd) 85 85 { 86 - snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 86 + snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 87 87 } 88 88 89 89 static int avs_rt298_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pcm_hw_params *params) ··· 109 109 static int 110 110 avs_rt298_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) 111 111 { 112 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 113 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 112 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 113 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 114 114 unsigned int clk_freq; 115 115 int ret; 116 116
+4 -4
sound/soc/intel/avs/boards/rt5663.c
··· 79 79 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); 80 80 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); 81 81 82 - snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL); 82 + snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, jack, NULL); 83 83 84 84 return 0; 85 85 } 86 86 87 87 static void avs_rt5663_codec_exit(struct snd_soc_pcm_runtime *runtime) 88 88 { 89 - snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, NULL, NULL); 89 + snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, NULL, NULL); 90 90 } 91 91 92 92 static int ··· 113 113 static int avs_rt5663_hw_params(struct snd_pcm_substream *substream, 114 114 struct snd_pcm_hw_params *params) 115 115 { 116 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 117 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 116 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 117 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 118 118 int ret; 119 119 120 120 /* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */
+4 -4
sound/soc/intel/avs/boards/rt5682.c
··· 92 92 93 93 static int avs_rt5682_codec_init(struct snd_soc_pcm_runtime *runtime) 94 94 { 95 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 95 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 96 96 struct snd_soc_card *card = runtime->card; 97 97 struct snd_soc_jack_pin *pins; 98 98 struct snd_soc_jack *jack; ··· 137 137 138 138 static void avs_rt5682_codec_exit(struct snd_soc_pcm_runtime *rtd) 139 139 { 140 - snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 140 + snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL); 141 141 } 142 142 143 143 static int 144 144 avs_rt5682_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) 145 145 { 146 - struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream); 147 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 146 + struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream); 147 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 148 148 int pll_source, freq_in, freq_out; 149 149 int ret; 150 150
+2 -2
sound/soc/intel/avs/boards/ssm4567.c
··· 50 50 int ret; 51 51 52 52 /* Slot 1 for left */ 53 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_codec(runtime, 0), 0x01, 0x01, 2, 48); 53 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_codec(runtime, 0), 0x01, 0x01, 2, 48); 54 54 if (ret < 0) 55 55 return ret; 56 56 57 57 /* Slot 2 for right */ 58 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_codec(runtime, 1), 0x02, 0x02, 2, 48); 58 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_codec(runtime, 1), 0x02, 0x02, 2, 48); 59 59 if (ret < 0) 60 60 return ret; 61 61
+22 -22
sound/soc/intel/avs/pcm.c
··· 58 58 static int avs_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai, bool is_fe, 59 59 const struct snd_soc_dai_ops *ops) 60 60 { 61 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 61 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 62 62 struct avs_dev *adev = to_avs_dev(dai->dev); 63 63 struct avs_tplg_path_template *template; 64 64 struct avs_dma_data *data; ··· 127 127 struct snd_soc_pcm_runtime *fe, *be; 128 128 struct snd_soc_dpcm *dpcm; 129 129 130 - be = asoc_substream_to_rtd(substream); 130 + be = snd_soc_substream_to_rtd(substream); 131 131 for_each_dpcm_fe(be, substream->stream, dpcm) { 132 132 fe = dpcm->fe; 133 133 fe_hw_params = &fe->dpcm[substream->stream].hw_params; ··· 167 167 168 168 static void avs_dai_nonhda_be_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) 169 169 { 170 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 170 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 171 171 struct avs_dev *adev = to_avs_dev(dai->dev); 172 172 struct avs_dma_data *data; 173 173 ··· 216 216 static int avs_dai_nonhda_be_trigger(struct snd_pcm_substream *substream, int cmd, 217 217 struct snd_soc_dai *dai) 218 218 { 219 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 219 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 220 220 struct avs_dma_data *data; 221 221 int ret = 0; 222 222 ··· 303 303 static int avs_dai_hda_be_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) 304 304 { 305 305 struct avs_dma_data *data; 306 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 306 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 307 307 struct hdac_ext_stream *link_stream; 308 308 struct hdac_ext_link *link; 309 309 struct hda_codec *codec; ··· 320 320 data->path = NULL; 321 321 322 322 /* clear link <-> stream mapping */ 323 - codec = dev_to_hda_codec(asoc_rtd_to_codec(rtd, 0)->dev); 323 + codec = dev_to_hda_codec(snd_soc_rtd_to_codec(rtd, 0)->dev); 324 324 link = snd_hdac_ext_bus_get_hlink_by_addr(&codec->bus->core, codec->core.addr); 325 325 if (!link) 326 326 return -EINVAL; ··· 333 333 334 334 static int avs_dai_hda_be_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) 335 335 { 336 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 336 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 337 337 struct snd_pcm_runtime *runtime = substream->runtime; 338 338 struct hdac_ext_stream *link_stream = runtime->private_data; 339 339 struct hdac_ext_link *link; ··· 345 345 if (link_stream->link_prepared) 346 346 return 0; 347 347 348 - codec = dev_to_hda_codec(asoc_rtd_to_codec(rtd, 0)->dev); 348 + codec = dev_to_hda_codec(snd_soc_rtd_to_codec(rtd, 0)->dev); 349 349 bus = &codec->bus->core; 350 350 format_val = snd_hdac_calc_stream_format(runtime->rate, runtime->channels, runtime->format, 351 351 runtime->sample_bits, 0); ··· 372 372 static int avs_dai_hda_be_trigger(struct snd_pcm_substream *substream, int cmd, 373 373 struct snd_soc_dai *dai) 374 374 { 375 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 375 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 376 376 struct hdac_ext_stream *link_stream; 377 377 struct avs_dma_data *data; 378 378 int ret = 0; ··· 500 500 501 501 static void avs_dai_fe_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) 502 502 { 503 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 503 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 504 504 struct avs_dev *adev = to_avs_dev(dai->dev); 505 505 struct avs_dma_data *data; 506 506 ··· 534 534 hdac_stream(host_stream)->period_bytes = 0; 535 535 hdac_stream(host_stream)->format_val = 0; 536 536 537 - fe = asoc_substream_to_rtd(substream); 537 + fe = snd_soc_substream_to_rtd(substream); 538 538 for_each_dpcm_be(fe, substream->stream, dpcm) { 539 539 be = dpcm->be; 540 540 be_hw_params = &be->dpcm[substream->stream].hw_params; ··· 639 639 640 640 static int avs_dai_fe_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) 641 641 { 642 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 642 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 643 643 struct avs_dma_data *data; 644 644 struct hdac_ext_stream *host_stream; 645 645 struct hdac_bus *bus; ··· 869 869 int ret; 870 870 871 871 substream = data->substream; 872 - rtd = asoc_substream_to_rtd(substream); 872 + rtd = snd_soc_substream_to_rtd(substream); 873 873 874 874 ret = dai->driver->ops->hw_params(substream, &rtd->dpcm[substream->stream].hw_params, dai); 875 875 if (ret) ··· 964 964 for_each_component_dais(component, dai) { 965 965 data = snd_soc_dai_dma_data_get_playback(dai); 966 966 if (data) { 967 - rtd = asoc_substream_to_rtd(data->substream); 967 + rtd = snd_soc_substream_to_rtd(data->substream); 968 968 if (rtd->dai_link->no_pcm == be && !rtd->dai_link->ignore_suspend) { 969 969 ret = op(dai, data); 970 970 if (ret < 0) { ··· 977 977 978 978 data = snd_soc_dai_dma_data_get_capture(dai); 979 979 if (data) { 980 - rtd = asoc_substream_to_rtd(data->substream); 980 + rtd = snd_soc_substream_to_rtd(data->substream); 981 981 if (rtd->dai_link->no_pcm == be && !rtd->dai_link->ignore_suspend) { 982 982 ret = op(dai, data); 983 983 if (ret < 0) { ··· 1081 1081 static int avs_component_open(struct snd_soc_component *component, 1082 1082 struct snd_pcm_substream *substream) 1083 1083 { 1084 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1084 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1085 1085 1086 1086 /* only FE DAI links are handled here */ 1087 1087 if (rtd->dai_link->no_pcm) ··· 1099 1099 static snd_pcm_uframes_t 1100 1100 avs_component_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) 1101 1101 { 1102 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1102 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1103 1103 struct avs_dma_data *data; 1104 1104 struct hdac_ext_stream *host_stream; 1105 1105 unsigned int pos; 1106 1106 1107 - data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 1107 + data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 1108 1108 if (!data->host_stream) 1109 1109 return 0; 1110 1110 ··· 1129 1129 static int avs_component_construct(struct snd_soc_component *component, 1130 1130 struct snd_soc_pcm_runtime *rtd) 1131 1131 { 1132 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); 1132 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 1133 1133 struct snd_pcm *pcm = rtd->pcm; 1134 1134 1135 1135 if (dai->driver->playback.channels_min) ··· 1430 1430 static int avs_component_hda_open(struct snd_soc_component *component, 1431 1431 struct snd_pcm_substream *substream) 1432 1432 { 1433 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1433 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1434 1434 struct hdac_ext_stream *link_stream; 1435 1435 struct hda_codec *codec; 1436 1436 ··· 1464 1464 return snd_soc_set_runtime_hwparams(substream, &hwparams); 1465 1465 } 1466 1466 1467 - codec = dev_to_hda_codec(asoc_rtd_to_codec(rtd, 0)->dev); 1467 + codec = dev_to_hda_codec(snd_soc_rtd_to_codec(rtd, 0)->dev); 1468 1468 link_stream = snd_hdac_ext_stream_assign(&codec->bus->core, substream, 1469 1469 HDAC_EXT_STREAM_TYPE_LINK); 1470 1470 if (!link_stream) ··· 1477 1477 static int avs_component_hda_close(struct snd_soc_component *component, 1478 1478 struct snd_pcm_substream *substream) 1479 1479 { 1480 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1480 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1481 1481 struct hdac_ext_stream *link_stream; 1482 1482 1483 1483 /* only BE DAI links are handled here */
+2 -2
sound/soc/kirkwood/armada-370-db.c
··· 18 18 static int a370db_hw_params(struct snd_pcm_substream *substream, 19 19 struct snd_pcm_hw_params *params) 20 20 { 21 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 22 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 21 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 22 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 23 23 unsigned int freq; 24 24 25 25 switch (params_rate(params)) {
+1 -1
sound/soc/kirkwood/kirkwood-dma.c
··· 20 20 static struct kirkwood_dma_data *kirkwood_priv(struct snd_pcm_substream *subs) 21 21 { 22 22 struct snd_soc_pcm_runtime *soc_runtime = subs->private_data; 23 - return snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(soc_runtime, 0)); 23 + return snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(soc_runtime, 0)); 24 24 } 25 25 26 26 static const struct snd_pcm_hardware kirkwood_dma_snd_hw = {
+2 -2
sound/soc/loongson/loongson_card.c
··· 24 24 struct snd_pcm_hw_params *params) 25 25 { 26 26 struct snd_soc_pcm_runtime *rtd = substream->private_data; 27 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 28 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 27 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 28 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 29 29 struct loongson_card_data *ls_card = snd_soc_card_get_drvdata(rtd->card); 30 30 int ret, mclk; 31 31
+2 -2
sound/soc/loongson/loongson_dma.c
··· 267 267 goto pos_err; 268 268 } 269 269 270 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 270 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 271 271 prtd->dma_data = dma_data; 272 272 273 273 substream->runtime->private_data = prtd; ··· 321 321 if (!substream) 322 322 continue; 323 323 324 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), 324 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), 325 325 substream); 326 326 ret = devm_request_irq(card->dev, dma_data->irq, 327 327 loongson_pcm_dma_irq,
+1 -1
sound/soc/meson/aiu-fifo.c
··· 27 27 { 28 28 struct snd_soc_pcm_runtime *rtd = ss->private_data; 29 29 30 - return asoc_rtd_to_cpu(rtd, 0); 30 + return snd_soc_rtd_to_cpu(rtd, 0); 31 31 } 32 32 33 33 snd_pcm_uframes_t aiu_fifo_pointer(struct snd_soc_component *component,
+6 -6
sound/soc/meson/axg-card.c
··· 40 40 static int axg_card_tdm_be_hw_params(struct snd_pcm_substream *substream, 41 41 struct snd_pcm_hw_params *params) 42 42 { 43 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 43 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 44 44 struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card); 45 45 struct axg_dai_link_tdm_data *be = 46 46 (struct axg_dai_link_tdm_data *)priv->link_data[rtd->num]; ··· 72 72 } 73 73 } 74 74 75 - ret = axg_tdm_set_tdm_slots(asoc_rtd_to_cpu(rtd, 0), be->tx_mask, be->rx_mask, 75 + ret = axg_tdm_set_tdm_slots(snd_soc_rtd_to_cpu(rtd, 0), be->tx_mask, be->rx_mask, 76 76 be->slots, be->slot_width); 77 77 if (ret) { 78 - dev_err(asoc_rtd_to_cpu(rtd, 0)->dev, "setting tdm link slots failed\n"); 78 + dev_err(snd_soc_rtd_to_cpu(rtd, 0)->dev, "setting tdm link slots failed\n"); 79 79 return ret; 80 80 } 81 81 ··· 90 90 int ret; 91 91 92 92 /* The loopback rx_mask is the pad tx_mask */ 93 - ret = axg_tdm_set_tdm_slots(asoc_rtd_to_cpu(rtd, 0), NULL, be->tx_mask, 93 + ret = axg_tdm_set_tdm_slots(snd_soc_rtd_to_cpu(rtd, 0), NULL, be->tx_mask, 94 94 be->slots, be->slot_width); 95 95 if (ret) { 96 - dev_err(asoc_rtd_to_cpu(rtd, 0)->dev, "setting tdm link slots failed\n"); 96 + dev_err(snd_soc_rtd_to_cpu(rtd, 0)->dev, "setting tdm link slots failed\n"); 97 97 return ret; 98 98 } 99 99 ··· 125 125 return -ENOMEM; 126 126 127 127 lb->cpus = dlc; 128 - lb->codecs = &asoc_dummy_dlc; 128 + lb->codecs = &snd_soc_dummy_dlc; 129 129 lb->num_cpus = 1; 130 130 lb->num_codecs = 1; 131 131
+1 -1
sound/soc/meson/axg-fifo.c
··· 47 47 { 48 48 struct snd_soc_pcm_runtime *rtd = ss->private_data; 49 49 50 - return asoc_rtd_to_cpu(rtd, 0); 50 + return snd_soc_rtd_to_cpu(rtd, 0); 51 51 } 52 52 53 53 static struct axg_fifo *axg_fifo_data(struct snd_pcm_substream *ss)
+1 -1
sound/soc/meson/gx-card.c
··· 29 29 static int gx_card_i2s_be_hw_params(struct snd_pcm_substream *substream, 30 30 struct snd_pcm_hw_params *params) 31 31 { 32 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 32 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 33 33 struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card); 34 34 struct gx_dai_link_i2s_data *be = 35 35 (struct gx_dai_link_i2s_data *)priv->link_data[rtd->num];
+3 -3
sound/soc/meson/meson-card-utils.c
··· 13 13 struct snd_pcm_hw_params *params, 14 14 unsigned int mclk_fs) 15 15 { 16 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 16 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 17 17 struct snd_soc_dai *codec_dai; 18 18 unsigned int mclk; 19 19 int ret, i; ··· 30 30 return ret; 31 31 } 32 32 33 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 0, mclk, 33 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 0, mclk, 34 34 SND_SOC_CLOCK_OUT); 35 35 if (ret && ret != -ENOTSUPP) 36 36 return ret; ··· 177 177 struct device_node *node, 178 178 bool is_playback) 179 179 { 180 - link->codecs = &asoc_dummy_dlc; 180 + link->codecs = &snd_soc_dummy_dlc; 181 181 link->num_codecs = 1; 182 182 183 183 link->dynamic = 1;
+1 -1
sound/soc/meson/meson-codec-glue.c
··· 98 98 int meson_codec_glue_output_startup(struct snd_pcm_substream *substream, 99 99 struct snd_soc_dai *dai) 100 100 { 101 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 101 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 102 102 struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget_capture(dai); 103 103 struct meson_codec_glue_input *in_data = meson_codec_glue_output_get_input_data(w); 104 104
+3 -3
sound/soc/mxs/mxs-sgtl5000.c
··· 19 19 static int mxs_sgtl5000_hw_params(struct snd_pcm_substream *substream, 20 20 struct snd_pcm_hw_params *params) 21 21 { 22 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 23 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 24 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 22 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 23 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 24 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 25 25 unsigned int rate = params_rate(params); 26 26 u32 mclk; 27 27 int ret;
+2 -2
sound/soc/pxa/pxa2xx-i2s.c
··· 93 93 static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream, 94 94 struct snd_soc_dai *dai) 95 95 { 96 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 97 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 96 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 97 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 98 98 99 99 if (IS_ERR(clk_i2s)) 100 100 return PTR_ERR(clk_i2s);
+4 -4
sound/soc/pxa/spitz.c
··· 104 104 105 105 static int spitz_startup(struct snd_pcm_substream *substream) 106 106 { 107 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 107 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 108 108 109 109 /* check the jack status at stream startup */ 110 110 spitz_ext_control(&rtd->card->dapm); ··· 115 115 static int spitz_hw_params(struct snd_pcm_substream *substream, 116 116 struct snd_pcm_hw_params *params) 117 117 { 118 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 119 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 120 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 118 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 119 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 120 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 121 121 unsigned int clk = 0; 122 122 int ret = 0; 123 123
+4 -4
sound/soc/qcom/apq8016_sbc.c
··· 147 147 148 148 static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd) 149 149 { 150 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 150 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 151 151 152 152 return apq8016_dai_init(rtd, cpu_dai->id); 153 153 } ··· 183 183 184 184 static int msm8916_qdsp6_dai_init(struct snd_soc_pcm_runtime *rtd) 185 185 { 186 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 186 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 187 187 188 188 snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP); 189 189 return apq8016_dai_init(rtd, qdsp6_dai_get_lpass_id(cpu_dai)); ··· 194 194 struct snd_soc_pcm_runtime *rtd = substream->private_data; 195 195 struct snd_soc_card *card = rtd->card; 196 196 struct apq8016_sbc_data *data = snd_soc_card_get_drvdata(card); 197 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 197 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 198 198 int mi2s, ret; 199 199 200 200 mi2s = qdsp6_dai_get_lpass_id(cpu_dai); ··· 215 215 struct snd_soc_pcm_runtime *rtd = substream->private_data; 216 216 struct snd_soc_card *card = rtd->card; 217 217 struct apq8016_sbc_data *data = snd_soc_card_get_drvdata(card); 218 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 218 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 219 219 int mi2s, ret; 220 220 221 221 mi2s = qdsp6_dai_get_lpass_id(cpu_dai);
+4 -4
sound/soc/qcom/apq8096.c
··· 30 30 static int msm_snd_hw_params(struct snd_pcm_substream *substream, 31 31 struct snd_pcm_hw_params *params) 32 32 { 33 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 34 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 35 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 33 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 34 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 35 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 36 36 u32 rx_ch[SLIM_MAX_RX_PORTS], tx_ch[SLIM_MAX_TX_PORTS]; 37 37 u32 rx_ch_cnt = 0, tx_ch_cnt = 0; 38 38 int ret = 0; ··· 66 66 67 67 static int apq8096_init(struct snd_soc_pcm_runtime *rtd) 68 68 { 69 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 69 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 70 70 71 71 /* 72 72 * Codec SLIMBUS configuration
+3 -3
sound/soc/qcom/common.c
··· 138 138 } 139 139 } else { 140 140 /* DPCM frontend */ 141 - link->codecs = &asoc_dummy_dlc; 141 + link->codecs = &snd_soc_dummy_dlc; 142 142 link->num_codecs = 1; 143 143 link->dynamic = 1; 144 144 } ··· 189 189 int qcom_snd_wcd_jack_setup(struct snd_soc_pcm_runtime *rtd, 190 190 struct snd_soc_jack *jack, bool *jack_setup) 191 191 { 192 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 193 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 192 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 193 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 194 194 struct snd_soc_card *card = rtd->card; 195 195 int rval, i; 196 196
+8 -8
sound/soc/qcom/lpass-cdc-dma.c
··· 32 32 static void __lpass_get_dmactl_handle(struct snd_pcm_substream *substream, struct snd_soc_dai *dai, 33 33 struct lpaif_dmactl **dmactl, int *id) 34 34 { 35 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 36 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 35 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 36 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 37 37 struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); 38 38 struct snd_pcm_runtime *rt = substream->runtime; 39 39 struct lpass_pcm_data *pcm_data = rt->private_data; ··· 122 122 static int __lpass_platform_codec_intf_init(struct snd_soc_dai *dai, 123 123 struct snd_pcm_substream *substream) 124 124 { 125 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 126 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 125 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 126 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 127 127 struct lpaif_dmactl *dmactl = NULL; 128 128 struct device *dev = soc_runtime->dev; 129 129 int ret, id, codec_intf; ··· 171 171 struct snd_soc_dai *dai) 172 172 { 173 173 struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); 174 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 174 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 175 175 176 176 switch (dai->id) { 177 177 case LPASS_CDC_DMA_RX0 ... LPASS_CDC_DMA_RX9: ··· 194 194 struct snd_soc_dai *dai) 195 195 { 196 196 struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); 197 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 197 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 198 198 199 199 switch (dai->id) { 200 200 case LPASS_CDC_DMA_RX0 ... LPASS_CDC_DMA_RX9: ··· 214 214 struct snd_pcm_hw_params *params, 215 215 struct snd_soc_dai *dai) 216 216 { 217 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 217 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 218 218 struct lpaif_dmactl *dmactl = NULL; 219 219 unsigned int ret, regval; 220 220 unsigned int channels = params_channels(params); ··· 257 257 static int lpass_cdc_dma_daiops_trigger(struct snd_pcm_substream *substream, 258 258 int cmd, struct snd_soc_dai *dai) 259 259 { 260 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 260 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 261 261 struct lpaif_dmactl *dmactl; 262 262 int ret = 0, id; 263 263
+25 -25
sound/soc/qcom/lpass-platform.c
··· 192 192 struct snd_pcm_substream *substream) 193 193 { 194 194 struct snd_pcm_runtime *runtime = substream->runtime; 195 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 196 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 195 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 196 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 197 197 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 198 198 struct lpass_variant *v = drvdata->variant; 199 199 int ret, dma_ch, dir = substream->stream; ··· 284 284 struct snd_pcm_substream *substream) 285 285 { 286 286 struct snd_pcm_runtime *runtime = substream->runtime; 287 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 288 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 287 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 288 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 289 289 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 290 290 struct lpass_variant *v = drvdata->variant; 291 291 struct lpass_pcm_data *data; ··· 321 321 static struct lpaif_dmactl *__lpass_get_dmactl_handle(const struct snd_pcm_substream *substream, 322 322 struct snd_soc_component *component) 323 323 { 324 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 325 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 324 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 325 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 326 326 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 327 327 struct lpaif_dmactl *dmactl = NULL; 328 328 ··· 353 353 static int __lpass_get_id(const struct snd_pcm_substream *substream, 354 354 struct snd_soc_component *component) 355 355 { 356 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 357 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 356 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 357 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 358 358 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 359 359 struct snd_pcm_runtime *rt = substream->runtime; 360 360 struct lpass_pcm_data *pcm_data = rt->private_data; ··· 388 388 static struct regmap *__lpass_get_regmap_handle(const struct snd_pcm_substream *substream, 389 389 struct snd_soc_component *component) 390 390 { 391 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 392 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 391 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 392 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 393 393 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 394 394 struct regmap *map = NULL; 395 395 ··· 416 416 struct snd_pcm_substream *substream, 417 417 struct snd_pcm_hw_params *params) 418 418 { 419 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 420 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 419 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 420 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 421 421 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 422 422 struct snd_pcm_runtime *rt = substream->runtime; 423 423 struct lpass_pcm_data *pcm_data = rt->private_data; ··· 569 569 static int lpass_platform_pcmops_hw_free(struct snd_soc_component *component, 570 570 struct snd_pcm_substream *substream) 571 571 { 572 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 573 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 572 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 573 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 574 574 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 575 575 struct snd_pcm_runtime *rt = substream->runtime; 576 576 struct lpass_pcm_data *pcm_data = rt->private_data; ··· 597 597 struct snd_pcm_substream *substream) 598 598 { 599 599 struct snd_pcm_runtime *runtime = substream->runtime; 600 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 601 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 600 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 601 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 602 602 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 603 603 struct snd_pcm_runtime *rt = substream->runtime; 604 604 struct lpass_pcm_data *pcm_data = rt->private_data; ··· 660 660 struct snd_pcm_substream *substream, 661 661 int cmd) 662 662 { 663 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 664 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 663 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 664 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 665 665 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 666 666 struct snd_pcm_runtime *rt = substream->runtime; 667 667 struct lpass_pcm_data *pcm_data = rt->private_data; ··· 859 859 struct snd_soc_component *component, 860 860 struct snd_pcm_substream *substream) 861 861 { 862 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 863 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 862 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 863 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 864 864 struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); 865 865 struct snd_pcm_runtime *rt = substream->runtime; 866 866 struct lpass_pcm_data *pcm_data = rt->private_data; ··· 911 911 struct snd_pcm_substream *substream, 912 912 struct vm_area_struct *vma) 913 913 { 914 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 915 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 914 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 915 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 916 916 unsigned int dai_id = cpu_dai->driver->id; 917 917 918 918 if (is_cdc_dma_port(dai_id)) ··· 926 926 struct lpass_data *drvdata, 927 927 int chan, u32 interrupts) 928 928 { 929 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 930 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 929 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 930 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 931 931 struct lpass_variant *v = drvdata->variant; 932 932 irqreturn_t ret = IRQ_NONE; 933 933 int rv; ··· 1169 1169 struct snd_soc_pcm_runtime *soc_runtime) 1170 1170 { 1171 1171 struct snd_pcm *pcm = soc_runtime->pcm; 1172 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_runtime, 0); 1172 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); 1173 1173 unsigned int dai_id = cpu_dai->driver->id; 1174 1174 1175 1175 size_t size = lpass_platform_pcm_hardware.buffer_bytes_max;
+2 -2
sound/soc/qcom/qdsp6/q6apm-dai.c
··· 332 332 { 333 333 struct snd_pcm_runtime *runtime = substream->runtime; 334 334 struct snd_soc_pcm_runtime *soc_prtd = substream->private_data; 335 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_prtd, 0); 335 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_prtd, 0); 336 336 struct device *dev = component->dev; 337 337 struct q6apm_dai_data *pdata; 338 338 struct q6apm_dai_rtd *prtd; ··· 478 478 struct snd_compr_stream *stream) 479 479 { 480 480 struct snd_soc_pcm_runtime *rtd = stream->private_data; 481 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 481 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 482 482 struct snd_compr_runtime *runtime = stream->runtime; 483 483 struct q6apm_dai_rtd *prtd; 484 484 struct q6apm_dai_data *pdata;
+5 -5
sound/soc/qcom/qdsp6/q6asm-dai.c
··· 218 218 struct snd_pcm_substream *substream) 219 219 { 220 220 struct snd_pcm_runtime *runtime = substream->runtime; 221 - struct snd_soc_pcm_runtime *soc_prtd = asoc_substream_to_rtd(substream); 221 + struct snd_soc_pcm_runtime *soc_prtd = snd_soc_substream_to_rtd(substream); 222 222 struct q6asm_dai_rtd *prtd = runtime->private_data; 223 223 struct q6asm_dai_data *pdata; 224 224 struct device *dev = component->dev; ··· 350 350 struct snd_pcm_substream *substream) 351 351 { 352 352 struct snd_pcm_runtime *runtime = substream->runtime; 353 - struct snd_soc_pcm_runtime *soc_prtd = asoc_substream_to_rtd(substream); 354 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(soc_prtd, 0); 353 + struct snd_soc_pcm_runtime *soc_prtd = snd_soc_substream_to_rtd(substream); 354 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_prtd, 0); 355 355 struct q6asm_dai_rtd *prtd; 356 356 struct q6asm_dai_data *pdata; 357 357 struct device *dev = component->dev; ··· 443 443 struct snd_pcm_substream *substream) 444 444 { 445 445 struct snd_pcm_runtime *runtime = substream->runtime; 446 - struct snd_soc_pcm_runtime *soc_prtd = asoc_substream_to_rtd(substream); 446 + struct snd_soc_pcm_runtime *soc_prtd = snd_soc_substream_to_rtd(substream); 447 447 struct q6asm_dai_rtd *prtd = runtime->private_data; 448 448 449 449 if (prtd->audio_client) { ··· 603 603 { 604 604 struct snd_soc_pcm_runtime *rtd = stream->private_data; 605 605 struct snd_compr_runtime *runtime = stream->runtime; 606 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 606 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 607 607 struct q6asm_dai_data *pdata; 608 608 struct device *dev = component->dev; 609 609 struct q6asm_dai_rtd *prtd;
+2 -2
sound/soc/qcom/qdsp6/q6routing.c
··· 1048 1048 struct snd_pcm_substream *substream, 1049 1049 struct snd_pcm_hw_params *params) 1050 1050 { 1051 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1051 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1052 1052 struct msm_routing_data *data = dev_get_drvdata(component->dev); 1053 - unsigned int be_id = asoc_rtd_to_cpu(rtd, 0)->id; 1053 + unsigned int be_id = snd_soc_rtd_to_cpu(rtd, 0)->id; 1054 1054 struct session_data *session; 1055 1055 int path_type; 1056 1056
+9 -9
sound/soc/qcom/sc7180.c
··· 57 57 { 58 58 struct snd_soc_card *card = rtd->card; 59 59 struct sc7180_snd_data *pdata = snd_soc_card_get_drvdata(card); 60 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 60 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 61 61 struct snd_soc_component *component = codec_dai->component; 62 62 struct snd_jack *jack; 63 63 int rval; ··· 93 93 { 94 94 struct snd_soc_card *card = rtd->card; 95 95 struct sc7180_snd_data *pdata = snd_soc_card_get_drvdata(card); 96 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 96 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 97 97 struct snd_soc_component *component = codec_dai->component; 98 98 struct snd_jack *jack; 99 99 int rval; ··· 117 117 118 118 static int sc7180_init(struct snd_soc_pcm_runtime *rtd) 119 119 { 120 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 120 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 121 121 122 122 switch (cpu_dai->id) { 123 123 case MI2S_PRIMARY: ··· 139 139 struct snd_soc_pcm_runtime *rtd = substream->private_data; 140 140 struct snd_soc_card *card = rtd->card; 141 141 struct sc7180_snd_data *data = snd_soc_card_get_drvdata(card); 142 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 143 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 142 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 143 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 144 144 int pll_id, pll_source, pll_in, pll_out, clk_id, ret; 145 145 146 146 if (!strcmp(codec_dai->name, "rt5682-aif1")) { ··· 225 225 struct snd_soc_pcm_runtime *rtd = substream->private_data; 226 226 struct snd_soc_card *card = rtd->card; 227 227 struct sc7180_snd_data *data = snd_soc_card_get_drvdata(card); 228 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 228 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 229 229 230 230 switch (cpu_dai->id) { 231 231 case MI2S_PRIMARY: ··· 249 249 250 250 static int sc7180_adau7002_init(struct snd_soc_pcm_runtime *rtd) 251 251 { 252 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 252 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 253 253 254 254 switch (cpu_dai->id) { 255 255 case MI2S_PRIMARY: ··· 269 269 static int sc7180_adau7002_snd_startup(struct snd_pcm_substream *substream) 270 270 { 271 271 struct snd_soc_pcm_runtime *rtd = substream->private_data; 272 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 273 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 272 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 273 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 274 274 struct snd_pcm_runtime *runtime = substream->runtime; 275 275 276 276 switch (cpu_dai->id) {
+13 -13
sound/soc/qcom/sc7280.c
··· 58 58 { 59 59 struct snd_soc_card *card = rtd->card; 60 60 struct sc7280_snd_data *pdata = snd_soc_card_get_drvdata(card); 61 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 62 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 61 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 62 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 63 63 struct snd_soc_component *component = codec_dai->component; 64 64 struct snd_jack *jack; 65 65 int rval, i; ··· 115 115 { 116 116 struct snd_soc_card *card = rtd->card; 117 117 struct sc7280_snd_data *pdata = snd_soc_card_get_drvdata(card); 118 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 118 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 119 119 struct snd_soc_component *component = codec_dai->component; 120 120 struct snd_jack *jack; 121 121 int rval; ··· 137 137 138 138 static int sc7280_rt5682_init(struct snd_soc_pcm_runtime *rtd) 139 139 { 140 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 141 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 140 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 141 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 142 142 struct snd_soc_card *card = rtd->card; 143 143 struct sc7280_snd_data *data = snd_soc_card_get_drvdata(card); 144 144 int ret; ··· 176 176 177 177 static int sc7280_init(struct snd_soc_pcm_runtime *rtd) 178 178 { 179 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 179 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 180 180 181 181 switch (cpu_dai->id) { 182 182 case MI2S_PRIMARY: ··· 205 205 struct snd_pcm_runtime *runtime = substream->runtime; 206 206 struct snd_soc_pcm_runtime *rtd = substream->private_data; 207 207 struct snd_soc_dai *codec_dai; 208 - const struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 208 + const struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 209 209 struct sc7280_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); 210 210 struct sdw_stream_runtime *sruntime; 211 211 int i; ··· 236 236 static int sc7280_snd_swr_prepare(struct snd_pcm_substream *substream) 237 237 { 238 238 struct snd_soc_pcm_runtime *rtd = substream->private_data; 239 - const struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 239 + const struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 240 240 struct sc7280_snd_data *data = snd_soc_card_get_drvdata(rtd->card); 241 241 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 242 242 int ret; ··· 267 267 static int sc7280_snd_prepare(struct snd_pcm_substream *substream) 268 268 { 269 269 struct snd_soc_pcm_runtime *rtd = substream->private_data; 270 - const struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 270 + const struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 271 271 272 272 switch (cpu_dai->id) { 273 273 case LPASS_CDC_DMA_RX0: ··· 287 287 { 288 288 struct snd_soc_pcm_runtime *rtd = substream->private_data; 289 289 struct sc7280_snd_data *data = snd_soc_card_get_drvdata(rtd->card); 290 - const struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 290 + const struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 291 291 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 292 292 293 293 switch (cpu_dai->id) { ··· 313 313 struct snd_soc_pcm_runtime *rtd = substream->private_data; 314 314 struct snd_soc_card *card = rtd->card; 315 315 struct sc7280_snd_data *data = snd_soc_card_get_drvdata(card); 316 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 316 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 317 317 318 318 switch (cpu_dai->id) { 319 319 case MI2S_PRIMARY: ··· 338 338 unsigned int fmt = SND_SOC_DAIFMT_CBS_CFS; 339 339 unsigned int codec_dai_fmt = SND_SOC_DAIFMT_CBS_CFS; 340 340 struct snd_soc_pcm_runtime *rtd = substream->private_data; 341 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 342 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 341 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 342 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 343 343 int ret = 0; 344 344 345 345 switch (cpu_dai->id) {
+4 -4
sound/soc/qcom/sc8280xp.c
··· 34 34 static int sc8280xp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, 35 35 struct snd_pcm_hw_params *params) 36 36 { 37 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 37 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 38 38 struct snd_interval *rate = hw_param_interval(params, 39 39 SNDRV_PCM_HW_PARAM_RATE); 40 40 struct snd_interval *channels = hw_param_interval(params, ··· 62 62 struct snd_pcm_hw_params *params) 63 63 { 64 64 struct snd_soc_pcm_runtime *rtd = substream->private_data; 65 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 65 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 66 66 struct sc8280xp_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); 67 67 68 68 return qcom_snd_sdw_hw_params(substream, params, &pdata->sruntime[cpu_dai->id]); ··· 71 71 static int sc8280xp_snd_prepare(struct snd_pcm_substream *substream) 72 72 { 73 73 struct snd_soc_pcm_runtime *rtd = substream->private_data; 74 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 74 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 75 75 struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); 76 76 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 77 77 ··· 83 83 { 84 84 struct snd_soc_pcm_runtime *rtd = substream->private_data; 85 85 struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); 86 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 86 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 87 87 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 88 88 89 89 return qcom_snd_sdw_hw_free(substream, sruntime,
+18 -18
sound/soc/qcom/sdm845.c
··· 58 58 static int sdm845_slim_snd_hw_params(struct snd_pcm_substream *substream, 59 59 struct snd_pcm_hw_params *params) 60 60 { 61 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 62 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 61 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 62 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 63 63 struct snd_soc_dai *codec_dai; 64 64 struct sdm845_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); 65 65 u32 rx_ch[SLIM_MAX_RX_PORTS], tx_ch[SLIM_MAX_TX_PORTS]; ··· 98 98 static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream, 99 99 struct snd_pcm_hw_params *params) 100 100 { 101 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 102 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 101 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 102 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 103 103 struct snd_soc_dai *codec_dai; 104 104 int ret = 0, j; 105 105 int channels, slot_width; ··· 183 183 static int sdm845_snd_hw_params(struct snd_pcm_substream *substream, 184 184 struct snd_pcm_hw_params *params) 185 185 { 186 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 187 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 188 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 186 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 187 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 188 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 189 189 int ret = 0; 190 190 191 191 switch (cpu_dai->id) { ··· 233 233 { 234 234 struct snd_soc_component *component; 235 235 struct snd_soc_card *card = rtd->card; 236 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 237 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 236 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 237 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 238 238 struct sdm845_snd_data *pdata = snd_soc_card_get_drvdata(card); 239 239 struct snd_soc_dai_link *link = rtd->dai_link; 240 240 struct snd_jack *jack; ··· 331 331 { 332 332 unsigned int fmt = SND_SOC_DAIFMT_BP_FP; 333 333 unsigned int codec_dai_fmt = SND_SOC_DAIFMT_BC_FC; 334 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 334 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 335 335 struct snd_soc_card *card = rtd->card; 336 336 struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card); 337 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 338 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 337 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 338 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 339 339 int j; 340 340 int ret; 341 341 ··· 421 421 422 422 static void sdm845_snd_shutdown(struct snd_pcm_substream *substream) 423 423 { 424 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 424 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 425 425 struct snd_soc_card *card = rtd->card; 426 426 struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card); 427 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 427 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 428 428 429 429 switch (cpu_dai->id) { 430 430 case PRIMARY_MI2S_RX: ··· 467 467 468 468 static int sdm845_snd_prepare(struct snd_pcm_substream *substream) 469 469 { 470 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 470 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 471 471 struct sdm845_snd_data *data = snd_soc_card_get_drvdata(rtd->card); 472 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 472 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 473 473 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 474 474 int ret; 475 475 ··· 506 506 507 507 static int sdm845_snd_hw_free(struct snd_pcm_substream *substream) 508 508 { 509 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 509 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 510 510 struct sdm845_snd_data *data = snd_soc_card_get_drvdata(rtd->card); 511 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 511 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 512 512 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 513 513 514 514 if (sruntime && data->stream_prepared[cpu_dai->id]) {
+3 -3
sound/soc/qcom/sdw.c
··· 12 12 bool *stream_prepared) 13 13 { 14 14 struct snd_soc_pcm_runtime *rtd = substream->private_data; 15 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 15 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 16 16 int ret; 17 17 18 18 if (!sruntime) ··· 64 64 { 65 65 struct snd_soc_pcm_runtime *rtd = substream->private_data; 66 66 struct snd_soc_dai *codec_dai; 67 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 67 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 68 68 struct sdw_stream_runtime *sruntime; 69 69 int i; 70 70 ··· 93 93 struct sdw_stream_runtime *sruntime, bool *stream_prepared) 94 94 { 95 95 struct snd_soc_pcm_runtime *rtd = substream->private_data; 96 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 96 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 97 97 98 98 switch (cpu_dai->id) { 99 99 case WSA_CODEC_DMA_RX_0:
+5 -5
sound/soc/qcom/sm8250.c
··· 51 51 unsigned int fmt = SND_SOC_DAIFMT_BP_FP; 52 52 unsigned int codec_dai_fmt = SND_SOC_DAIFMT_BC_FC; 53 53 struct snd_soc_pcm_runtime *rtd = substream->private_data; 54 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 55 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 54 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 55 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 56 56 57 57 switch (cpu_dai->id) { 58 58 case TERTIARY_MI2S_RX: ··· 73 73 struct snd_pcm_hw_params *params) 74 74 { 75 75 struct snd_soc_pcm_runtime *rtd = substream->private_data; 76 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 76 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 77 77 struct sm8250_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); 78 78 79 79 return qcom_snd_sdw_hw_params(substream, params, &pdata->sruntime[cpu_dai->id]); ··· 82 82 static int sm8250_snd_prepare(struct snd_pcm_substream *substream) 83 83 { 84 84 struct snd_soc_pcm_runtime *rtd = substream->private_data; 85 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 85 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 86 86 struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card); 87 87 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 88 88 ··· 94 94 { 95 95 struct snd_soc_pcm_runtime *rtd = substream->private_data; 96 96 struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card); 97 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 97 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 98 98 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 99 99 100 100 return qcom_snd_sdw_hw_free(substream, sruntime,
+2 -2
sound/soc/qcom/storm.c
··· 19 19 static int storm_ops_hw_params(struct snd_pcm_substream *substream, 20 20 struct snd_pcm_hw_params *params) 21 21 { 22 - struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); 22 + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); 23 23 struct snd_soc_card *card = soc_runtime->card; 24 24 snd_pcm_format_t format = params_format(params); 25 25 unsigned int rate = params_rate(params); ··· 39 39 */ 40 40 sysclk_freq = rate * bitwidth * 2 * STORM_SYSCLK_MULT; 41 41 42 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(soc_runtime, 0), 0, sysclk_freq, 0); 42 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(soc_runtime, 0), 0, sysclk_freq, 0); 43 43 if (ret) { 44 44 dev_err(card->dev, "error setting sysclk to %u: %d\n", 45 45 sysclk_freq, ret);
+3 -3
sound/soc/rockchip/rk3288_hdmi_analog.c
··· 66 66 struct snd_pcm_hw_params *params) 67 67 { 68 68 int ret = 0; 69 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 70 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 71 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 69 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 70 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 71 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 72 72 int mclk; 73 73 74 74 switch (params_rate(params)) {
+13 -13
sound/soc/rockchip/rk3399_gru_sound.c
··· 68 68 static int rockchip_sound_max98357a_hw_params(struct snd_pcm_substream *substream, 69 69 struct snd_pcm_hw_params *params) 70 70 { 71 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 71 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 72 72 unsigned int mclk; 73 73 int ret; 74 74 75 75 mclk = params_rate(params) * SOUND_FS; 76 76 77 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 0, mclk, 0); 77 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 0, mclk, 0); 78 78 if (ret) { 79 79 dev_err(rtd->card->dev, "%s() error setting sysclk to %u: %d\n", 80 80 __func__, mclk, ret); ··· 87 87 static int rockchip_sound_rt5514_hw_params(struct snd_pcm_substream *substream, 88 88 struct snd_pcm_hw_params *params) 89 89 { 90 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 91 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 92 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 90 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 91 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 92 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 93 93 unsigned int mclk; 94 94 int ret; 95 95 ··· 119 119 static int rockchip_sound_da7219_hw_params(struct snd_pcm_substream *substream, 120 120 struct snd_pcm_hw_params *params) 121 121 { 122 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 123 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 124 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 122 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 123 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 124 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 125 125 int mclk, ret; 126 126 127 127 /* in bypass mode, the mclk has to be one of the frequencies below */ ··· 172 172 173 173 static int rockchip_sound_cdndp_init(struct snd_soc_pcm_runtime *rtd) 174 174 { 175 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 175 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 176 176 struct snd_soc_card *card = rtd->card; 177 177 int ret; 178 178 ··· 189 189 190 190 static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd) 191 191 { 192 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 193 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 192 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 193 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 194 194 int ret; 195 195 196 196 /* We need default MCLK and PLL settings for the accessory detection */ ··· 238 238 static int rockchip_sound_dmic_hw_params(struct snd_pcm_substream *substream, 239 239 struct snd_pcm_hw_params *params) 240 240 { 241 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 241 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 242 242 unsigned int mclk; 243 243 int ret; 244 244 245 245 mclk = params_rate(params) * SOUND_FS; 246 246 247 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 0, mclk, 0); 247 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 0, mclk, 0); 248 248 if (ret) { 249 249 dev_err(rtd->card->dev, "%s() error setting sysclk to %u: %d\n", 250 250 __func__, mclk, ret);
+1 -1
sound/soc/rockchip/rockchip_i2s.c
··· 352 352 struct snd_soc_dai *dai) 353 353 { 354 354 struct rk_i2s_dev *i2s = to_info(dai); 355 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 355 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 356 356 unsigned int val = 0; 357 357 unsigned int mclk_rate, bclk_rate, div_bclk, div_lrck; 358 358
+4 -4
sound/soc/rockchip/rockchip_max98090.c
··· 144 144 struct snd_pcm_hw_params *params) 145 145 { 146 146 int ret = 0; 147 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 148 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 149 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 147 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 148 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 149 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 150 150 int mclk; 151 151 152 152 switch (params_rate(params)) { ··· 226 226 static int rk_hdmi_init(struct snd_soc_pcm_runtime *runtime) 227 227 { 228 228 struct snd_soc_card *card = runtime->card; 229 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 229 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 230 230 int ret; 231 231 232 232 /* enable jack detection */
+4 -4
sound/soc/rockchip/rockchip_rt5645.c
··· 65 65 struct snd_pcm_hw_params *params) 66 66 { 67 67 int ret = 0; 68 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 69 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 70 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 68 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 69 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 70 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 71 71 int mclk; 72 72 73 73 switch (params_rate(params)) { ··· 125 125 return ret; 126 126 } 127 127 128 - return rt5645_set_jack_detect(asoc_rtd_to_codec(runtime, 0)->component, 128 + return rt5645_set_jack_detect(snd_soc_rtd_to_codec(runtime, 0)->component, 129 129 &headset_jack, 130 130 &headset_jack, 131 131 &headset_jack);
+6 -6
sound/soc/samsung/aries_wm8994.c
··· 166 166 int ret = 0; 167 167 168 168 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 169 - component = asoc_rtd_to_codec(rtd, 0)->component; 169 + component = snd_soc_rtd_to_codec(rtd, 0)->component; 170 170 171 171 /** 172 172 * We have an odd setup - the SPKMODE pin is pulled up so ··· 259 259 static int aries_hw_params(struct snd_pcm_substream *substream, 260 260 struct snd_pcm_hw_params *params) 261 261 { 262 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 263 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 262 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 263 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 264 264 unsigned int pll_out; 265 265 int ret; 266 266 ··· 287 287 288 288 static int aries_hw_free(struct snd_pcm_substream *substream) 289 289 { 290 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 291 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 290 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 291 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 292 292 int ret; 293 293 294 294 /* Switch sysclk to MCLK1 */ ··· 316 316 317 317 static int aries_baseband_init(struct snd_soc_pcm_runtime *rtd) 318 318 { 319 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 319 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 320 320 unsigned int pll_out; 321 321 int ret; 322 322
+5 -5
sound/soc/samsung/arndale.c
··· 20 20 static int arndale_rt5631_hw_params(struct snd_pcm_substream *substream, 21 21 struct snd_pcm_hw_params *params) 22 22 { 23 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 24 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 25 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 23 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 24 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 25 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 26 26 int rfs, ret; 27 27 unsigned long rclk; 28 28 ··· 55 55 static int arndale_wm1811_hw_params(struct snd_pcm_substream *substream, 56 56 struct snd_pcm_hw_params *params) 57 57 { 58 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 59 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 58 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 59 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 60 60 unsigned int rfs, rclk; 61 61 62 62 /* Ensure AIF1CLK is >= 3 MHz for optimal performance */
+8 -8
sound/soc/samsung/bells.c
··· 60 60 int ret; 61 61 62 62 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[DAI_DSP_CODEC]); 63 - codec_dai = asoc_rtd_to_codec(rtd, 0); 63 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 64 64 component = codec_dai->component; 65 65 66 66 if (dapm->dev != codec_dai->dev) ··· 106 106 int ret; 107 107 108 108 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[DAI_DSP_CODEC]); 109 - codec_dai = asoc_rtd_to_codec(rtd, 0); 109 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 110 110 component = codec_dai->component; 111 111 112 112 if (dapm->dev != codec_dai->dev) ··· 152 152 int ret; 153 153 154 154 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[DAI_AP_DSP]); 155 - wm0010 = asoc_rtd_to_codec(rtd, 0)->component; 155 + wm0010 = snd_soc_rtd_to_codec(rtd, 0)->component; 156 156 157 157 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[DAI_DSP_CODEC]); 158 - component = asoc_rtd_to_codec(rtd, 0)->component; 159 - aif1_dai = asoc_rtd_to_codec(rtd, 0); 158 + component = snd_soc_rtd_to_codec(rtd, 0)->component; 159 + aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 160 160 161 161 ret = snd_soc_component_set_sysclk(component, ARIZONA_CLK_SYSCLK, 162 162 ARIZONA_CLK_SRC_FLL1, ··· 195 195 } 196 196 197 197 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[DAI_CODEC_CP]); 198 - aif2_dai = asoc_rtd_to_cpu(rtd, 0); 198 + aif2_dai = snd_soc_rtd_to_cpu(rtd, 0); 199 199 200 200 ret = snd_soc_dai_set_sysclk(aif2_dai, ARIZONA_CLK_ASYNCCLK, 0, 0); 201 201 if (ret != 0) { ··· 207 207 return 0; 208 208 209 209 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[DAI_CODEC_SUB]); 210 - aif3_dai = asoc_rtd_to_cpu(rtd, 0); 211 - wm9081_dai = asoc_rtd_to_codec(rtd, 0); 210 + aif3_dai = snd_soc_rtd_to_cpu(rtd, 0); 211 + wm9081_dai = snd_soc_rtd_to_codec(rtd, 0); 212 212 213 213 ret = snd_soc_dai_set_sysclk(aif3_dai, ARIZONA_CLK_SYSCLK, 0, 0); 214 214 if (ret != 0) {
+6 -6
sound/soc/samsung/i2s.c
··· 939 939 { 940 940 struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); 941 941 int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); 942 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 943 - struct i2s_dai *i2s = to_info(asoc_rtd_to_cpu(rtd, 0)); 942 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 943 + struct i2s_dai *i2s = to_info(snd_soc_rtd_to_cpu(rtd, 0)); 944 944 unsigned long flags; 945 945 946 946 switch (cmd) { ··· 1580 1580 static void fsd_i2s_fixup_early(struct snd_pcm_substream *substream, 1581 1581 struct snd_soc_dai *dai) 1582 1582 { 1583 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1584 - struct i2s_dai *i2s = to_info(asoc_rtd_to_cpu(rtd, 0)); 1583 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1584 + struct i2s_dai *i2s = to_info(snd_soc_rtd_to_cpu(rtd, 0)); 1585 1585 struct i2s_dai *other = get_other_dai(i2s); 1586 1586 1587 1587 if (!is_opened(other)) { ··· 1593 1593 static void fsd_i2s_fixup_late(struct snd_pcm_substream *substream, 1594 1594 struct snd_soc_dai *dai) 1595 1595 { 1596 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1596 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1597 1597 struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); 1598 - struct i2s_dai *i2s = to_info(asoc_rtd_to_cpu(rtd, 0)); 1598 + struct i2s_dai *i2s = to_info(snd_soc_rtd_to_cpu(rtd, 0)); 1599 1599 struct i2s_dai *other = get_other_dai(i2s); 1600 1600 1601 1601 if (!is_opened(other))
+8 -8
sound/soc/samsung/littlemill.c
··· 23 23 int ret; 24 24 25 25 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 26 - aif1_dai = asoc_rtd_to_codec(rtd, 0); 26 + aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 27 27 28 28 if (dapm->dev != aif1_dai->dev) 29 29 return 0; ··· 70 70 int ret; 71 71 72 72 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 73 - aif1_dai = asoc_rtd_to_codec(rtd, 0); 73 + aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 74 74 75 75 if (dapm->dev != aif1_dai->dev) 76 76 return 0; ··· 104 104 static int littlemill_hw_params(struct snd_pcm_substream *substream, 105 105 struct snd_pcm_hw_params *params) 106 106 { 107 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 108 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 107 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 108 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 109 109 int ret; 110 110 111 111 sample_rate = params_rate(params); ··· 182 182 int ret; 183 183 184 184 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[1]); 185 - aif2_dai = asoc_rtd_to_cpu(rtd, 0); 185 + aif2_dai = snd_soc_rtd_to_cpu(rtd, 0); 186 186 187 187 switch (event) { 188 188 case SND_SOC_DAPM_PRE_PMU: ··· 278 278 int ret; 279 279 280 280 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 281 - component = asoc_rtd_to_codec(rtd, 0)->component; 282 - aif1_dai = asoc_rtd_to_codec(rtd, 0); 281 + component = snd_soc_rtd_to_codec(rtd, 0)->component; 282 + aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 283 283 284 284 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[1]); 285 - aif2_dai = asoc_rtd_to_cpu(rtd, 0); 285 + aif2_dai = snd_soc_rtd_to_cpu(rtd, 0); 286 286 287 287 ret = snd_soc_dai_set_sysclk(aif1_dai, WM8994_SYSCLK_MCLK2, 288 288 32768, SND_SOC_CLOCK_IN);
+2 -2
sound/soc/samsung/lowland.c
··· 36 36 37 37 static int lowland_wm5100_init(struct snd_soc_pcm_runtime *rtd) 38 38 { 39 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 39 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 40 40 int ret; 41 41 42 42 ret = snd_soc_component_set_sysclk(component, WM5100_CLK_SYSCLK, ··· 70 70 71 71 static int lowland_wm9081_init(struct snd_soc_pcm_runtime *rtd) 72 72 { 73 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 73 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 74 74 75 75 snd_soc_dapm_nc_pin(&rtd->card->dapm, "LINEOUT"); 76 76
+5 -5
sound/soc/samsung/midas_wm1811.c
··· 53 53 { 54 54 struct snd_soc_card *card = rtd->card; 55 55 struct midas_priv *priv = snd_soc_card_get_drvdata(card); 56 - struct snd_soc_dai *aif1_dai = asoc_rtd_to_codec(rtd, 0); 57 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 56 + struct snd_soc_dai *aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 57 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 58 58 int ret; 59 59 60 60 if (!rate) ··· 105 105 { 106 106 struct snd_soc_card *card = rtd->card; 107 107 struct midas_priv *priv = snd_soc_card_get_drvdata(card); 108 - struct snd_soc_dai *aif1_dai = asoc_rtd_to_codec(rtd, 0); 108 + struct snd_soc_dai *aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 109 109 int ret; 110 110 111 111 ret = snd_soc_dai_set_sysclk(aif1_dai, WM8994_SYSCLK_MCLK2, ··· 284 284 { 285 285 struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, 286 286 &card->dai_link[0]); 287 - struct snd_soc_dai *aif1_dai = asoc_rtd_to_codec(rtd, 0); 287 + struct snd_soc_dai *aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 288 288 289 289 if (dapm->dev != aif1_dai->dev) 290 290 return 0; ··· 305 305 { 306 306 struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, 307 307 &card->dai_link[0]); 308 - struct snd_soc_dai *aif1_dai = asoc_rtd_to_codec(rtd, 0); 308 + struct snd_soc_dai *aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 309 309 struct midas_priv *priv = snd_soc_card_get_drvdata(card); 310 310 int ret; 311 311
+4 -4
sound/soc/samsung/odroid.c
··· 35 35 static int odroid_card_fe_hw_params(struct snd_pcm_substream *substream, 36 36 struct snd_pcm_hw_params *params) 37 37 { 38 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 38 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 39 39 struct odroid_priv *priv = snd_soc_card_get_drvdata(rtd->card); 40 40 unsigned long flags; 41 41 int ret = 0; ··· 56 56 static int odroid_card_be_hw_params(struct snd_pcm_substream *substream, 57 57 struct snd_pcm_hw_params *params) 58 58 { 59 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 59 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 60 60 struct odroid_priv *priv = snd_soc_card_get_drvdata(rtd->card); 61 61 unsigned int pll_freq, rclk_freq, rfs; 62 62 unsigned long flags; ··· 98 98 return ret; 99 99 100 100 if (rtd->dai_link->num_codecs > 1) { 101 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 1); 101 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 1); 102 102 103 103 ret = snd_soc_dai_set_sysclk(codec_dai, 0, rclk_freq, 104 104 SND_SOC_CLOCK_IN); ··· 115 115 116 116 static int odroid_card_be_trigger(struct snd_pcm_substream *substream, int cmd) 117 117 { 118 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 118 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 119 119 struct odroid_priv *priv = snd_soc_card_get_drvdata(rtd->card); 120 120 unsigned long flags; 121 121
+4 -4
sound/soc/samsung/pcm.c
··· 216 216 static int s3c_pcm_trigger(struct snd_pcm_substream *substream, int cmd, 217 217 struct snd_soc_dai *dai) 218 218 { 219 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 220 - struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 219 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 220 + struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 221 221 unsigned long flags; 222 222 223 223 dev_dbg(pcm->dev, "Entered %s\n", __func__); ··· 260 260 struct snd_pcm_hw_params *params, 261 261 struct snd_soc_dai *socdai) 262 262 { 263 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 264 - struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 263 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 264 + struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 265 265 void __iomem *regs = pcm->regs; 266 266 struct clk *clk; 267 267 int sclk_div, sync_div;
+2 -2
sound/soc/samsung/smdk_spdif.c
··· 100 100 static int smdk_hw_params(struct snd_pcm_substream *substream, 101 101 struct snd_pcm_hw_params *params) 102 102 { 103 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 104 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 103 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 104 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 105 105 unsigned long pll_out, rclk_rate; 106 106 int ret, ratio; 107 107
+2 -2
sound/soc/samsung/smdk_wm8994.c
··· 44 44 static int smdk_hw_params(struct snd_pcm_substream *substream, 45 45 struct snd_pcm_hw_params *params) 46 46 { 47 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 48 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 47 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 48 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 49 49 unsigned int pll_out; 50 50 int ret; 51 51
+3 -3
sound/soc/samsung/smdk_wm8994pcm.c
··· 43 43 static int smdk_wm8994_pcm_hw_params(struct snd_pcm_substream *substream, 44 44 struct snd_pcm_hw_params *params) 45 45 { 46 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 47 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 48 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 46 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 47 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 48 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 49 49 unsigned long mclk_freq; 50 50 int rfs, ret; 51 51
+2 -2
sound/soc/samsung/snow.c
··· 30 30 static const unsigned int pll_rate[] = { 31 31 73728000U, 67737602U, 49152000U, 45158401U, 32768001U 32 32 }; 33 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 33 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 34 34 struct snow_priv *priv = snd_soc_card_get_drvdata(rtd->card); 35 35 int bfs, psr, rfs, bitwidth; 36 36 unsigned long int rclk; ··· 109 109 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 110 110 111 111 /* In the multi-codec case codec_dais 0 is MAX98095 and 1 is HDMI. */ 112 - codec_dai = asoc_rtd_to_codec(rtd, 0); 112 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 113 113 114 114 /* Set the MCLK rate for the codec */ 115 115 return snd_soc_dai_set_sysclk(codec_dai, 0,
+7 -7
sound/soc/samsung/spdif.c
··· 141 141 static int spdif_trigger(struct snd_pcm_substream *substream, int cmd, 142 142 struct snd_soc_dai *dai) 143 143 { 144 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 145 - struct samsung_spdif_info *spdif = to_info(asoc_rtd_to_cpu(rtd, 0)); 144 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 145 + struct samsung_spdif_info *spdif = to_info(snd_soc_rtd_to_cpu(rtd, 0)); 146 146 unsigned long flags; 147 147 148 148 dev_dbg(spdif->dev, "Entered %s\n", __func__); ··· 177 177 struct snd_pcm_hw_params *params, 178 178 struct snd_soc_dai *socdai) 179 179 { 180 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 181 - struct samsung_spdif_info *spdif = to_info(asoc_rtd_to_cpu(rtd, 0)); 180 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 181 + struct samsung_spdif_info *spdif = to_info(snd_soc_rtd_to_cpu(rtd, 0)); 182 182 void __iomem *regs = spdif->regs; 183 183 struct snd_dmaengine_dai_dma_data *dma_data; 184 184 u32 con, clkcon, cstas; ··· 194 194 return -EINVAL; 195 195 } 196 196 197 - snd_soc_dai_set_dma_data(asoc_rtd_to_cpu(rtd, 0), substream, dma_data); 197 + snd_soc_dai_set_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream, dma_data); 198 198 199 199 spin_lock_irqsave(&spdif->lock, flags); 200 200 ··· 279 279 static void spdif_shutdown(struct snd_pcm_substream *substream, 280 280 struct snd_soc_dai *dai) 281 281 { 282 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 283 - struct samsung_spdif_info *spdif = to_info(asoc_rtd_to_cpu(rtd, 0)); 282 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 283 + struct samsung_spdif_info *spdif = to_info(snd_soc_rtd_to_cpu(rtd, 0)); 284 284 void __iomem *regs = spdif->regs; 285 285 u32 con, clkcon; 286 286
+4 -4
sound/soc/samsung/speyside.c
··· 25 25 int ret; 26 26 27 27 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[1]); 28 - codec_dai = asoc_rtd_to_codec(rtd, 0); 28 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 29 29 30 30 if (dapm->dev != codec_dai->dev) 31 31 return 0; ··· 61 61 int ret; 62 62 63 63 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[1]); 64 - codec_dai = asoc_rtd_to_codec(rtd, 0); 64 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 65 65 66 66 if (dapm->dev != codec_dai->dev) 67 67 return 0; ··· 131 131 132 132 static int speyside_wm0010_init(struct snd_soc_pcm_runtime *rtd) 133 133 { 134 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 134 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 135 135 int ret; 136 136 137 137 ret = snd_soc_dai_set_sysclk(dai, 0, MCLK_AUDIO_RATE, 0); ··· 143 143 144 144 static int speyside_wm8996_init(struct snd_soc_pcm_runtime *rtd) 145 145 { 146 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 146 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 147 147 struct snd_soc_component *component = dai->component; 148 148 int ret; 149 149
+12 -12
sound/soc/samsung/tm2_wm5110.c
··· 92 92 static int tm2_aif1_hw_params(struct snd_pcm_substream *substream, 93 93 struct snd_pcm_hw_params *params) 94 94 { 95 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 96 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 95 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 96 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 97 97 struct tm2_machine_priv *priv = snd_soc_card_get_drvdata(rtd->card); 98 98 99 99 switch (params_rate(params)) { ··· 133 133 static int tm2_aif2_hw_params(struct snd_pcm_substream *substream, 134 134 struct snd_pcm_hw_params *params) 135 135 { 136 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 137 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 136 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 137 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 138 138 unsigned int asyncclk_rate; 139 139 int ret; 140 140 ··· 187 187 188 188 static int tm2_aif2_hw_free(struct snd_pcm_substream *substream) 189 189 { 190 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 191 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 190 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 191 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 192 192 int ret; 193 193 194 194 /* disable FLL2 */ ··· 208 208 static int tm2_hdmi_hw_params(struct snd_pcm_substream *substream, 209 209 struct snd_pcm_hw_params *params) 210 210 { 211 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 212 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 211 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 212 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 213 213 unsigned int bfs; 214 214 int bitwidth, ret; 215 215 ··· 284 284 285 285 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 286 286 287 - if (dapm->dev != asoc_rtd_to_codec(rtd, 0)->dev) 287 + if (dapm->dev != snd_soc_rtd_to_codec(rtd, 0)->dev) 288 288 return 0; 289 289 290 290 switch (level) { ··· 315 315 int ret; 316 316 317 317 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[TM2_DAI_AIF1]); 318 - aif1_dai = asoc_rtd_to_codec(rtd, 0); 319 - priv->component = asoc_rtd_to_codec(rtd, 0)->component; 318 + aif1_dai = snd_soc_rtd_to_codec(rtd, 0); 319 + priv->component = snd_soc_rtd_to_codec(rtd, 0)->component; 320 320 321 321 ret = snd_soc_dai_set_sysclk(aif1_dai, ARIZONA_CLK_SYSCLK, 0, 0); 322 322 if (ret < 0) { ··· 325 325 } 326 326 327 327 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[TM2_DAI_AIF2]); 328 - aif2_dai = asoc_rtd_to_codec(rtd, 0); 328 + aif2_dai = snd_soc_rtd_to_codec(rtd, 0); 329 329 330 330 ret = snd_soc_dai_set_sysclk(aif2_dai, ARIZONA_CLK_ASYNCCLK, 0, 0); 331 331 if (ret < 0) {
+4 -4
sound/soc/samsung/tobermory.c
··· 23 23 int ret; 24 24 25 25 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 26 - codec_dai = asoc_rtd_to_codec(rtd, 0); 26 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 27 27 28 28 if (dapm->dev != codec_dai->dev) 29 29 return 0; ··· 66 66 int ret; 67 67 68 68 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 69 - codec_dai = asoc_rtd_to_codec(rtd, 0); 69 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 70 70 71 71 if (dapm->dev != codec_dai->dev) 72 72 return 0; ··· 181 181 int ret; 182 182 183 183 rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); 184 - component = asoc_rtd_to_codec(rtd, 0)->component; 185 - codec_dai = asoc_rtd_to_codec(rtd, 0); 184 + component = snd_soc_rtd_to_codec(rtd, 0)->component; 185 + codec_dai = snd_soc_rtd_to_codec(rtd, 0); 186 186 187 187 ret = snd_soc_dai_set_sysclk(codec_dai, WM8962_SYSCLK_MCLK, 188 188 32768, SND_SOC_CLOCK_IN);
+14 -14
sound/soc/sh/dma-sh7760.c
··· 118 118 static int camelot_pcm_open(struct snd_soc_component *component, 119 119 struct snd_pcm_substream *substream) 120 120 { 121 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 122 - struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; 121 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 122 + struct camelot_pcm *cam = &cam_pcm_data[snd_soc_rtd_to_cpu(rtd, 0)->id]; 123 123 int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; 124 124 int ret, dmairq; 125 125 ··· 132 132 ret = dmabrg_request_irq(dmairq, camelot_rxdma, cam); 133 133 if (unlikely(ret)) { 134 134 pr_debug("audio unit %d irqs already taken!\n", 135 - asoc_rtd_to_cpu(rtd, 0)->id); 135 + snd_soc_rtd_to_cpu(rtd, 0)->id); 136 136 return -EBUSY; 137 137 } 138 138 (void)dmabrg_request_irq(dmairq + 1,camelot_rxdma, cam); ··· 141 141 ret = dmabrg_request_irq(dmairq, camelot_txdma, cam); 142 142 if (unlikely(ret)) { 143 143 pr_debug("audio unit %d irqs already taken!\n", 144 - asoc_rtd_to_cpu(rtd, 0)->id); 144 + snd_soc_rtd_to_cpu(rtd, 0)->id); 145 145 return -EBUSY; 146 146 } 147 147 (void)dmabrg_request_irq(dmairq + 1, camelot_txdma, cam); ··· 152 152 static int camelot_pcm_close(struct snd_soc_component *component, 153 153 struct snd_pcm_substream *substream) 154 154 { 155 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 156 - struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; 155 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 156 + struct camelot_pcm *cam = &cam_pcm_data[snd_soc_rtd_to_cpu(rtd, 0)->id]; 157 157 int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; 158 158 int dmairq; 159 159 ··· 174 174 struct snd_pcm_substream *substream, 175 175 struct snd_pcm_hw_params *hw_params) 176 176 { 177 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 178 - struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; 177 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 178 + struct camelot_pcm *cam = &cam_pcm_data[snd_soc_rtd_to_cpu(rtd, 0)->id]; 179 179 int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; 180 180 181 181 if (recv) { ··· 192 192 struct snd_pcm_substream *substream) 193 193 { 194 194 struct snd_pcm_runtime *runtime = substream->runtime; 195 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 196 - struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; 195 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 196 + struct camelot_pcm *cam = &cam_pcm_data[snd_soc_rtd_to_cpu(rtd, 0)->id]; 197 197 198 198 pr_debug("PCM data: addr %pad len %zu\n", &runtime->dma_addr, 199 199 runtime->dma_bytes); ··· 240 240 static int camelot_trigger(struct snd_soc_component *component, 241 241 struct snd_pcm_substream *substream, int cmd) 242 242 { 243 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 244 - struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; 243 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 244 + struct camelot_pcm *cam = &cam_pcm_data[snd_soc_rtd_to_cpu(rtd, 0)->id]; 245 245 int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; 246 246 247 247 switch (cmd) { ··· 268 268 struct snd_pcm_substream *substream) 269 269 { 270 270 struct snd_pcm_runtime *runtime = substream->runtime; 271 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 272 - struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; 271 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 272 + struct camelot_pcm *cam = &cam_pcm_data[snd_soc_rtd_to_cpu(rtd, 0)->id]; 273 273 int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; 274 274 unsigned long pos; 275 275
+2 -2
sound/soc/sh/fsi.c
··· 406 406 407 407 static struct snd_soc_dai *fsi_get_dai(struct snd_pcm_substream *substream) 408 408 { 409 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 409 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 410 410 411 - return asoc_rtd_to_cpu(rtd, 0); 411 + return snd_soc_rtd_to_cpu(rtd, 0); 412 412 } 413 413 414 414 static struct fsi_priv *fsi_get_priv_frm_dai(struct snd_soc_dai *dai)
+5 -5
sound/soc/sh/migor.c
··· 45 45 static int migor_hw_params(struct snd_pcm_substream *substream, 46 46 struct snd_pcm_hw_params *params) 47 47 { 48 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 49 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 48 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 49 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 50 50 int ret; 51 51 unsigned int rate = params_rate(params); 52 52 ··· 67 67 clk_set_rate(&siumckb_clk, codec_freq); 68 68 dev_dbg(codec_dai->dev, "%s: configure %luHz\n", __func__, codec_freq); 69 69 70 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), SIU_CLKB_EXT, 70 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), SIU_CLKB_EXT, 71 71 codec_freq / 2, SND_SOC_CLOCK_IN); 72 72 73 73 if (!ret) ··· 78 78 79 79 static int migor_hw_free(struct snd_pcm_substream *substream) 80 80 { 81 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 82 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 81 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 82 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 83 83 84 84 if (use_count) { 85 85 use_count--;
+3 -3
sound/soc/sh/rcar/core.c
··· 690 690 static 691 691 struct snd_soc_dai *rsnd_substream_to_dai(struct snd_pcm_substream *substream) 692 692 { 693 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 693 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 694 694 695 - return asoc_rtd_to_cpu(rtd, 0); 695 + return snd_soc_rtd_to_cpu(rtd, 0); 696 696 } 697 697 698 698 static ··· 1574 1574 struct snd_soc_dai *dai = rsnd_substream_to_dai(substream); 1575 1575 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); 1576 1576 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); 1577 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 1577 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 1578 1578 1579 1579 /* 1580 1580 * rsnd assumes that it might be used under DPCM if user want to use
+2 -2
sound/soc/sh/rz-ssi.c
··· 158 158 static inline struct snd_soc_dai * 159 159 rz_ssi_get_dai(struct snd_pcm_substream *substream) 160 160 { 161 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 161 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 162 162 163 - return asoc_rtd_to_cpu(rtd, 0); 163 + return snd_soc_rtd_to_cpu(rtd, 0); 164 164 } 165 165 166 166 static inline bool rz_ssi_stream_is_play(struct rz_ssi_priv *ssi,
+12 -12
sound/soc/soc-component.c
··· 962 962 963 963 int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream) 964 964 { 965 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 965 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 966 966 struct snd_soc_component *component; 967 967 int i; 968 968 ··· 992 992 snd_pcm_sframes_t *cpu_delay, 993 993 snd_pcm_sframes_t *codec_delay) 994 994 { 995 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 995 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 996 996 struct snd_soc_component *component; 997 997 snd_pcm_sframes_t delay; 998 998 int i; ··· 1019 1019 int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, 1020 1020 unsigned int cmd, void *arg) 1021 1021 { 1022 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1022 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1023 1023 struct snd_soc_component *component; 1024 1024 int i; 1025 1025 ··· 1036 1036 1037 1037 int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream) 1038 1038 { 1039 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1039 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1040 1040 struct snd_soc_component *component; 1041 1041 int i, ret; 1042 1042 ··· 1056 1056 int channel, unsigned long pos, 1057 1057 struct iov_iter *iter, unsigned long bytes) 1058 1058 { 1059 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1059 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1060 1060 struct snd_soc_component *component; 1061 1061 int i; 1062 1062 ··· 1073 1073 struct page *snd_soc_pcm_component_page(struct snd_pcm_substream *substream, 1074 1074 unsigned long offset) 1075 1075 { 1076 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1076 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1077 1077 struct snd_soc_component *component; 1078 1078 struct page *page; 1079 1079 int i; ··· 1094 1094 int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream, 1095 1095 struct vm_area_struct *vma) 1096 1096 { 1097 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1097 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1098 1098 struct snd_soc_component *component; 1099 1099 int i; 1100 1100 ··· 1141 1141 1142 1142 int snd_soc_pcm_component_prepare(struct snd_pcm_substream *substream) 1143 1143 { 1144 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1144 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1145 1145 struct snd_soc_component *component; 1146 1146 int i, ret; 1147 1147 ··· 1159 1159 int snd_soc_pcm_component_hw_params(struct snd_pcm_substream *substream, 1160 1160 struct snd_pcm_hw_params *params) 1161 1161 { 1162 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1162 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1163 1163 struct snd_soc_component *component; 1164 1164 int i, ret; 1165 1165 ··· 1180 1180 void snd_soc_pcm_component_hw_free(struct snd_pcm_substream *substream, 1181 1181 int rollback) 1182 1182 { 1183 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1183 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1184 1184 struct snd_soc_component *component; 1185 1185 int i, ret; 1186 1186 ··· 1214 1214 int snd_soc_pcm_component_trigger(struct snd_pcm_substream *substream, 1215 1215 int cmd, int rollback) 1216 1216 { 1217 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1217 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1218 1218 struct snd_soc_component *component; 1219 1219 int i, r, ret = 0; 1220 1220 ··· 1285 1285 1286 1286 int snd_soc_pcm_component_ack(struct snd_pcm_substream *substream) 1287 1287 { 1288 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1288 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1289 1289 struct snd_soc_component *component; 1290 1290 int i; 1291 1291
+18 -18
sound/soc/soc-compress.c
··· 57 57 static int soc_compr_clean(struct snd_compr_stream *cstream, int rollback) 58 58 { 59 59 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 60 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 61 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 60 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 61 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 62 62 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ 63 63 64 64 snd_soc_dpcm_mutex_lock(rtd); ··· 98 98 static int soc_compr_open(struct snd_compr_stream *cstream) 99 99 { 100 100 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 101 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 101 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 102 102 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ 103 103 int ret; 104 104 ··· 133 133 static int soc_compr_open_fe(struct snd_compr_stream *cstream) 134 134 { 135 135 struct snd_soc_pcm_runtime *fe = cstream->private_data; 136 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); 136 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(fe, 0); 137 137 struct snd_soc_dpcm *dpcm; 138 138 struct snd_soc_dapm_widget_list *list; 139 139 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ ··· 203 203 static int soc_compr_free_fe(struct snd_compr_stream *cstream) 204 204 { 205 205 struct snd_soc_pcm_runtime *fe = cstream->private_data; 206 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); 206 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(fe, 0); 207 207 struct snd_soc_dpcm *dpcm; 208 208 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ 209 209 ··· 244 244 static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd) 245 245 { 246 246 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 247 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 248 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 247 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 248 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 249 249 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ 250 250 int ret; 251 251 ··· 276 276 static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd) 277 277 { 278 278 struct snd_soc_pcm_runtime *fe = cstream->private_data; 279 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); 279 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(fe, 0); 280 280 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ 281 281 int ret; 282 282 ··· 323 323 struct snd_compr_params *params) 324 324 { 325 325 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 326 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 326 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 327 327 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ 328 328 int ret; 329 329 ··· 369 369 struct snd_soc_pcm_runtime *fe = cstream->private_data; 370 370 struct snd_pcm_substream *fe_substream = 371 371 fe->pcm->streams[cstream->direction].substream; 372 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); 372 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(fe, 0); 373 373 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ 374 374 int ret; 375 375 ··· 419 419 struct snd_codec *params) 420 420 { 421 421 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 422 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 422 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 423 423 int ret = 0; 424 424 425 425 snd_soc_dpcm_mutex_lock(rtd); ··· 437 437 static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes) 438 438 { 439 439 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 440 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 440 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 441 441 int ret; 442 442 443 443 snd_soc_dpcm_mutex_lock(rtd); ··· 457 457 { 458 458 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 459 459 int ret; 460 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 460 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 461 461 462 462 snd_soc_dpcm_mutex_lock(rtd); 463 463 ··· 475 475 struct snd_compr_metadata *metadata) 476 476 { 477 477 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 478 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 478 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 479 479 int ret; 480 480 481 481 ret = snd_soc_dai_compr_set_metadata(cpu_dai, cstream, metadata); ··· 489 489 struct snd_compr_metadata *metadata) 490 490 { 491 491 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 492 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 492 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 493 493 int ret; 494 494 495 495 ret = snd_soc_dai_compr_get_metadata(cpu_dai, cstream, metadata); ··· 540 540 int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) 541 541 { 542 542 struct snd_soc_component *component; 543 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 544 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 543 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 544 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 545 545 struct snd_compr *compr; 546 546 struct snd_pcm *be_pcm; 547 547 char new_name[64]; ··· 644 644 ret = snd_compress_new(rtd->card->snd_card, num, direction, 645 645 new_name, compr); 646 646 if (ret < 0) { 647 - component = asoc_rtd_to_codec(rtd, 0)->component; 647 + component = snd_soc_rtd_to_codec(rtd, 0)->component; 648 648 dev_err(component->dev, 649 649 "Compress ASoC: can't create compress for codec %s: %d\n", 650 650 component->name, ret);
+10 -10
sound/soc/soc-core.c
··· 420 420 */ 421 421 void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd) 422 422 { 423 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 423 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 424 424 int playback = SNDRV_PCM_STREAM_PLAYBACK; 425 425 426 426 snd_soc_dpcm_mutex_lock(rtd); ··· 554 554 * ^cpu_dais ^codec_dais 555 555 * |--- num_cpus ---|--- num_codecs --| 556 556 * see 557 - * asoc_rtd_to_cpu() 558 - * asoc_rtd_to_codec() 557 + * snd_soc_rtd_to_cpu() 558 + * snd_soc_rtd_to_codec() 559 559 */ 560 560 rtd->card = card; 561 561 rtd->dai_link = dai_link; ··· 1078 1078 return -ENOMEM; 1079 1079 1080 1080 for_each_link_cpus(dai_link, i, cpu) { 1081 - asoc_rtd_to_cpu(rtd, i) = snd_soc_find_dai(cpu); 1082 - if (!asoc_rtd_to_cpu(rtd, i)) { 1081 + snd_soc_rtd_to_cpu(rtd, i) = snd_soc_find_dai(cpu); 1082 + if (!snd_soc_rtd_to_cpu(rtd, i)) { 1083 1083 dev_info(card->dev, "ASoC: CPU DAI %s not registered\n", 1084 1084 cpu->dai_name); 1085 1085 goto _err_defer; 1086 1086 } 1087 - snd_soc_rtd_add_component(rtd, asoc_rtd_to_cpu(rtd, i)->component); 1087 + snd_soc_rtd_add_component(rtd, snd_soc_rtd_to_cpu(rtd, i)->component); 1088 1088 } 1089 1089 1090 1090 /* Find CODEC from registered CODECs */ 1091 1091 for_each_link_codecs(dai_link, i, codec) { 1092 - asoc_rtd_to_codec(rtd, i) = snd_soc_find_dai(codec); 1093 - if (!asoc_rtd_to_codec(rtd, i)) { 1092 + snd_soc_rtd_to_codec(rtd, i) = snd_soc_find_dai(codec); 1093 + if (!snd_soc_rtd_to_codec(rtd, i)) { 1094 1094 dev_info(card->dev, "ASoC: CODEC DAI %s not registered\n", 1095 1095 codec->dai_name); 1096 1096 goto _err_defer; 1097 1097 } 1098 1098 1099 - snd_soc_rtd_add_component(rtd, asoc_rtd_to_codec(rtd, i)->component); 1099 + snd_soc_rtd_add_component(rtd, snd_soc_rtd_to_codec(rtd, i)->component); 1100 1100 } 1101 1101 1102 1102 /* Find PLATFORM from registered PLATFORMs */ ··· 1335 1335 struct snd_soc_pcm_runtime *rtd) 1336 1336 { 1337 1337 struct snd_soc_dai_link *dai_link = rtd->dai_link; 1338 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 1338 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 1339 1339 struct snd_soc_component *component; 1340 1340 int ret, num, i; 1341 1341
+4 -4
sound/soc/soc-dai.c
··· 610 610 611 611 int snd_soc_pcm_dai_prepare(struct snd_pcm_substream *substream) 612 612 { 613 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 613 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 614 614 struct snd_soc_dai *dai; 615 615 int i, ret; 616 616 ··· 646 646 int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, 647 647 int cmd, int rollback) 648 648 { 649 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 649 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 650 650 struct snd_soc_dai *dai; 651 651 int i, r, ret = 0; 652 652 ··· 681 681 int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream, 682 682 int cmd) 683 683 { 684 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 684 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 685 685 struct snd_soc_dai *dai; 686 686 int i, ret; 687 687 ··· 702 702 snd_pcm_sframes_t *cpu_delay, 703 703 snd_pcm_sframes_t *codec_delay) 704 704 { 705 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 705 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 706 706 struct snd_soc_dai *dai; 707 707 int i; 708 708
+6 -6
sound/soc/soc-dapm.c
··· 2717 2717 struct snd_pcm_hw_params *params, 2718 2718 struct snd_soc_dai *dai) 2719 2719 { 2720 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 2720 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 2721 2721 int ret; 2722 2722 2723 2723 snd_soc_dapm_mutex_lock(rtd->card); ··· 3822 3822 { 3823 3823 struct snd_soc_dapm_path *path; 3824 3824 struct snd_soc_dai *source, *sink; 3825 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 3825 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 3826 3826 struct snd_pcm_hw_params *params = NULL; 3827 3827 const struct snd_soc_pcm_stream *config = NULL; 3828 3828 struct snd_pcm_runtime *runtime = NULL; ··· 4142 4142 struct snd_pcm_substream *substream, 4143 4143 char *id) 4144 4144 { 4145 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 4145 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 4146 4146 struct snd_soc_dapm_widget template; 4147 4147 struct snd_soc_dapm_widget *w; 4148 4148 const struct snd_kcontrol_new *kcontrol_news; ··· 4441 4441 if (rtd->dai_link->num_cpus == 1) { 4442 4442 for_each_rtd_codec_dais(rtd, i, codec_dai) 4443 4443 dapm_connect_dai_pair(card, rtd, codec_dai, 4444 - asoc_rtd_to_cpu(rtd, 0)); 4444 + snd_soc_rtd_to_cpu(rtd, 0)); 4445 4445 } else if (rtd->dai_link->num_codecs == rtd->dai_link->num_cpus) { 4446 4446 for_each_rtd_codec_dais(rtd, i, codec_dai) 4447 4447 dapm_connect_dai_pair(card, rtd, codec_dai, 4448 - asoc_rtd_to_cpu(rtd, i)); 4448 + snd_soc_rtd_to_cpu(rtd, i)); 4449 4449 } else if (rtd->dai_link->num_codecs > rtd->dai_link->num_cpus) { 4450 4450 int cpu_id; 4451 4451 ··· 4465 4465 continue; 4466 4466 } 4467 4467 dapm_connect_dai_pair(card, rtd, codec_dai, 4468 - asoc_rtd_to_cpu(rtd, cpu_id)); 4468 + snd_soc_rtd_to_cpu(rtd, cpu_id)); 4469 4469 } 4470 4470 } else { 4471 4471 dev_err(card->dev,
+5 -5
sound/soc/soc-generic-dmaengine-pcm.c
··· 50 50 int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream, 51 51 struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) 52 52 { 53 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 53 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 54 54 struct snd_dmaengine_dai_dma_data *dma_data; 55 55 int ret; 56 56 ··· 60 60 return -EINVAL; 61 61 } 62 62 63 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 63 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 64 64 65 65 ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); 66 66 if (ret) ··· 98 98 dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component, 99 99 struct snd_pcm_substream *substream) 100 100 { 101 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 101 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 102 102 struct dmaengine_pcm *pcm = soc_component_to_pcm(component); 103 103 struct device *dma_dev = dmaengine_dma_dev(pcm, substream); 104 104 struct dma_chan *chan = pcm->chan[substream->stream]; ··· 115 115 return snd_soc_set_runtime_hwparams(substream, 116 116 pcm->config->pcm_hardware); 117 117 118 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 118 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 119 119 120 120 memset(&hw, 0, sizeof(hw)); 121 121 hw.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | ··· 185 185 return NULL; 186 186 } 187 187 188 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 188 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 189 189 190 190 if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) && pcm->chan[0]) 191 191 return pcm->chan[0];
+7 -7
sound/soc/soc-link.c
··· 67 67 68 68 int snd_soc_link_startup(struct snd_pcm_substream *substream) 69 69 { 70 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 70 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 71 71 int ret = 0; 72 72 73 73 if (rtd->dai_link->ops && ··· 84 84 void snd_soc_link_shutdown(struct snd_pcm_substream *substream, 85 85 int rollback) 86 86 { 87 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 87 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 88 88 89 89 if (rollback && !soc_link_mark_match(rtd, substream, startup)) 90 90 return; ··· 99 99 100 100 int snd_soc_link_prepare(struct snd_pcm_substream *substream) 101 101 { 102 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 102 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 103 103 int ret = 0; 104 104 105 105 if (rtd->dai_link->ops && ··· 112 112 int snd_soc_link_hw_params(struct snd_pcm_substream *substream, 113 113 struct snd_pcm_hw_params *params) 114 114 { 115 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 115 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 116 116 int ret = 0; 117 117 118 118 if (rtd->dai_link->ops && ··· 128 128 129 129 void snd_soc_link_hw_free(struct snd_pcm_substream *substream, int rollback) 130 130 { 131 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 131 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 132 132 133 133 if (rollback && !soc_link_mark_match(rtd, substream, hw_params)) 134 134 return; ··· 143 143 144 144 static int soc_link_trigger(struct snd_pcm_substream *substream, int cmd) 145 145 { 146 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 146 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 147 147 int ret = 0; 148 148 149 149 if (rtd->dai_link->ops && ··· 156 156 int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd, 157 157 int rollback) 158 158 { 159 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 159 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 160 160 int ret = 0; 161 161 162 162 switch (cmd) {
+45 -45
sound/soc/soc-pcm.c
··· 71 71 72 72 static inline const char *soc_cpu_dai_name(struct snd_soc_pcm_runtime *rtd) 73 73 { 74 - return (rtd)->dai_link->num_cpus == 1 ? asoc_rtd_to_cpu(rtd, 0)->name : "multicpu"; 74 + return (rtd)->dai_link->num_cpus == 1 ? snd_soc_rtd_to_cpu(rtd, 0)->name : "multicpu"; 75 75 } 76 76 static inline const char *soc_codec_dai_name(struct snd_soc_pcm_runtime *rtd) 77 77 { 78 - return (rtd)->dai_link->num_codecs == 1 ? asoc_rtd_to_codec(rtd, 0)->name : "multicodec"; 78 + return (rtd)->dai_link->num_codecs == 1 ? snd_soc_rtd_to_codec(rtd, 0)->name : "multicodec"; 79 79 } 80 80 81 81 #ifdef CONFIG_DEBUG_FS ··· 184 184 185 185 snd_soc_dpcm_mutex_lock(fe); 186 186 for_each_pcm_streams(stream) 187 - if (snd_soc_dai_stream_valid(asoc_rtd_to_cpu(fe, 0), stream)) 187 + if (snd_soc_dai_stream_valid(snd_soc_rtd_to_cpu(fe, 0), stream)) 188 188 offset += dpcm_show_state(fe, stream, 189 189 buf + offset, 190 190 out_count - offset); ··· 386 386 static int soc_pcm_apply_symmetry(struct snd_pcm_substream *substream, 387 387 struct snd_soc_dai *soc_dai) 388 388 { 389 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 389 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 390 390 int ret; 391 391 392 392 if (!snd_soc_dai_active(soc_dai)) ··· 419 419 static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream, 420 420 struct snd_pcm_hw_params *params) 421 421 { 422 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 422 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 423 423 struct snd_soc_dai d; 424 424 struct snd_soc_dai *dai; 425 425 struct snd_soc_dai *cpu_dai; ··· 452 452 453 453 static void soc_pcm_update_symmetry(struct snd_pcm_substream *substream) 454 454 { 455 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 455 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 456 456 struct snd_soc_dai_link *link = rtd->dai_link; 457 457 struct snd_soc_dai *dai; 458 458 unsigned int symmetry, i; ··· 473 473 474 474 static void soc_pcm_set_msb(struct snd_pcm_substream *substream, int bits) 475 475 { 476 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 476 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 477 477 int ret; 478 478 479 479 if (!bits) ··· 487 487 488 488 static void soc_pcm_apply_msb(struct snd_pcm_substream *substream) 489 489 { 490 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 490 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 491 491 struct snd_soc_dai *cpu_dai; 492 492 struct snd_soc_dai *codec_dai; 493 493 int stream = substream->stream; ··· 636 636 static void soc_pcm_init_runtime_hw(struct snd_pcm_substream *substream) 637 637 { 638 638 struct snd_pcm_hardware *hw = &substream->runtime->hw; 639 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 639 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 640 640 u64 formats = hw->formats; 641 641 642 642 /* ··· 652 652 653 653 static int soc_pcm_components_open(struct snd_pcm_substream *substream) 654 654 { 655 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 655 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 656 656 struct snd_soc_component *component; 657 657 int i, ret = 0; 658 658 ··· 672 672 static int soc_pcm_components_close(struct snd_pcm_substream *substream, 673 673 int rollback) 674 674 { 675 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 675 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 676 676 struct snd_soc_component *component; 677 677 int i, ret = 0; 678 678 ··· 738 738 /* PCM close ops for non-DPCM streams */ 739 739 static int soc_pcm_close(struct snd_pcm_substream *substream) 740 740 { 741 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 741 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 742 742 743 743 snd_soc_dpcm_mutex_lock(rtd); 744 744 __soc_pcm_close(rtd, substream); ··· 748 748 749 749 static int soc_hw_sanity_check(struct snd_pcm_substream *substream) 750 750 { 751 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 751 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 752 752 struct snd_pcm_hardware *hw = &substream->runtime->hw; 753 753 const char *name_cpu = soc_cpu_dai_name(rtd); 754 754 const char *name_codec = soc_codec_dai_name(rtd); ··· 854 854 /* PCM open ops for non-DPCM streams */ 855 855 static int soc_pcm_open(struct snd_pcm_substream *substream) 856 856 { 857 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 857 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 858 858 int ret; 859 859 860 860 snd_soc_dpcm_mutex_lock(rtd); ··· 908 908 /* PCM prepare ops for non-DPCM streams */ 909 909 static int soc_pcm_prepare(struct snd_pcm_substream *substream) 910 910 { 911 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 911 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 912 912 int ret; 913 913 914 914 snd_soc_dpcm_mutex_lock(rtd); ··· 965 965 /* hw_free PCM ops for non-DPCM streams */ 966 966 static int soc_pcm_hw_free(struct snd_pcm_substream *substream) 967 967 { 968 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 968 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 969 969 int ret; 970 970 971 971 snd_soc_dpcm_mutex_lock(rtd); ··· 1085 1085 static int soc_pcm_hw_params(struct snd_pcm_substream *substream, 1086 1086 struct snd_pcm_hw_params *params) 1087 1087 { 1088 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1088 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1089 1089 int ret; 1090 1090 1091 1091 snd_soc_dpcm_mutex_lock(rtd); ··· 1110 1110 1111 1111 static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd) 1112 1112 { 1113 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1113 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1114 1114 struct snd_soc_component *component; 1115 1115 int ret = 0, r = 0, i; 1116 1116 int rollback = 0; ··· 1397 1397 int dpcm_path_get(struct snd_soc_pcm_runtime *fe, 1398 1398 int stream, struct snd_soc_dapm_widget_list **list) 1399 1399 { 1400 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); 1400 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(fe, 0); 1401 1401 int paths; 1402 1402 1403 1403 if (fe->dai_link->num_cpus > 1) { ··· 1670 1670 1671 1671 static void dpcm_runtime_setup_fe(struct snd_pcm_substream *substream) 1672 1672 { 1673 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 1673 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 1674 1674 struct snd_pcm_runtime *runtime = substream->runtime; 1675 1675 struct snd_pcm_hardware *hw = &runtime->hw; 1676 1676 struct snd_soc_dai *dai; ··· 1704 1704 1705 1705 static void dpcm_runtime_setup_be_format(struct snd_pcm_substream *substream) 1706 1706 { 1707 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 1707 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 1708 1708 struct snd_pcm_runtime *runtime = substream->runtime; 1709 1709 struct snd_pcm_hardware *hw = &runtime->hw; 1710 1710 struct snd_soc_dpcm *dpcm; ··· 1741 1741 1742 1742 static void dpcm_runtime_setup_be_chan(struct snd_pcm_substream *substream) 1743 1743 { 1744 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 1744 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 1745 1745 struct snd_pcm_runtime *runtime = substream->runtime; 1746 1746 struct snd_pcm_hardware *hw = &runtime->hw; 1747 1747 struct snd_soc_dpcm *dpcm; ··· 1780 1780 */ 1781 1781 if (be->dai_link->num_codecs == 1) { 1782 1782 struct snd_soc_pcm_stream *codec_stream = snd_soc_dai_get_pcm_stream( 1783 - asoc_rtd_to_codec(be, 0), stream); 1783 + snd_soc_rtd_to_codec(be, 0), stream); 1784 1784 1785 1785 soc_pcm_hw_update_chan(hw, codec_stream); 1786 1786 } ··· 1789 1789 1790 1790 static void dpcm_runtime_setup_be_rate(struct snd_pcm_substream *substream) 1791 1791 { 1792 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 1792 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 1793 1793 struct snd_pcm_runtime *runtime = substream->runtime; 1794 1794 struct snd_pcm_hardware *hw = &runtime->hw; 1795 1795 struct snd_soc_dpcm *dpcm; ··· 1828 1828 int stream) 1829 1829 { 1830 1830 struct snd_soc_dpcm *dpcm; 1831 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(fe_substream); 1831 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(fe_substream); 1832 1832 struct snd_soc_dai *fe_cpu_dai; 1833 1833 int err = 0; 1834 1834 int i; ··· 1855 1855 if (!be_substream) 1856 1856 continue; 1857 1857 1858 - rtd = asoc_substream_to_rtd(be_substream); 1858 + rtd = snd_soc_substream_to_rtd(be_substream); 1859 1859 if (rtd->dai_link->be_hw_params_fixup) 1860 1860 continue; 1861 1861 ··· 1874 1874 1875 1875 static int dpcm_fe_dai_startup(struct snd_pcm_substream *fe_substream) 1876 1876 { 1877 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(fe_substream); 1877 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(fe_substream); 1878 1878 int stream = fe_substream->stream, ret = 0; 1879 1879 1880 1880 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); ··· 1911 1911 1912 1912 static int dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream) 1913 1913 { 1914 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 1914 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 1915 1915 int stream = substream->stream; 1916 1916 1917 1917 snd_soc_dpcm_mutex_assert_held(fe); ··· 1977 1977 1978 1978 static int dpcm_fe_dai_hw_free(struct snd_pcm_substream *substream) 1979 1979 { 1980 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 1980 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 1981 1981 int stream = substream->stream; 1982 1982 1983 1983 snd_soc_dpcm_mutex_lock(fe); ··· 2080 2080 static int dpcm_fe_dai_hw_params(struct snd_pcm_substream *substream, 2081 2081 struct snd_pcm_hw_params *params) 2082 2082 { 2083 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 2083 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 2084 2084 int ret, stream = substream->stream; 2085 2085 2086 2086 snd_soc_dpcm_mutex_lock(fe); ··· 2283 2283 static int dpcm_dai_trigger_fe_be(struct snd_pcm_substream *substream, 2284 2284 int cmd, bool fe_first) 2285 2285 { 2286 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 2286 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 2287 2287 int ret; 2288 2288 2289 2289 /* call trigger on the frontend before the backend. */ ··· 2314 2314 2315 2315 static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd) 2316 2316 { 2317 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 2317 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 2318 2318 int stream = substream->stream; 2319 2319 int ret = 0; 2320 2320 enum snd_soc_dpcm_trigger trigger = fe->dai_link->trigger[stream]; ··· 2401 2401 2402 2402 static int dpcm_fe_dai_trigger(struct snd_pcm_substream *substream, int cmd) 2403 2403 { 2404 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 2404 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 2405 2405 int stream = substream->stream; 2406 2406 2407 2407 /* if FE's runtime_update is already set, we're in race; ··· 2455 2455 2456 2456 static int dpcm_fe_dai_prepare(struct snd_pcm_substream *substream) 2457 2457 { 2458 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); 2458 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(substream); 2459 2459 int stream = substream->stream, ret = 0; 2460 2460 2461 2461 snd_soc_dpcm_mutex_lock(fe); ··· 2632 2632 } 2633 2633 2634 2634 /* only check active links */ 2635 - if (!snd_soc_dai_active(asoc_rtd_to_cpu(fe, 0))) 2635 + if (!snd_soc_dai_active(snd_soc_rtd_to_cpu(fe, 0))) 2636 2636 return 0; 2637 2637 2638 2638 /* DAPM sync will call this to update DSP paths */ ··· 2642 2642 for_each_pcm_streams(stream) { 2643 2643 2644 2644 /* skip if FE doesn't have playback/capture capability */ 2645 - if (!snd_soc_dai_stream_valid(asoc_rtd_to_cpu(fe, 0), stream) || 2646 - !snd_soc_dai_stream_valid(asoc_rtd_to_codec(fe, 0), stream)) 2645 + if (!snd_soc_dai_stream_valid(snd_soc_rtd_to_cpu(fe, 0), stream) || 2646 + !snd_soc_dai_stream_valid(snd_soc_rtd_to_codec(fe, 0), stream)) 2647 2647 continue; 2648 2648 2649 2649 /* skip if FE isn't currently playing/capturing */ 2650 - if (!snd_soc_dai_stream_active(asoc_rtd_to_cpu(fe, 0), stream) || 2651 - !snd_soc_dai_stream_active(asoc_rtd_to_codec(fe, 0), stream)) 2650 + if (!snd_soc_dai_stream_active(snd_soc_rtd_to_cpu(fe, 0), stream) || 2651 + !snd_soc_dai_stream_active(snd_soc_rtd_to_codec(fe, 0), stream)) 2652 2652 continue; 2653 2653 2654 2654 paths = dpcm_path_get(fe, stream, &list); ··· 2706 2706 2707 2707 static void dpcm_fe_dai_cleanup(struct snd_pcm_substream *fe_substream) 2708 2708 { 2709 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(fe_substream); 2709 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(fe_substream); 2710 2710 struct snd_soc_dpcm *dpcm; 2711 2711 int stream = fe_substream->stream; 2712 2712 ··· 2721 2721 2722 2722 static int dpcm_fe_dai_close(struct snd_pcm_substream *fe_substream) 2723 2723 { 2724 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(fe_substream); 2724 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(fe_substream); 2725 2725 int ret; 2726 2726 2727 2727 snd_soc_dpcm_mutex_lock(fe); ··· 2735 2735 2736 2736 static int dpcm_fe_dai_open(struct snd_pcm_substream *fe_substream) 2737 2737 { 2738 - struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(fe_substream); 2738 + struct snd_soc_pcm_runtime *fe = snd_soc_substream_to_rtd(fe_substream); 2739 2739 struct snd_soc_dapm_widget_list *list; 2740 2740 int ret; 2741 2741 int stream = fe_substream->stream; ··· 2819 2819 2820 2820 for_each_rtd_codec_dais(rtd, i, codec_dai) { 2821 2821 if (dai_link->num_cpus == 1) { 2822 - cpu_dai = asoc_rtd_to_cpu(rtd, 0); 2822 + cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 2823 2823 } else if (dai_link->num_cpus == dai_link->num_codecs) { 2824 - cpu_dai = asoc_rtd_to_cpu(rtd, i); 2824 + cpu_dai = snd_soc_rtd_to_cpu(rtd, i); 2825 2825 } else if (rtd->dai_link->num_codecs > rtd->dai_link->num_cpus) { 2826 2826 int cpu_id; 2827 2827 ··· 2832 2832 } 2833 2833 2834 2834 cpu_id = rtd->dai_link->codec_ch_maps[i].connected_cpu_id; 2835 - cpu_dai = asoc_rtd_to_cpu(rtd, cpu_id); 2835 + cpu_dai = snd_soc_rtd_to_cpu(rtd, cpu_id); 2836 2836 } else { 2837 2837 dev_err(rtd->card->dev, 2838 2838 "%s codec number %d < cpu number %d is not supported\n",
+3 -3
sound/soc/soc-topology.c
··· 1706 1706 /* 1707 1707 * Many topology are assuming link has Codec / Platform, and 1708 1708 * these might be overwritten at soc_tplg_dai_link_load(). 1709 - * Don't use &asoc_dummy_dlc here. 1709 + * Don't use &snd_soc_dummy_dlc here. 1710 1710 */ 1711 - link->codecs = &dlc[1]; /* Don't use &asoc_dummy_dlc here */ 1711 + link->codecs = &dlc[1]; /* Don't use &snd_soc_dummy_dlc here */ 1712 1712 link->codecs->name = "snd-soc-dummy"; 1713 1713 link->codecs->dai_name = "snd-soc-dummy-dai"; 1714 1714 link->num_codecs = 1; 1715 1715 1716 - link->platforms = &dlc[2]; /* Don't use &asoc_dummy_dlc here */ 1716 + link->platforms = &dlc[2]; /* Don't use &snd_soc_dummy_dlc here */ 1717 1717 link->platforms->name = "snd-soc-dummy"; 1718 1718 link->num_platforms = 1; 1719 1719
+3 -3
sound/soc/soc-utils.c
··· 115 115 static int dummy_dma_open(struct snd_soc_component *component, 116 116 struct snd_pcm_substream *substream) 117 117 { 118 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 118 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 119 119 int i; 120 120 121 121 /* ··· 225 225 (component->driver == &dummy_codec)); 226 226 } 227 227 228 - struct snd_soc_dai_link_component asoc_dummy_dlc = { 228 + struct snd_soc_dai_link_component snd_soc_dummy_dlc = { 229 229 .of_node = NULL, 230 230 .dai_name = "snd-soc-dummy-dai", 231 231 .name = "snd-soc-dummy", 232 232 }; 233 - EXPORT_SYMBOL_GPL(asoc_dummy_dlc); 233 + EXPORT_SYMBOL_GPL(snd_soc_dummy_dlc); 234 234 235 235 static int snd_soc_dummy_probe(struct platform_device *pdev) 236 236 {
+1 -1
sound/soc/sof/amd/acp-pcm.c
··· 89 89 snd_pcm_uframes_t acp_pcm_pointer(struct snd_sof_dev *sdev, 90 90 struct snd_pcm_substream *substream) 91 91 { 92 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 92 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 93 93 struct snd_soc_component *scomp = sdev->component; 94 94 struct snd_sof_pcm_stream *stream; 95 95 struct sof_ipc_stream_posn posn;
+11 -11
sound/soc/sof/intel/hda-dai-ops.c
··· 43 43 static struct hdac_ext_stream * 44 44 hda_link_stream_assign(struct hdac_bus *bus, struct snd_pcm_substream *substream) 45 45 { 46 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 46 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 47 47 struct sof_intel_hda_stream *hda_stream; 48 48 const struct sof_intel_dsp_desc *chip; 49 49 struct snd_sof_dev *sdev; ··· 145 145 struct snd_soc_dai *cpu_dai, 146 146 struct snd_pcm_substream *substream) 147 147 { 148 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 148 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 149 149 struct snd_soc_dai *dai; 150 150 struct hdac_ext_stream *hext_stream; 151 151 152 152 /* only allocate a stream_tag for the first DAI in the dailink */ 153 - dai = asoc_rtd_to_cpu(rtd, 0); 153 + dai = snd_soc_rtd_to_cpu(rtd, 0); 154 154 if (dai == cpu_dai) 155 155 hext_stream = hda_link_stream_assign(sof_to_bus(sdev), substream); 156 156 else ··· 168 168 struct snd_pcm_substream *substream) 169 169 { 170 170 struct hdac_ext_stream *hext_stream = hda_get_hext_stream(sdev, cpu_dai, substream); 171 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 171 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 172 172 struct snd_soc_dai *dai; 173 173 174 174 /* only release a stream_tag for the first DAI in the dailink */ 175 - dai = asoc_rtd_to_cpu(rtd, 0); 175 + dai = snd_soc_rtd_to_cpu(rtd, 0); 176 176 if (dai == cpu_dai) 177 177 snd_hdac_ext_stream_release(hext_stream, HDAC_EXT_STREAM_TYPE_LINK); 178 178 snd_soc_dai_set_dma_data(cpu_dai, substream, NULL); ··· 193 193 struct snd_pcm_substream *substream, 194 194 struct hdac_stream *hstream) 195 195 { 196 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 197 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 196 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 197 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 198 198 199 199 /* set the hdac_stream in the codec dai */ 200 200 snd_soc_dai_set_stream(codec_dai, hstream, substream->stream); ··· 204 204 struct snd_pcm_substream *substream, 205 205 struct snd_pcm_hw_params *params) 206 206 { 207 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 208 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 207 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 208 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 209 209 unsigned int link_bps; 210 210 unsigned int format_val; 211 211 ··· 226 226 static struct hdac_ext_link *hda_get_hlink(struct snd_sof_dev *sdev, 227 227 struct snd_pcm_substream *substream) 228 228 { 229 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 230 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 229 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 230 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 231 231 struct hdac_bus *bus = sof_to_bus(sdev); 232 232 233 233 return snd_hdac_ext_bus_get_hlink_by_name(bus, codec_dai->component->name);
+4 -4
sound/soc/sof/intel/hda-dai.c
··· 316 316 317 317 static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) 318 318 { 319 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 319 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 320 320 int stream = substream->stream; 321 321 322 322 return hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, dai); ··· 408 408 static int non_hda_dai_prepare(struct snd_pcm_substream *substream, 409 409 struct snd_soc_dai *cpu_dai) 410 410 { 411 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 411 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 412 412 int stream = substream->stream; 413 413 414 414 return non_hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, cpu_dai); ··· 526 526 struct snd_sof_dev *sdev; 527 527 struct snd_sof_dai *sdai; 528 528 529 - rtd = asoc_substream_to_rtd(hext_stream->link_substream); 530 - cpu_dai = asoc_rtd_to_cpu(rtd, 0); 529 + rtd = snd_soc_substream_to_rtd(hext_stream->link_substream); 530 + cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 531 531 w = snd_soc_dai_get_widget(cpu_dai, hdac_stream(hext_stream)->direction); 532 532 swidget = w->dobj.private; 533 533 sdev = widget_to_sdev(w);
+2 -2
sound/soc/sof/intel/hda-pcm.c
··· 177 177 snd_pcm_uframes_t hda_dsp_pcm_pointer(struct snd_sof_dev *sdev, 178 178 struct snd_pcm_substream *substream) 179 179 { 180 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 180 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 181 181 struct snd_soc_component *scomp = sdev->component; 182 182 struct hdac_stream *hstream = substream->runtime->private_data; 183 183 struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; ··· 208 208 int hda_dsp_pcm_open(struct snd_sof_dev *sdev, 209 209 struct snd_pcm_substream *substream) 210 210 { 211 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 211 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 212 212 struct snd_pcm_runtime *runtime = substream->runtime; 213 213 struct snd_soc_component *scomp = sdev->component; 214 214 struct hdac_ext_stream *dsp_stream;
+1 -1
sound/soc/sof/intel/hda-stream.c
··· 38 38 struct snd_soc_pcm_runtime *rtd; 39 39 40 40 if (hstream->substream) 41 - rtd = asoc_substream_to_rtd(hstream->substream); 41 + rtd = snd_soc_substream_to_rtd(hstream->substream); 42 42 else if (hstream->cstream) 43 43 rtd = hstream->cstream->private_data; 44 44 else
+1 -1
sound/soc/sof/mediatek/mt8186/mt8186.c
··· 457 457 struct sof_ipc_stream_posn posn; 458 458 struct snd_sof_pcm_stream *stream; 459 459 struct snd_soc_component *scomp = sdev->component; 460 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 460 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 461 461 462 462 spcm = snd_sof_find_spcm_dai(scomp, rtd); 463 463 if (!spcm) {
+1 -1
sound/soc/sof/mediatek/mt8195/mt8195.c
··· 476 476 struct sof_ipc_stream_posn posn; 477 477 struct snd_sof_pcm_stream *stream; 478 478 struct snd_soc_component *scomp = sdev->component; 479 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 479 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 480 480 481 481 spcm = snd_sof_find_spcm_dai(scomp, rtd); 482 482 if (!spcm) {
+2 -2
sound/soc/sprd/sprd-pcm-compress.c
··· 135 135 struct sprd_compr_stream *stream = runtime->private_data; 136 136 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 137 137 struct device *dev = component->dev; 138 - struct sprd_compr_data *data = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 138 + struct sprd_compr_data *data = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 139 139 struct sprd_pcm_dma_params *dma_params = data->dma_params; 140 140 struct sprd_compr_dma *dma = &stream->dma[channel]; 141 141 struct dma_slave_config config = { }; ··· 318 318 struct snd_compr_runtime *runtime = cstream->runtime; 319 319 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 320 320 struct device *dev = component->dev; 321 - struct sprd_compr_data *data = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 321 + struct sprd_compr_data *data = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 322 322 struct sprd_compr_stream *stream; 323 323 struct sprd_compr_callback cb; 324 324 int stream_id = cstream->direction, ret;
+2 -2
sound/soc/sprd/sprd-pcm-dma.c
··· 190 190 { 191 191 struct snd_pcm_runtime *runtime = substream->runtime; 192 192 struct sprd_pcm_dma_private *dma_private = runtime->private_data; 193 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 193 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 194 194 struct sprd_pcm_dma_params *dma_params; 195 195 size_t totsize = params_buffer_bytes(params); 196 196 size_t period = params_period_bytes(params); ··· 200 200 unsigned long flags; 201 201 int ret, i, j, sg_num; 202 202 203 - dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 203 + dma_params = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 204 204 if (!dma_params) { 205 205 dev_warn(component->dev, "no dma parameters setting\n"); 206 206 dma_private->params = NULL;
+1 -1
sound/soc/starfive/jh7110_tdm.c
··· 325 325 static int jh7110_tdm_startup(struct snd_pcm_substream *substream, 326 326 struct snd_soc_dai *cpu_dai) 327 327 { 328 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 328 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 329 329 struct snd_soc_dai_link *dai_link = rtd->dai_link; 330 330 331 331 dai_link->trigger_stop = SND_SOC_TRIGGER_ORDER_LDC;
+12 -12
sound/soc/stm/stm32_adfsdm.c
··· 167 167 static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private) 168 168 { 169 169 struct stm32_adfsdm_priv *priv = private; 170 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(priv->substream); 170 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(priv->substream); 171 171 u8 *pcm_buff = priv->pcm_buff; 172 172 u8 *src_buff = (u8 *)data; 173 173 unsigned int old_pos = priv->pos; ··· 212 212 static int stm32_adfsdm_trigger(struct snd_soc_component *component, 213 213 struct snd_pcm_substream *substream, int cmd) 214 214 { 215 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 215 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 216 216 struct stm32_adfsdm_priv *priv = 217 - snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 217 + snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 218 218 219 219 switch (cmd) { 220 220 case SNDRV_PCM_TRIGGER_START: ··· 233 233 static int stm32_adfsdm_pcm_open(struct snd_soc_component *component, 234 234 struct snd_pcm_substream *substream) 235 235 { 236 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 237 - struct stm32_adfsdm_priv *priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 236 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 237 + struct stm32_adfsdm_priv *priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 238 238 int ret; 239 239 240 240 ret = snd_soc_set_runtime_hwparams(substream, &stm32_adfsdm_pcm_hw); ··· 247 247 static int stm32_adfsdm_pcm_close(struct snd_soc_component *component, 248 248 struct snd_pcm_substream *substream) 249 249 { 250 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 250 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 251 251 struct stm32_adfsdm_priv *priv = 252 - snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 252 + snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 253 253 254 254 priv->substream = NULL; 255 255 ··· 260 260 struct snd_soc_component *component, 261 261 struct snd_pcm_substream *substream) 262 262 { 263 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 263 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 264 264 struct stm32_adfsdm_priv *priv = 265 - snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 265 + snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 266 266 267 267 return bytes_to_frames(substream->runtime, priv->pos); 268 268 } ··· 271 271 struct snd_pcm_substream *substream, 272 272 struct snd_pcm_hw_params *params) 273 273 { 274 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 274 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 275 275 struct stm32_adfsdm_priv *priv = 276 - snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 276 + snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 277 277 278 278 priv->pcm_buff = substream->runtime->dma_area; 279 279 ··· 286 286 { 287 287 struct snd_pcm *pcm = rtd->pcm; 288 288 struct stm32_adfsdm_priv *priv = 289 - snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 289 + snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 290 290 unsigned int size = DFSDM_MAX_PERIODS * DFSDM_MAX_PERIOD_SIZE; 291 291 292 292 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
+2 -2
sound/soc/stm/stm32_sai_sub.c
··· 1249 1249 unsigned long bytes) 1250 1250 { 1251 1251 struct snd_pcm_runtime *runtime = substream->runtime; 1252 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1253 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 1252 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1253 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 1254 1254 struct stm32_sai_sub_data *sai = dev_get_drvdata(cpu_dai->dev); 1255 1255 int *ptr = (int *)(runtime->dma_area + hwoff + 1256 1256 channel * (runtime->dma_bytes / runtime->channels));
+6 -6
sound/soc/sunxi/sun4i-codec.c
··· 282 282 static int sun4i_codec_trigger(struct snd_pcm_substream *substream, int cmd, 283 283 struct snd_soc_dai *dai) 284 284 { 285 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 285 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 286 286 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); 287 287 288 288 switch (cmd) { ··· 314 314 static int sun4i_codec_prepare_capture(struct snd_pcm_substream *substream, 315 315 struct snd_soc_dai *dai) 316 316 { 317 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 317 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 318 318 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); 319 319 320 320 ··· 355 355 static int sun4i_codec_prepare_playback(struct snd_pcm_substream *substream, 356 356 struct snd_soc_dai *dai) 357 357 { 358 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 358 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 359 359 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); 360 360 u32 val; 361 361 ··· 556 556 struct snd_pcm_hw_params *params, 557 557 struct snd_soc_dai *dai) 558 558 { 559 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 559 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 560 560 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); 561 561 unsigned long clk_freq; 562 562 int ret, hwrate; ··· 597 597 static int sun4i_codec_startup(struct snd_pcm_substream *substream, 598 598 struct snd_soc_dai *dai) 599 599 { 600 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 600 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 601 601 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); 602 602 603 603 snd_pcm_hw_constraint_list(substream->runtime, 0, ··· 616 616 static void sun4i_codec_shutdown(struct snd_pcm_substream *substream, 617 617 struct snd_soc_dai *dai) 618 618 { 619 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 619 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 620 620 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); 621 621 622 622 clk_disable_unprepare(scodec->clk_module);
+2 -2
sound/soc/sunxi/sun4i-spdif.c
··· 246 246 static int sun4i_spdif_startup(struct snd_pcm_substream *substream, 247 247 struct snd_soc_dai *cpu_dai) 248 248 { 249 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 250 - struct sun4i_spdif_dev *host = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 249 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 250 + struct sun4i_spdif_dev *host = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 251 251 252 252 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) 253 253 return -EINVAL;
+1 -1
sound/soc/sunxi/sun50i-dmic.c
··· 75 75 struct snd_soc_dai *cpu_dai) 76 76 { 77 77 struct snd_soc_pcm_runtime *rtd = substream->private_data; 78 - struct sun50i_dmic_dev *host = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 78 + struct sun50i_dmic_dev *host = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 79 79 80 80 /* only support capture */ 81 81 if (substream->stream != SNDRV_PCM_STREAM_CAPTURE)
+1 -1
sound/soc/tegra/tegra_asoc_machine.c
··· 288 288 struct snd_pcm_hw_params *params) 289 289 { 290 290 struct snd_soc_pcm_runtime *rtd = substream->private_data; 291 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 291 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 292 292 struct snd_soc_card *card = rtd->card; 293 293 struct tegra_machine *machine = snd_soc_card_get_drvdata(card); 294 294 unsigned int srate = params_rate(params);
+11 -11
sound/soc/tegra/tegra_audio_graph_card.c
··· 34 34 }; 35 35 36 36 struct tegra_audio_priv { 37 - struct asoc_simple_priv simple; 37 + struct simple_util_priv simple; 38 38 struct clk *clk_plla_out0; 39 39 struct clk *clk_plla; 40 40 }; ··· 64 64 static int tegra_audio_graph_update_pll(struct snd_pcm_substream *substream, 65 65 struct snd_pcm_hw_params *params) 66 66 { 67 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 68 - struct asoc_simple_priv *simple = snd_soc_card_get_drvdata(rtd->card); 67 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 68 + struct simple_util_priv *simple = snd_soc_card_get_drvdata(rtd->card); 69 69 struct tegra_audio_priv *priv = simple_to_tegra_priv(simple); 70 70 struct device *dev = rtd->card->dev; 71 71 const struct tegra_audio_cdata *data = of_device_get_match_data(dev); ··· 152 152 static int tegra_audio_graph_hw_params(struct snd_pcm_substream *substream, 153 153 struct snd_pcm_hw_params *params) 154 154 { 155 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 156 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 155 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 156 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 157 157 int err; 158 158 159 159 if (need_clk_update(cpu_dai)) { ··· 162 162 return err; 163 163 } 164 164 165 - return asoc_simple_hw_params(substream, params); 165 + return simple_util_hw_params(substream, params); 166 166 } 167 167 168 168 static const struct snd_soc_ops tegra_audio_graph_ops = { 169 - .startup = asoc_simple_startup, 170 - .shutdown = asoc_simple_shutdown, 169 + .startup = simple_util_startup, 170 + .shutdown = simple_util_shutdown, 171 171 .hw_params = tegra_audio_graph_hw_params, 172 172 }; 173 173 174 174 static int tegra_audio_graph_card_probe(struct snd_soc_card *card) 175 175 { 176 - struct asoc_simple_priv *simple = snd_soc_card_get_drvdata(card); 176 + struct simple_util_priv *simple = snd_soc_card_get_drvdata(card); 177 177 struct tegra_audio_priv *priv = simple_to_tegra_priv(simple); 178 178 179 179 priv->clk_plla = devm_clk_get(card->dev, "pll_a"); ··· 188 188 return PTR_ERR(priv->clk_plla_out0); 189 189 } 190 190 191 - return asoc_graph_card_probe(card); 191 + return graph_util_card_probe(card); 192 192 } 193 193 194 194 static int tegra_audio_graph_probe(struct platform_device *pdev) ··· 248 248 .of_match_table = graph_of_tegra_match, 249 249 }, 250 250 .probe = tegra_audio_graph_probe, 251 - .remove = asoc_simple_remove, 251 + .remove = simple_util_remove, 252 252 }; 253 253 module_platform_driver(tegra_audio_graph_card); 254 254
+2 -2
sound/soc/tegra/tegra_pcm.c
··· 79 79 struct snd_soc_pcm_runtime *rtd = substream->private_data; 80 80 struct snd_dmaengine_dai_dma_data *dmap; 81 81 struct dma_chan *chan; 82 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 82 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 83 83 int ret; 84 84 85 85 if (rtd->dai_link->no_pcm) ··· 151 151 if (rtd->dai_link->no_pcm) 152 152 return 0; 153 153 154 - dmap = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 154 + dmap = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 155 155 if (!dmap) 156 156 return 0; 157 157
+2 -2
sound/soc/tegra/tegra_wm8903.c
··· 75 75 return err; 76 76 77 77 if (!machine->gpiod_mic_det && machine->asoc->add_mic_jack) { 78 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 78 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 79 79 struct snd_soc_component *component = codec_dai->component; 80 80 int shrt = 0; 81 81 ··· 105 105 { 106 106 struct snd_soc_dai_link *link = &card->dai_link[0]; 107 107 struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, link); 108 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 108 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 109 109 struct snd_soc_component *component = codec_dai->component; 110 110 111 111 wm8903_mic_detect(component, NULL, 0, 0);
+2 -2
sound/soc/ti/ams-delta.c
··· 460 460 461 461 static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd) 462 462 { 463 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 463 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 464 464 struct snd_soc_card *card = rtd->card; 465 465 struct snd_soc_dapm_context *dapm = &card->dapm; 466 466 int ret; 467 467 /* Codec is ready, now add/activate board specific controls */ 468 468 469 469 /* Store a pointer to the codec structure for tty ldisc use */ 470 - cx20442_codec = asoc_rtd_to_codec(rtd, 0)->component; 470 + cx20442_codec = snd_soc_rtd_to_codec(rtd, 0)->component; 471 471 472 472 /* Add hook switch - can be used to control the codec from userspace 473 473 * even if line discipline fails */
+5 -5
sound/soc/ti/davinci-evm.c
··· 28 28 29 29 static int evm_startup(struct snd_pcm_substream *substream) 30 30 { 31 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 31 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 32 32 struct snd_soc_card *soc_card = rtd->card; 33 33 struct snd_soc_card_drvdata_davinci *drvdata = 34 34 snd_soc_card_get_drvdata(soc_card); ··· 41 41 42 42 static void evm_shutdown(struct snd_pcm_substream *substream) 43 43 { 44 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 44 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 45 45 struct snd_soc_card *soc_card = rtd->card; 46 46 struct snd_soc_card_drvdata_davinci *drvdata = 47 47 snd_soc_card_get_drvdata(soc_card); ··· 52 52 static int evm_hw_params(struct snd_pcm_substream *substream, 53 53 struct snd_pcm_hw_params *params) 54 54 { 55 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 56 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 57 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 55 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 56 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 57 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 58 58 struct snd_soc_card *soc_card = rtd->card; 59 59 int ret = 0; 60 60 unsigned sysclk = ((struct snd_soc_card_drvdata_davinci *)
+6 -6
sound/soc/ti/j721e-evm.c
··· 251 251 252 252 static int j721e_audio_startup(struct snd_pcm_substream *substream) 253 253 { 254 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 254 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 255 255 struct j721e_priv *priv = snd_soc_card_get_drvdata(rtd->card); 256 256 unsigned int domain_id = rtd->dai_link->id; 257 257 struct j721e_audio_domain *domain = &priv->audio_domains[domain_id]; 258 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 258 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 259 259 struct snd_soc_dai *codec_dai; 260 260 unsigned int active_rate; 261 261 int ret = 0; ··· 309 309 static int j721e_audio_hw_params(struct snd_pcm_substream *substream, 310 310 struct snd_pcm_hw_params *params) 311 311 { 312 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 312 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 313 313 struct snd_soc_card *card = rtd->card; 314 314 struct j721e_priv *priv = snd_soc_card_get_drvdata(card); 315 315 unsigned int domain_id = rtd->dai_link->id; 316 316 struct j721e_audio_domain *domain = &priv->audio_domains[domain_id]; 317 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 317 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 318 318 struct snd_soc_dai *codec_dai; 319 319 unsigned int sysclk_rate; 320 320 int slot_width = 32; ··· 376 376 377 377 static void j721e_audio_shutdown(struct snd_pcm_substream *substream) 378 378 { 379 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 379 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 380 380 struct j721e_priv *priv = snd_soc_card_get_drvdata(rtd->card); 381 381 unsigned int domain_id = rtd->dai_link->id; 382 382 struct j721e_audio_domain *domain = &priv->audio_domains[domain_id]; ··· 403 403 struct j721e_priv *priv = snd_soc_card_get_drvdata(rtd->card); 404 404 unsigned int domain_id = rtd->dai_link->id; 405 405 struct j721e_audio_domain *domain = &priv->audio_domains[domain_id]; 406 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 406 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 407 407 struct snd_soc_dai *codec_dai; 408 408 unsigned int sysclk_rate; 409 409 int i, ret;
+3 -3
sound/soc/ti/n810.c
··· 84 84 static int n810_startup(struct snd_pcm_substream *substream) 85 85 { 86 86 struct snd_pcm_runtime *runtime = substream->runtime; 87 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 87 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 88 88 89 89 snd_pcm_hw_constraint_single(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 2); 90 90 ··· 100 100 static int n810_hw_params(struct snd_pcm_substream *substream, 101 101 struct snd_pcm_hw_params *params) 102 102 { 103 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 104 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 103 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 104 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 105 105 int err; 106 106 107 107 /* Set the codec system clock for DAC and ADC */
+5 -5
sound/soc/ti/omap-abe-twl6040.c
··· 45 45 static int omap_abe_hw_params(struct snd_pcm_substream *substream, 46 46 struct snd_pcm_hw_params *params) 47 47 { 48 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 49 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 48 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 49 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 50 50 struct snd_soc_card *card = rtd->card; 51 51 struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card); 52 52 int clk_id, freq; ··· 77 77 static int omap_abe_dmic_hw_params(struct snd_pcm_substream *substream, 78 78 struct snd_pcm_hw_params *params) 79 79 { 80 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 81 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 80 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 81 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 82 82 int ret = 0; 83 83 84 84 ret = snd_soc_dai_set_sysclk(cpu_dai, OMAP_DMIC_SYSCLK_PAD_CLKS, ··· 166 166 167 167 static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd) 168 168 { 169 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 169 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 170 170 struct snd_soc_card *card = rtd->card; 171 171 struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card); 172 172 int hs_trim;
+1 -1
sound/soc/ti/omap-hdmi.c
··· 370 370 return -ENOMEM; 371 371 card->dai_link->cpus = compnent; 372 372 card->dai_link->num_cpus = 1; 373 - card->dai_link->codecs = &asoc_dummy_dlc; 373 + card->dai_link->codecs = &snd_soc_dummy_dlc; 374 374 card->dai_link->num_codecs = 1; 375 375 376 376 card->dai_link->name = card->name;
+1 -1
sound/soc/ti/omap-mcbsp-st.c
··· 475 475 476 476 int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd, int port_id) 477 477 { 478 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 478 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 479 479 struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); 480 480 481 481 if (!mcbsp->st_data) {
+4 -4
sound/soc/ti/omap-mcbsp.c
··· 720 720 static void omap_mcbsp_set_threshold(struct snd_pcm_substream *substream, 721 721 unsigned int packet_size) 722 722 { 723 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 724 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 723 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 724 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 725 725 struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); 726 726 int words; 727 727 ··· 885 885 struct snd_pcm_substream *substream, 886 886 struct snd_soc_dai *dai) 887 887 { 888 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 889 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 888 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 889 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 890 890 struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); 891 891 u16 fifo_use; 892 892 snd_pcm_sframes_t delay;
+1 -1
sound/soc/ti/omap-mcpdm.c
··· 533 533 void omap_mcpdm_configure_dn_offsets(struct snd_soc_pcm_runtime *rtd, 534 534 u8 rx1, u8 rx2) 535 535 { 536 - struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 536 + struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 537 537 538 538 mcpdm->dn_rx_offset = MCPDM_DNOFST_RX1(rx1) | MCPDM_DNOFST_RX2(rx2); 539 539 }
+1 -1
sound/soc/ti/omap-twl4030.c
··· 38 38 static int omap_twl4030_hw_params(struct snd_pcm_substream *substream, 39 39 struct snd_pcm_hw_params *params) 40 40 { 41 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 41 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 42 42 unsigned int fmt; 43 43 44 44 switch (params_channels(params)) {
+3 -3
sound/soc/ti/omap3pandora.c
··· 31 31 static int omap3pandora_hw_params(struct snd_pcm_substream *substream, 32 32 struct snd_pcm_hw_params *params) 33 33 { 34 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 35 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 36 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 34 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 35 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 36 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 37 37 int ret; 38 38 39 39 /* Set the codec system clock for DAC and ADC */
+2 -2
sound/soc/ti/osk5912.c
··· 38 38 static int osk_hw_params(struct snd_pcm_substream *substream, 39 39 struct snd_pcm_hw_params *params) 40 40 { 41 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 42 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 41 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 42 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 43 43 int err; 44 44 45 45 /* Set the codec system clock for DAC and ADC */
+3 -3
sound/soc/ti/rx51.c
··· 90 90 static int rx51_startup(struct snd_pcm_substream *substream) 91 91 { 92 92 struct snd_pcm_runtime *runtime = substream->runtime; 93 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 93 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 94 94 struct snd_soc_card *card = rtd->card; 95 95 96 96 snd_pcm_hw_constraint_single(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 2); ··· 102 102 static int rx51_hw_params(struct snd_pcm_substream *substream, 103 103 struct snd_pcm_hw_params *params) 104 104 { 105 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 106 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 105 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 106 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 107 107 108 108 /* Set the codec system clock for DAC and ADC */ 109 109 return snd_soc_dai_set_sysclk(codec_dai, 0, 19200000,
+11 -11
sound/soc/uniphier/aio-compress.c
··· 25 25 { 26 26 struct snd_compr *compr = rtd->compr; 27 27 struct device *dev = compr->card->dev; 28 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 28 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 29 29 struct uniphier_aio_sub *sub = &aio->sub[compr->direction]; 30 30 size_t size = AUD_RING_SIZE; 31 31 int dma_dir = DMA_FROM_DEVICE, ret; ··· 58 58 { 59 59 struct snd_compr *compr = rtd->compr; 60 60 struct device *dev = compr->card->dev; 61 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 61 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 62 62 struct uniphier_aio_sub *sub = &aio->sub[compr->direction]; 63 63 int dma_dir = DMA_FROM_DEVICE; 64 64 ··· 76 76 struct snd_compr_stream *cstream) 77 77 { 78 78 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 79 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 79 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 80 80 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 81 81 int ret; 82 82 ··· 102 102 struct snd_compr_stream *cstream) 103 103 { 104 104 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 105 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 105 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 106 106 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 107 107 int ret; 108 108 ··· 123 123 struct snd_codec *params) 124 124 { 125 125 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 126 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 126 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 127 127 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 128 128 129 129 *params = sub->cparams.codec; ··· 136 136 struct snd_compr_params *params) 137 137 { 138 138 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 139 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 139 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 140 140 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 141 141 struct device *dev = &aio->chip->pdev->dev; 142 142 ··· 167 167 struct snd_compr_stream *cstream) 168 168 { 169 169 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 170 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 170 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 171 171 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 172 172 173 173 sub->setting = 0; ··· 180 180 { 181 181 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 182 182 struct snd_compr_runtime *runtime = cstream->runtime; 183 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 183 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 184 184 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 185 185 int bytes = runtime->fragment_size; 186 186 unsigned long flags; ··· 219 219 { 220 220 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 221 221 struct snd_compr_runtime *runtime = cstream->runtime; 222 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 222 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 223 223 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 224 224 struct device *dev = &aio->chip->pdev->dev; 225 225 int bytes = runtime->fragment_size, ret = 0; ··· 253 253 { 254 254 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 255 255 struct snd_compr_runtime *runtime = cstream->runtime; 256 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 256 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 257 257 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 258 258 int bytes = runtime->fragment_size; 259 259 unsigned long flags; ··· 328 328 struct snd_soc_pcm_runtime *rtd = cstream->private_data; 329 329 struct snd_compr_runtime *runtime = cstream->runtime; 330 330 struct device *carddev = rtd->compr->card->dev; 331 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 331 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 332 332 struct uniphier_aio_sub *sub = &aio->sub[cstream->direction]; 333 333 size_t cnt = min_t(size_t, count, aio_rb_space_to_end(sub) / 2); 334 334 int bytes = runtime->fragment_size;
+6 -6
sound/soc/uniphier/aio-dma.c
··· 108 108 struct snd_pcm_substream *substream) 109 109 { 110 110 struct snd_pcm_runtime *runtime = substream->runtime; 111 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 112 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 111 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 112 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 113 113 struct uniphier_aio_sub *sub = &aio->sub[substream->stream]; 114 114 int bytes = runtime->period_size * 115 115 runtime->channels * samples_to_bytes(runtime, 1); ··· 135 135 struct snd_pcm_substream *substream, int cmd) 136 136 { 137 137 struct snd_pcm_runtime *runtime = substream->runtime; 138 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 139 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 138 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 139 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 140 140 struct uniphier_aio_sub *sub = &aio->sub[substream->stream]; 141 141 struct device *dev = &aio->chip->pdev->dev; 142 142 int bytes = runtime->period_size * ··· 171 171 struct snd_pcm_substream *substream) 172 172 { 173 173 struct snd_pcm_runtime *runtime = substream->runtime; 174 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 175 - struct uniphier_aio *aio = uniphier_priv(asoc_rtd_to_cpu(rtd, 0)); 174 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 175 + struct uniphier_aio *aio = uniphier_priv(snd_soc_rtd_to_cpu(rtd, 0)); 176 176 struct uniphier_aio_sub *sub = &aio->sub[substream->stream]; 177 177 int bytes = runtime->period_size * 178 178 runtime->channels * samples_to_bytes(runtime, 1);
+7 -7
sound/soc/ux500/mop500_ab8500.c
··· 188 188 189 189 static int mop500_ab8500_startup(struct snd_pcm_substream *substream) 190 190 { 191 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 191 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 192 192 193 193 /* Set audio-clock source */ 194 194 return mop500_ab8500_set_mclk(rtd->card->dev, ··· 197 197 198 198 static void mop500_ab8500_shutdown(struct snd_pcm_substream *substream) 199 199 { 200 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 200 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 201 201 struct device *dev = rtd->card->dev; 202 202 203 203 dev_dbg(dev, "%s: Enter\n", __func__); ··· 212 212 static int mop500_ab8500_hw_params(struct snd_pcm_substream *substream, 213 213 struct snd_pcm_hw_params *params) 214 214 { 215 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 216 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 217 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 215 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 216 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 217 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 218 218 struct device *dev = rtd->card->dev; 219 219 unsigned int fmt; 220 220 int channels, ret = 0, driver_mode, slots; ··· 336 336 337 337 static int mop500_ab8500_hw_free(struct snd_pcm_substream *substream) 338 338 { 339 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 340 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 339 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 340 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 341 341 342 342 mutex_lock(&mop500_ab8500_params_lock); 343 343 __clear_bit(cpu_dai->id, &mop500_ab8500_usage);
+2 -2
sound/soc/ux500/ux500_pcm.c
··· 32 32 struct snd_pcm_hw_params *params, 33 33 struct dma_slave_config *slave_config) 34 34 { 35 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 35 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 36 36 struct snd_dmaengine_dai_dma_data *snd_dma_params; 37 37 dma_addr_t dma_addr; 38 38 int ret; 39 39 40 - snd_dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 40 + snd_dma_params = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 41 41 dma_addr = snd_dma_params->addr; 42 42 43 43 ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config);
+2 -2
sound/soc/xtensa/xtfpga-i2s.c
··· 369 369 struct snd_pcm_substream *substream) 370 370 { 371 371 struct snd_pcm_runtime *runtime = substream->runtime; 372 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 372 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 373 373 void *p; 374 374 375 375 snd_soc_set_runtime_hwparams(substream, &xtfpga_pcm_hardware); 376 - p = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 376 + p = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 377 377 runtime->private_data = p; 378 378 379 379 return 0;