Kuninori Morimoto | d613a7f | 2018-07-02 06:30:44 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 |
| 2 | * |
Kuninori Morimoto | 29a43aa | 2016-12-02 05:27:30 +0000 | [diff] [blame] | 3 | * simple_card_utils.h |
Kuninori Morimoto | abd3147 | 2016-05-31 09:00:14 +0000 | [diff] [blame] | 4 | * |
| 5 | * Copyright (c) 2016 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
Kuninori Morimoto | abd3147 | 2016-05-31 09:00:14 +0000 | [diff] [blame] | 6 | */ |
Kuninori Morimoto | d613a7f | 2018-07-02 06:30:44 +0000 | [diff] [blame] | 7 | |
Kuninori Morimoto | 29a43aa | 2016-12-02 05:27:30 +0000 | [diff] [blame] | 8 | #ifndef __SIMPLE_CARD_UTILS_H |
| 9 | #define __SIMPLE_CARD_UTILS_H |
Kuninori Morimoto | abd3147 | 2016-05-31 09:00:14 +0000 | [diff] [blame] | 10 | |
Daniel Baluta | 4bbee14 | 2019-10-09 18:36:14 +0300 | [diff] [blame] | 11 | #include <linux/clk.h> |
Kuninori Morimoto | abd3147 | 2016-05-31 09:00:14 +0000 | [diff] [blame] | 12 | #include <sound/soc.h> |
| 13 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 14 | #define asoc_simple_init_hp(card, sjack, prefix) \ |
Shengjiu Wang | 764aafd | 2020-07-15 22:09:37 +0800 | [diff] [blame] | 15 | asoc_simple_init_jack(card, sjack, 1, prefix, NULL) |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 16 | #define asoc_simple_init_mic(card, sjack, prefix) \ |
Shengjiu Wang | 764aafd | 2020-07-15 22:09:37 +0800 | [diff] [blame] | 17 | asoc_simple_init_jack(card, sjack, 0, prefix, NULL) |
Katsuhiro Suzuki | 62c2c9f | 2018-06-11 17:32:12 +0900 | [diff] [blame] | 18 | |
Kuninori Morimoto | cecdef3 | 2016-06-30 06:02:46 +0000 | [diff] [blame] | 19 | struct asoc_simple_dai { |
| 20 | const char *name; |
| 21 | unsigned int sysclk; |
Vitaly Wool | a728f56 | 2017-08-17 13:42:36 +0200 | [diff] [blame] | 22 | int clk_direction; |
Kuninori Morimoto | cecdef3 | 2016-06-30 06:02:46 +0000 | [diff] [blame] | 23 | int slots; |
| 24 | int slot_width; |
| 25 | unsigned int tx_slot_mask; |
| 26 | unsigned int rx_slot_mask; |
| 27 | struct clk *clk; |
| 28 | }; |
| 29 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 30 | struct asoc_simple_data { |
Kuninori Morimoto | 13bb1cc | 2017-06-15 00:24:09 +0000 | [diff] [blame] | 31 | u32 convert_rate; |
| 32 | u32 convert_channels; |
| 33 | }; |
| 34 | |
Katsuhiro Suzuki | 62c2c9f | 2018-06-11 17:32:12 +0900 | [diff] [blame] | 35 | struct asoc_simple_jack { |
| 36 | struct snd_soc_jack jack; |
| 37 | struct snd_soc_jack_pin pin; |
| 38 | struct snd_soc_jack_gpio gpio; |
| 39 | }; |
| 40 | |
Kuninori Morimoto | f2138aed | 2021-04-01 13:15:23 +0900 | [diff] [blame] | 41 | struct prop_nums { |
| 42 | int cpus; |
| 43 | int codecs; |
| 44 | int platforms; |
| 45 | }; |
| 46 | |
Kuninori Morimoto | e59289c | 2019-03-20 13:54:59 +0900 | [diff] [blame] | 47 | struct asoc_simple_priv { |
| 48 | struct snd_soc_card snd_card; |
| 49 | struct simple_dai_props { |
| 50 | struct asoc_simple_dai *cpu_dai; |
| 51 | struct asoc_simple_dai *codec_dai; |
Kuninori Morimoto | 050c795 | 2021-03-26 12:26:06 +0900 | [diff] [blame] | 52 | struct snd_soc_dai_link_component *cpus; |
| 53 | struct snd_soc_dai_link_component *codecs; |
| 54 | struct snd_soc_dai_link_component *platforms; |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 55 | struct asoc_simple_data adata; |
Kuninori Morimoto | e59289c | 2019-03-20 13:54:59 +0900 | [diff] [blame] | 56 | struct snd_soc_codec_conf *codec_conf; |
Kuninori Morimoto | f2138aed | 2021-04-01 13:15:23 +0900 | [diff] [blame] | 57 | struct prop_nums num; |
Kuninori Morimoto | e59289c | 2019-03-20 13:54:59 +0900 | [diff] [blame] | 58 | unsigned int mclk_fs; |
| 59 | } *dai_props; |
| 60 | struct asoc_simple_jack hp_jack; |
| 61 | struct asoc_simple_jack mic_jack; |
| 62 | struct snd_soc_dai_link *dai_link; |
| 63 | struct asoc_simple_dai *dais; |
Kuninori Morimoto | 050c795 | 2021-03-26 12:26:06 +0900 | [diff] [blame] | 64 | struct snd_soc_dai_link_component *dlcs; |
Kuninori Morimoto | 205eb17 | 2021-04-01 13:15:33 +0900 | [diff] [blame] | 65 | struct snd_soc_dai_link_component dummy; |
Kuninori Morimoto | e59289c | 2019-03-20 13:54:59 +0900 | [diff] [blame] | 66 | struct snd_soc_codec_conf *codec_conf; |
| 67 | struct gpio_desc *pa_gpio; |
Sameer Pujar | d09c774 | 2020-11-02 20:40:13 +0530 | [diff] [blame] | 68 | const struct snd_soc_ops *ops; |
| 69 | unsigned int dpcm_selectable:1; |
| 70 | unsigned int force_dpcm:1; |
Kuninori Morimoto | e59289c | 2019-03-20 13:54:59 +0900 | [diff] [blame] | 71 | }; |
| 72 | #define simple_priv_to_card(priv) (&(priv)->snd_card) |
| 73 | #define simple_priv_to_props(priv, i) ((priv)->dai_props + (i)) |
| 74 | #define simple_priv_to_dev(priv) (simple_priv_to_card(priv)->dev) |
| 75 | #define simple_priv_to_link(priv, i) (simple_priv_to_card(priv)->dai_link + (i)) |
| 76 | |
Kuninori Morimoto | 9830d3e | 2021-04-12 08:52:32 +0900 | [diff] [blame] | 77 | #define simple_props_to_dlc_cpu(props, i) ((props)->cpus + i) |
| 78 | #define simple_props_to_dlc_codec(props, i) ((props)->codecs + i) |
| 79 | #define simple_props_to_dlc_platform(props, i) ((props)->platforms + i) |
| 80 | |
| 81 | #define simple_props_to_dai_cpu(props, i) ((props)->cpu_dai + i) |
| 82 | #define simple_props_to_dai_codec(props, i) ((props)->codec_dai + i) |
| 83 | #define simple_props_to_codec_conf(props, i) ((props)->codec_conf + i) |
| 84 | |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 85 | #define for_each_prop_dlc_cpus(props, i, cpu) \ |
| 86 | for ((i) = 0; \ |
Kuninori Morimoto | 9830d3e | 2021-04-12 08:52:32 +0900 | [diff] [blame] | 87 | ((i) < (props)->num.cpus) && \ |
| 88 | ((cpu) = simple_props_to_dlc_cpu(props, i)); \ |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 89 | (i)++) |
Kuninori Morimoto | 9830d3e | 2021-04-12 08:52:32 +0900 | [diff] [blame] | 90 | #define for_each_prop_dlc_codecs(props, i, codec) \ |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 91 | for ((i) = 0; \ |
Kuninori Morimoto | 9830d3e | 2021-04-12 08:52:32 +0900 | [diff] [blame] | 92 | ((i) < (props)->num.codecs) && \ |
| 93 | ((codec) = simple_props_to_dlc_codec(props, i)); \ |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 94 | (i)++) |
| 95 | #define for_each_prop_dlc_platforms(props, i, platform) \ |
| 96 | for ((i) = 0; \ |
Kuninori Morimoto | 9830d3e | 2021-04-12 08:52:32 +0900 | [diff] [blame] | 97 | ((i) < (props)->num.platforms) && \ |
| 98 | ((platform) = simple_props_to_dlc_platform(props, i)); \ |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 99 | (i)++) |
| 100 | #define for_each_prop_codec_conf(props, i, conf) \ |
| 101 | for ((i) = 0; \ |
| 102 | ((i) < (props)->num.codecs) && \ |
| 103 | (props)->codec_conf && \ |
Kuninori Morimoto | 9830d3e | 2021-04-12 08:52:32 +0900 | [diff] [blame] | 104 | ((conf) = simple_props_to_codec_conf(props, i)); \ |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 105 | (i)++) |
| 106 | |
| 107 | #define for_each_prop_dai_cpu(props, i, cpu) \ |
| 108 | for ((i) = 0; \ |
Kuninori Morimoto | 9830d3e | 2021-04-12 08:52:32 +0900 | [diff] [blame] | 109 | ((i) < (props)->num.cpus) && \ |
| 110 | ((cpu) = simple_props_to_dai_cpu(props, i)); \ |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 111 | (i)++) |
| 112 | #define for_each_prop_dai_codec(props, i, codec) \ |
| 113 | for ((i) = 0; \ |
Kuninori Morimoto | 9830d3e | 2021-04-12 08:52:32 +0900 | [diff] [blame] | 114 | ((i) < (props)->num.codecs) && \ |
| 115 | ((codec) = simple_props_to_dai_codec(props, i)); \ |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 116 | (i)++) |
| 117 | |
Thierry Reding | 343e55e | 2021-04-16 09:11:47 +0200 | [diff] [blame] | 118 | #define SNDRV_MAX_LINKS 128 |
| 119 | |
Kuninori Morimoto | 65a5056 | 2019-03-20 13:56:26 +0900 | [diff] [blame] | 120 | struct link_info { |
Kuninori Morimoto | 65a5056 | 2019-03-20 13:56:26 +0900 | [diff] [blame] | 121 | int link; /* number of link */ |
Kuninori Morimoto | 65a5056 | 2019-03-20 13:56:26 +0900 | [diff] [blame] | 122 | int cpu; /* turn for CPU / Codec */ |
Thierry Reding | 343e55e | 2021-04-16 09:11:47 +0200 | [diff] [blame] | 123 | struct prop_nums num[SNDRV_MAX_LINKS]; |
Kuninori Morimoto | 65a5056 | 2019-03-20 13:56:26 +0900 | [diff] [blame] | 124 | }; |
| 125 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 126 | int asoc_simple_parse_daifmt(struct device *dev, |
| 127 | struct device_node *node, |
| 128 | struct device_node *codec, |
| 129 | char *prefix, |
| 130 | unsigned int *retfmt); |
Nicolas Iooss | e5668ca | 2016-08-23 10:51:22 +0200 | [diff] [blame] | 131 | __printf(3, 4) |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 132 | int asoc_simple_set_dailink_name(struct device *dev, |
| 133 | struct snd_soc_dai_link *dai_link, |
| 134 | const char *fmt, ...); |
| 135 | int asoc_simple_parse_card_name(struct snd_soc_card *card, |
| 136 | char *prefix); |
Kuninori Morimoto | abd3147 | 2016-05-31 09:00:14 +0000 | [diff] [blame] | 137 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 138 | int asoc_simple_parse_clk(struct device *dev, |
| 139 | struct device_node *node, |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 140 | struct asoc_simple_dai *simple_dai, |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 141 | struct snd_soc_dai_link_component *dlc); |
Kuninori Morimoto | f38df5b | 2019-03-20 13:55:14 +0900 | [diff] [blame] | 142 | int asoc_simple_startup(struct snd_pcm_substream *substream); |
Kuninori Morimoto | 686911b | 2019-03-20 13:55:27 +0900 | [diff] [blame] | 143 | void asoc_simple_shutdown(struct snd_pcm_substream *substream); |
Kuninori Morimoto | f48dcbb | 2019-03-20 13:55:39 +0900 | [diff] [blame] | 144 | int asoc_simple_hw_params(struct snd_pcm_substream *substream, |
| 145 | struct snd_pcm_hw_params *params); |
Kuninori Morimoto | ad934ca | 2019-03-20 13:55:52 +0900 | [diff] [blame] | 146 | int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd); |
Kuninori Morimoto | 629f754 | 2019-03-20 13:56:06 +0900 | [diff] [blame] | 147 | int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, |
| 148 | struct snd_pcm_hw_params *params); |
Kuninori Morimoto | bb6fc62 | 2016-08-08 05:59:56 +0000 | [diff] [blame] | 149 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 150 | #define asoc_simple_parse_tdm(np, dai) \ |
Kuninori Morimoto | e68ba20 | 2017-06-14 00:34:35 +0000 | [diff] [blame] | 151 | snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \ |
| 152 | &(dai)->rx_slot_mask, \ |
| 153 | &(dai)->slots, \ |
| 154 | &(dai)->slot_width); |
| 155 | |
Kuninori Morimoto | c826ec03 | 2021-04-12 08:52:45 +0900 | [diff] [blame] | 156 | void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms, |
| 157 | struct snd_soc_dai_link_component *cpus); |
| 158 | void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, |
| 159 | int is_single_links); |
Kuninori Morimoto | c262c9a | 2016-08-09 05:49:41 +0000 | [diff] [blame] | 160 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 161 | int asoc_simple_clean_reference(struct snd_soc_card *card); |
Kuninori Morimoto | 0f4e071 | 2016-08-10 02:21:25 +0000 | [diff] [blame] | 162 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 163 | void asoc_simple_convert_fixup(struct asoc_simple_data *data, |
Kuninori Morimoto | 13bb1cc | 2017-06-15 00:24:09 +0000 | [diff] [blame] | 164 | struct snd_pcm_hw_params *params); |
Kuninori Morimoto | fcfd763 | 2021-04-12 08:53:00 +0900 | [diff] [blame] | 165 | void asoc_simple_parse_convert(struct device_node *np, char *prefix, |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 166 | struct asoc_simple_data *data); |
Kuninori Morimoto | 13bb1cc | 2017-06-15 00:24:09 +0000 | [diff] [blame] | 167 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 168 | int asoc_simple_parse_routing(struct snd_soc_card *card, |
Kuninori Morimoto | 33404f3 | 2018-11-21 02:11:13 +0000 | [diff] [blame] | 169 | char *prefix); |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 170 | int asoc_simple_parse_widgets(struct snd_soc_card *card, |
Kuninori Morimoto | b31f11d | 2017-06-16 01:38:50 +0000 | [diff] [blame] | 171 | char *prefix); |
Paul Cercueil | 9019428 | 2019-04-26 04:25:49 +0200 | [diff] [blame] | 172 | int asoc_simple_parse_pin_switches(struct snd_soc_card *card, |
| 173 | char *prefix); |
Kuninori Morimoto | 3296d07 | 2017-06-15 00:25:02 +0000 | [diff] [blame] | 174 | |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 175 | int asoc_simple_init_jack(struct snd_soc_card *card, |
Katsuhiro Suzuki | 62c2c9f | 2018-06-11 17:32:12 +0900 | [diff] [blame] | 176 | struct asoc_simple_jack *sjack, |
Shengjiu Wang | 764aafd | 2020-07-15 22:09:37 +0800 | [diff] [blame] | 177 | int is_hp, char *prefix, char *pin); |
Kuninori Morimoto | ad11e59 | 2019-03-20 13:56:50 +0900 | [diff] [blame] | 178 | int asoc_simple_init_priv(struct asoc_simple_priv *priv, |
Kuninori Morimoto | 65a5056 | 2019-03-20 13:56:26 +0900 | [diff] [blame] | 179 | struct link_info *li); |
Kuninori Morimoto | f6fcc82 | 2021-04-19 11:02:25 +0900 | [diff] [blame] | 180 | int asoc_simple_remove(struct platform_device *pdev); |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 181 | |
Kuninori Morimoto | 1a456b1 | 2021-04-19 11:02:19 +0900 | [diff] [blame] | 182 | int asoc_graph_card_probe(struct snd_soc_card *card); |
| 183 | |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 184 | #ifdef DEBUG |
Daniel Baluta | af621959 | 2019-10-09 18:36:15 +0300 | [diff] [blame] | 185 | static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, |
| 186 | char *name, |
| 187 | struct asoc_simple_dai *dai) |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 188 | { |
| 189 | struct device *dev = simple_priv_to_dev(priv); |
| 190 | |
Kuninori Morimoto | 52db668 | 2019-07-10 16:59:55 +0900 | [diff] [blame] | 191 | /* dai might be NULL */ |
| 192 | if (!dai) |
| 193 | return; |
| 194 | |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 195 | if (dai->name) |
| 196 | dev_dbg(dev, "%s dai name = %s\n", |
| 197 | name, dai->name); |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 198 | |
| 199 | if (dai->slots) |
| 200 | dev_dbg(dev, "%s slots = %d\n", name, dai->slots); |
| 201 | if (dai->slot_width) |
| 202 | dev_dbg(dev, "%s slot width = %d\n", name, dai->slot_width); |
| 203 | if (dai->tx_slot_mask) |
| 204 | dev_dbg(dev, "%s tx slot mask = %d\n", name, dai->tx_slot_mask); |
| 205 | if (dai->rx_slot_mask) |
| 206 | dev_dbg(dev, "%s rx slot mask = %d\n", name, dai->rx_slot_mask); |
| 207 | if (dai->clk) |
| 208 | dev_dbg(dev, "%s clk %luHz\n", name, clk_get_rate(dai->clk)); |
Kuninori Morimoto | 33cd6b1 | 2021-04-12 08:52:50 +0900 | [diff] [blame] | 209 | if (dai->sysclk) |
| 210 | dev_dbg(dev, "%s sysclk = %dHz\n", |
| 211 | name, dai->sysclk); |
| 212 | if (dai->clk || dai->sysclk) |
| 213 | dev_dbg(dev, "%s direction = %s\n", |
| 214 | name, dai->clk_direction ? "OUT" : "IN"); |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 215 | } |
| 216 | |
Daniel Baluta | af621959 | 2019-10-09 18:36:15 +0300 | [diff] [blame] | 217 | static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv) |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 218 | { |
| 219 | struct snd_soc_card *card = simple_priv_to_card(priv); |
| 220 | struct device *dev = simple_priv_to_dev(priv); |
| 221 | |
| 222 | int i; |
| 223 | |
| 224 | if (card->name) |
| 225 | dev_dbg(dev, "Card Name: %s\n", card->name); |
| 226 | |
| 227 | for (i = 0; i < card->num_links; i++) { |
| 228 | struct simple_dai_props *props = simple_priv_to_props(priv, i); |
| 229 | struct snd_soc_dai_link *link = simple_priv_to_link(priv, i); |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 230 | struct asoc_simple_dai *dai; |
| 231 | struct snd_soc_codec_conf *cnf; |
| 232 | int j; |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 233 | |
| 234 | dev_dbg(dev, "DAI%d\n", i); |
| 235 | |
Kuninori Morimoto | 40d8cbe | 2021-04-12 08:52:27 +0900 | [diff] [blame] | 236 | dev_dbg(dev, "cpu num = %d\n", link->num_cpus); |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 237 | for_each_prop_dai_cpu(props, j, dai) |
| 238 | asoc_simple_debug_dai(priv, "cpu", dai); |
Kuninori Morimoto | 40d8cbe | 2021-04-12 08:52:27 +0900 | [diff] [blame] | 239 | dev_dbg(dev, "codec num = %d\n", link->num_codecs); |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 240 | for_each_prop_dai_codec(props, j, dai) |
| 241 | asoc_simple_debug_dai(priv, "codec", dai); |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 242 | |
| 243 | if (link->name) |
| 244 | dev_dbg(dev, "dai name = %s\n", link->name); |
Kuninori Morimoto | ac813c6 | 2021-04-12 08:52:23 +0900 | [diff] [blame] | 245 | if (link->dai_fmt) |
| 246 | dev_dbg(dev, "dai format = %04x\n", link->dai_fmt); |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 247 | if (props->adata.convert_rate) |
Kuninori Morimoto | 3919249 | 2021-04-12 08:52:55 +0900 | [diff] [blame] | 248 | dev_dbg(dev, "convert_rate = %d\n", props->adata.convert_rate); |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 249 | if (props->adata.convert_channels) |
Kuninori Morimoto | 3919249 | 2021-04-12 08:52:55 +0900 | [diff] [blame] | 250 | dev_dbg(dev, "convert_channels = %d\n", props->adata.convert_channels); |
Kuninori Morimoto | fafc05a | 2021-04-12 08:52:09 +0900 | [diff] [blame] | 251 | for_each_prop_codec_conf(props, j, cnf) |
| 252 | if (cnf->name_prefix) |
| 253 | dev_dbg(dev, "name prefix = %s\n", cnf->name_prefix); |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 254 | if (props->mclk_fs) |
Kuninori Morimoto | 3919249 | 2021-04-12 08:52:55 +0900 | [diff] [blame] | 255 | dev_dbg(dev, "mclk-fs = %d\n", props->mclk_fs); |
Kuninori Morimoto | 0580dde | 2019-03-20 13:54:42 +0900 | [diff] [blame] | 256 | } |
| 257 | } |
| 258 | #else |
| 259 | #define asoc_simple_debug_info(priv) |
| 260 | #endif /* DEBUG */ |
| 261 | |
Kuninori Morimoto | 29a43aa | 2016-12-02 05:27:30 +0000 | [diff] [blame] | 262 | #endif /* __SIMPLE_CARD_UTILS_H */ |