2018-07-02 06:30:44 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0
|
|
|
|
*
|
2016-12-02 05:27:30 +00:00
|
|
|
* simple_card_utils.h
|
2016-05-31 09:00:14 +00:00
|
|
|
*
|
|
|
|
* Copyright (c) 2016 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
|
|
|
*/
|
2018-07-02 06:30:44 +00:00
|
|
|
|
2016-12-02 05:27:30 +00:00
|
|
|
#ifndef __SIMPLE_CARD_UTILS_H
|
|
|
|
#define __SIMPLE_CARD_UTILS_H
|
2016-05-31 09:00:14 +00:00
|
|
|
|
2019-10-09 15:36:14 +00:00
|
|
|
#include <linux/clk.h>
|
2016-05-31 09:00:14 +00:00
|
|
|
#include <sound/soc.h>
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
#define simple_util_init_hp(card, sjack, prefix) \
|
|
|
|
simple_util_init_jack(card, sjack, 1, prefix, NULL)
|
|
|
|
#define simple_util_init_mic(card, sjack, prefix) \
|
|
|
|
simple_util_init_jack(card, sjack, 0, prefix, NULL)
|
|
|
|
|
|
|
|
struct simple_util_tdm_width_map {
|
2022-02-28 17:27:54 +00:00
|
|
|
u8 sample_bits;
|
|
|
|
u8 slot_count;
|
|
|
|
u16 slot_width;
|
|
|
|
};
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_dai {
|
2016-06-30 06:02:46 +00:00
|
|
|
const char *name;
|
|
|
|
unsigned int sysclk;
|
2017-08-17 11:42:36 +00:00
|
|
|
int clk_direction;
|
2016-06-30 06:02:46 +00:00
|
|
|
int slots;
|
|
|
|
int slot_width;
|
|
|
|
unsigned int tx_slot_mask;
|
|
|
|
unsigned int rx_slot_mask;
|
|
|
|
struct clk *clk;
|
2022-01-20 19:58:32 +00:00
|
|
|
bool clk_fixed;
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_tdm_width_map *tdm_width_map;
|
2022-02-28 17:27:54 +00:00
|
|
|
int n_tdm_widths;
|
2016-06-30 06:02:46 +00:00
|
|
|
};
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_data {
|
2017-06-15 00:24:09 +00:00
|
|
|
u32 convert_rate;
|
|
|
|
u32 convert_channels;
|
2022-08-08 05:27:32 +00:00
|
|
|
const char *convert_sample_format;
|
2017-06-15 00:24:09 +00:00
|
|
|
};
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_jack {
|
2018-06-11 08:32:12 +00:00
|
|
|
struct snd_soc_jack jack;
|
|
|
|
struct snd_soc_jack_pin pin;
|
|
|
|
struct snd_soc_jack_gpio gpio;
|
|
|
|
};
|
|
|
|
|
2021-04-01 04:15:23 +00:00
|
|
|
struct prop_nums {
|
|
|
|
int cpus;
|
|
|
|
int codecs;
|
|
|
|
int platforms;
|
|
|
|
};
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_priv {
|
ASoC: simple_card_utils: share common priv for simple-card/audio-graph
Historically, simple-card/simple-scu-card/audio-graph/audio-graph-scu
are similar but different generic sound card.
simple-scu-card which was for DPCM was merged into simple-card, and
audio-graph-scu which was for DPCM was merged into audio-graph.
simple-card is for non OF graph sound card, and
audio-graph is for OF graph sound card.
And, small detail difference (= function parameter, naming, etc)
between simple-card/audio-graph has been unified.
So today, the difference between simple-card/audio-graph are
just using OF graph style, or not.
In other words, there should no difference other than OF graph sytle.
simple-card/audio-graph are using own priv today , but we can merge it.
This patch merge it at simple_card_utils.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-20 04:54:59 +00:00
|
|
|
struct snd_soc_card snd_card;
|
|
|
|
struct simple_dai_props {
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_dai *cpu_dai;
|
|
|
|
struct simple_util_dai *codec_dai;
|
|
|
|
struct simple_util_data adata;
|
ASoC: simple_card_utils: share common priv for simple-card/audio-graph
Historically, simple-card/simple-scu-card/audio-graph/audio-graph-scu
are similar but different generic sound card.
simple-scu-card which was for DPCM was merged into simple-card, and
audio-graph-scu which was for DPCM was merged into audio-graph.
simple-card is for non OF graph sound card, and
audio-graph is for OF graph sound card.
And, small detail difference (= function parameter, naming, etc)
between simple-card/audio-graph has been unified.
So today, the difference between simple-card/audio-graph are
just using OF graph style, or not.
In other words, there should no difference other than OF graph sytle.
simple-card/audio-graph are using own priv today , but we can merge it.
This patch merge it at simple_card_utils.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-20 04:54:59 +00:00
|
|
|
struct snd_soc_codec_conf *codec_conf;
|
2021-04-01 04:15:23 +00:00
|
|
|
struct prop_nums num;
|
ASoC: simple_card_utils: share common priv for simple-card/audio-graph
Historically, simple-card/simple-scu-card/audio-graph/audio-graph-scu
are similar but different generic sound card.
simple-scu-card which was for DPCM was merged into simple-card, and
audio-graph-scu which was for DPCM was merged into audio-graph.
simple-card is for non OF graph sound card, and
audio-graph is for OF graph sound card.
And, small detail difference (= function parameter, naming, etc)
between simple-card/audio-graph has been unified.
So today, the difference between simple-card/audio-graph are
just using OF graph style, or not.
In other words, there should no difference other than OF graph sytle.
simple-card/audio-graph are using own priv today , but we can merge it.
This patch merge it at simple_card_utils.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-20 04:54:59 +00:00
|
|
|
unsigned int mclk_fs;
|
|
|
|
} *dai_props;
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_jack hp_jack;
|
|
|
|
struct simple_util_jack mic_jack;
|
2023-01-23 13:59:12 +00:00
|
|
|
struct snd_soc_jack *aux_jacks;
|
ASoC: simple_card_utils: share common priv for simple-card/audio-graph
Historically, simple-card/simple-scu-card/audio-graph/audio-graph-scu
are similar but different generic sound card.
simple-scu-card which was for DPCM was merged into simple-card, and
audio-graph-scu which was for DPCM was merged into audio-graph.
simple-card is for non OF graph sound card, and
audio-graph is for OF graph sound card.
And, small detail difference (= function parameter, naming, etc)
between simple-card/audio-graph has been unified.
So today, the difference between simple-card/audio-graph are
just using OF graph style, or not.
In other words, there should no difference other than OF graph sytle.
simple-card/audio-graph are using own priv today , but we can merge it.
This patch merge it at simple_card_utils.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-20 04:54:59 +00:00
|
|
|
struct snd_soc_dai_link *dai_link;
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_dai *dais;
|
2021-03-26 03:26:06 +00:00
|
|
|
struct snd_soc_dai_link_component *dlcs;
|
ASoC: simple_card_utils: share common priv for simple-card/audio-graph
Historically, simple-card/simple-scu-card/audio-graph/audio-graph-scu
are similar but different generic sound card.
simple-scu-card which was for DPCM was merged into simple-card, and
audio-graph-scu which was for DPCM was merged into audio-graph.
simple-card is for non OF graph sound card, and
audio-graph is for OF graph sound card.
And, small detail difference (= function parameter, naming, etc)
between simple-card/audio-graph has been unified.
So today, the difference between simple-card/audio-graph are
just using OF graph style, or not.
In other words, there should no difference other than OF graph sytle.
simple-card/audio-graph are using own priv today , but we can merge it.
This patch merge it at simple_card_utils.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-20 04:54:59 +00:00
|
|
|
struct snd_soc_codec_conf *codec_conf;
|
|
|
|
struct gpio_desc *pa_gpio;
|
2020-11-02 15:10:13 +00:00
|
|
|
const struct snd_soc_ops *ops;
|
|
|
|
unsigned int dpcm_selectable:1;
|
|
|
|
unsigned int force_dpcm:1;
|
ASoC: simple_card_utils: share common priv for simple-card/audio-graph
Historically, simple-card/simple-scu-card/audio-graph/audio-graph-scu
are similar but different generic sound card.
simple-scu-card which was for DPCM was merged into simple-card, and
audio-graph-scu which was for DPCM was merged into audio-graph.
simple-card is for non OF graph sound card, and
audio-graph is for OF graph sound card.
And, small detail difference (= function parameter, naming, etc)
between simple-card/audio-graph has been unified.
So today, the difference between simple-card/audio-graph are
just using OF graph style, or not.
In other words, there should no difference other than OF graph sytle.
simple-card/audio-graph are using own priv today , but we can merge it.
This patch merge it at simple_card_utils.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-20 04:54:59 +00:00
|
|
|
};
|
|
|
|
#define simple_priv_to_card(priv) (&(priv)->snd_card)
|
|
|
|
#define simple_priv_to_props(priv, i) ((priv)->dai_props + (i))
|
|
|
|
#define simple_priv_to_dev(priv) (simple_priv_to_card(priv)->dev)
|
|
|
|
#define simple_priv_to_link(priv, i) (simple_priv_to_card(priv)->dai_link + (i))
|
|
|
|
|
2021-04-11 23:52:32 +00:00
|
|
|
#define simple_props_to_dlc_cpu(props, i) ((props)->cpus + i)
|
|
|
|
#define simple_props_to_dlc_codec(props, i) ((props)->codecs + i)
|
|
|
|
#define simple_props_to_dlc_platform(props, i) ((props)->platforms + i)
|
|
|
|
|
|
|
|
#define simple_props_to_dai_cpu(props, i) ((props)->cpu_dai + i)
|
|
|
|
#define simple_props_to_dai_codec(props, i) ((props)->codec_dai + i)
|
|
|
|
#define simple_props_to_codec_conf(props, i) ((props)->codec_conf + i)
|
|
|
|
|
2021-04-11 23:52:09 +00:00
|
|
|
#define for_each_prop_dlc_cpus(props, i, cpu) \
|
|
|
|
for ((i) = 0; \
|
2021-04-11 23:52:32 +00:00
|
|
|
((i) < (props)->num.cpus) && \
|
|
|
|
((cpu) = simple_props_to_dlc_cpu(props, i)); \
|
2021-04-11 23:52:09 +00:00
|
|
|
(i)++)
|
2021-04-11 23:52:32 +00:00
|
|
|
#define for_each_prop_dlc_codecs(props, i, codec) \
|
2021-04-11 23:52:09 +00:00
|
|
|
for ((i) = 0; \
|
2021-04-11 23:52:32 +00:00
|
|
|
((i) < (props)->num.codecs) && \
|
|
|
|
((codec) = simple_props_to_dlc_codec(props, i)); \
|
2021-04-11 23:52:09 +00:00
|
|
|
(i)++)
|
|
|
|
#define for_each_prop_dlc_platforms(props, i, platform) \
|
|
|
|
for ((i) = 0; \
|
2021-04-11 23:52:32 +00:00
|
|
|
((i) < (props)->num.platforms) && \
|
|
|
|
((platform) = simple_props_to_dlc_platform(props, i)); \
|
2021-04-11 23:52:09 +00:00
|
|
|
(i)++)
|
|
|
|
#define for_each_prop_codec_conf(props, i, conf) \
|
|
|
|
for ((i) = 0; \
|
|
|
|
((i) < (props)->num.codecs) && \
|
|
|
|
(props)->codec_conf && \
|
2021-04-11 23:52:32 +00:00
|
|
|
((conf) = simple_props_to_codec_conf(props, i)); \
|
2021-04-11 23:52:09 +00:00
|
|
|
(i)++)
|
|
|
|
|
|
|
|
#define for_each_prop_dai_cpu(props, i, cpu) \
|
|
|
|
for ((i) = 0; \
|
2021-04-11 23:52:32 +00:00
|
|
|
((i) < (props)->num.cpus) && \
|
|
|
|
((cpu) = simple_props_to_dai_cpu(props, i)); \
|
2021-04-11 23:52:09 +00:00
|
|
|
(i)++)
|
|
|
|
#define for_each_prop_dai_codec(props, i, codec) \
|
|
|
|
for ((i) = 0; \
|
2021-04-11 23:52:32 +00:00
|
|
|
((i) < (props)->num.codecs) && \
|
|
|
|
((codec) = simple_props_to_dai_codec(props, i)); \
|
2021-04-11 23:52:09 +00:00
|
|
|
(i)++)
|
|
|
|
|
2021-09-13 16:42:10 +00:00
|
|
|
#define SNDRV_MAX_LINKS 512
|
2021-04-16 07:11:47 +00:00
|
|
|
|
2019-03-20 04:56:26 +00:00
|
|
|
struct link_info {
|
|
|
|
int link; /* number of link */
|
|
|
|
int cpu; /* turn for CPU / Codec */
|
2021-04-16 07:11:47 +00:00
|
|
|
struct prop_nums num[SNDRV_MAX_LINKS];
|
2019-03-20 04:56:26 +00:00
|
|
|
};
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_parse_daifmt(struct device *dev,
|
2019-03-20 04:56:50 +00:00
|
|
|
struct device_node *node,
|
|
|
|
struct device_node *codec,
|
|
|
|
char *prefix,
|
|
|
|
unsigned int *retfmt);
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np,
|
|
|
|
struct simple_util_dai *dai);
|
2022-02-28 17:27:54 +00:00
|
|
|
|
2016-08-23 08:51:22 +00:00
|
|
|
__printf(3, 4)
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_set_dailink_name(struct device *dev,
|
2019-03-20 04:56:50 +00:00
|
|
|
struct snd_soc_dai_link *dai_link,
|
|
|
|
const char *fmt, ...);
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_parse_card_name(struct snd_soc_card *card,
|
2019-03-20 04:56:50 +00:00
|
|
|
char *prefix);
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_parse_clk(struct device *dev,
|
2019-03-20 04:56:50 +00:00
|
|
|
struct device_node *node,
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_dai *simple_dai,
|
2019-03-20 04:56:50 +00:00
|
|
|
struct snd_soc_dai_link_component *dlc);
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_startup(struct snd_pcm_substream *substream);
|
|
|
|
void simple_util_shutdown(struct snd_pcm_substream *substream);
|
|
|
|
int simple_util_hw_params(struct snd_pcm_substream *substream,
|
2019-03-20 04:55:39 +00:00
|
|
|
struct snd_pcm_hw_params *params);
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd);
|
|
|
|
int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|
2019-03-20 04:56:06 +00:00
|
|
|
struct snd_pcm_hw_params *params);
|
2016-08-08 05:59:56 +00:00
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
#define simple_util_parse_tdm(np, dai) \
|
2017-06-14 00:34:35 +00:00
|
|
|
snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \
|
|
|
|
&(dai)->rx_slot_mask, \
|
|
|
|
&(dai)->slots, \
|
|
|
|
&(dai)->slot_width);
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
void simple_util_canonicalize_platform(struct snd_soc_dai_link_component *platforms,
|
2021-04-11 23:52:45 +00:00
|
|
|
struct snd_soc_dai_link_component *cpus);
|
2023-09-11 23:47:09 +00:00
|
|
|
void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,
|
2021-04-11 23:52:45 +00:00
|
|
|
int is_single_links);
|
2016-08-09 05:49:41 +00:00
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
void simple_util_clean_reference(struct snd_soc_card *card);
|
2016-08-10 02:21:25 +00:00
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
void simple_util_parse_convert(struct device_node *np, char *prefix,
|
|
|
|
struct simple_util_data *data);
|
|
|
|
bool simple_util_is_convert_required(const struct simple_util_data *data);
|
2017-06-15 00:24:09 +00:00
|
|
|
|
2024-05-27 12:56:06 +00:00
|
|
|
int simple_util_get_sample_fmt(struct simple_util_data *data);
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_parse_routing(struct snd_soc_card *card,
|
2018-11-21 02:11:13 +00:00
|
|
|
char *prefix);
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_parse_widgets(struct snd_soc_card *card,
|
2017-06-16 01:38:50 +00:00
|
|
|
char *prefix);
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_parse_pin_switches(struct snd_soc_card *card,
|
2019-04-26 02:25:49 +00:00
|
|
|
char *prefix);
|
2017-06-15 00:25:02 +00:00
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_init_jack(struct snd_soc_card *card,
|
|
|
|
struct simple_util_jack *sjack,
|
2020-07-15 14:09:37 +00:00
|
|
|
int is_hp, char *prefix, char *pin);
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_init_aux_jacks(struct simple_util_priv *priv,
|
2023-01-23 13:59:12 +00:00
|
|
|
char *prefix);
|
2023-09-11 23:47:09 +00:00
|
|
|
int simple_util_init_priv(struct simple_util_priv *priv,
|
2019-03-20 04:56:26 +00:00
|
|
|
struct link_info *li);
|
2023-10-13 22:19:50 +00:00
|
|
|
void simple_util_remove(struct platform_device *pdev);
|
2019-03-20 04:54:42 +00:00
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
int graph_util_card_probe(struct snd_soc_card *card);
|
|
|
|
int graph_util_is_ports0(struct device_node *port);
|
|
|
|
int graph_util_parse_dai(struct device *dev, struct device_node *ep,
|
2023-07-10 01:20:22 +00:00
|
|
|
struct snd_soc_dai_link_component *dlc, int *is_single_link);
|
2021-04-19 02:02:19 +00:00
|
|
|
|
2024-05-28 05:05:14 +00:00
|
|
|
void graph_util_parse_link_direction(struct device_node *np,
|
2023-11-28 08:11:18 +00:00
|
|
|
bool *is_playback_only, bool *is_capture_only);
|
2024-06-12 06:02:33 +00:00
|
|
|
void graph_util_parse_trigger_order(struct simple_util_priv *priv,
|
|
|
|
struct device_node *np,
|
|
|
|
enum snd_soc_trigger_order *trigger_start,
|
|
|
|
enum snd_soc_trigger_order *trigger_stop);
|
2023-11-28 08:11:18 +00:00
|
|
|
|
2019-03-20 04:54:42 +00:00
|
|
|
#ifdef DEBUG
|
2023-09-11 23:47:09 +00:00
|
|
|
static inline void simple_util_debug_dai(struct simple_util_priv *priv,
|
2019-10-09 15:36:15 +00:00
|
|
|
char *name,
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_dai *dai)
|
2019-03-20 04:54:42 +00:00
|
|
|
{
|
|
|
|
struct device *dev = simple_priv_to_dev(priv);
|
|
|
|
|
2019-07-10 07:59:55 +00:00
|
|
|
/* dai might be NULL */
|
|
|
|
if (!dai)
|
|
|
|
return;
|
|
|
|
|
2019-03-20 04:54:42 +00:00
|
|
|
if (dai->name)
|
|
|
|
dev_dbg(dev, "%s dai name = %s\n",
|
|
|
|
name, dai->name);
|
|
|
|
|
|
|
|
if (dai->slots)
|
|
|
|
dev_dbg(dev, "%s slots = %d\n", name, dai->slots);
|
|
|
|
if (dai->slot_width)
|
|
|
|
dev_dbg(dev, "%s slot width = %d\n", name, dai->slot_width);
|
|
|
|
if (dai->tx_slot_mask)
|
|
|
|
dev_dbg(dev, "%s tx slot mask = %d\n", name, dai->tx_slot_mask);
|
|
|
|
if (dai->rx_slot_mask)
|
|
|
|
dev_dbg(dev, "%s rx slot mask = %d\n", name, dai->rx_slot_mask);
|
|
|
|
if (dai->clk)
|
|
|
|
dev_dbg(dev, "%s clk %luHz\n", name, clk_get_rate(dai->clk));
|
2021-04-11 23:52:50 +00:00
|
|
|
if (dai->sysclk)
|
|
|
|
dev_dbg(dev, "%s sysclk = %dHz\n",
|
|
|
|
name, dai->sysclk);
|
|
|
|
if (dai->clk || dai->sysclk)
|
|
|
|
dev_dbg(dev, "%s direction = %s\n",
|
|
|
|
name, dai->clk_direction ? "OUT" : "IN");
|
2019-03-20 04:54:42 +00:00
|
|
|
}
|
|
|
|
|
2023-09-11 23:47:09 +00:00
|
|
|
static inline void simple_util_debug_info(struct simple_util_priv *priv)
|
2019-03-20 04:54:42 +00:00
|
|
|
{
|
|
|
|
struct snd_soc_card *card = simple_priv_to_card(priv);
|
|
|
|
struct device *dev = simple_priv_to_dev(priv);
|
|
|
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (card->name)
|
|
|
|
dev_dbg(dev, "Card Name: %s\n", card->name);
|
|
|
|
|
|
|
|
for (i = 0; i < card->num_links; i++) {
|
|
|
|
struct simple_dai_props *props = simple_priv_to_props(priv, i);
|
|
|
|
struct snd_soc_dai_link *link = simple_priv_to_link(priv, i);
|
2023-09-11 23:47:09 +00:00
|
|
|
struct simple_util_dai *dai;
|
2021-04-11 23:52:09 +00:00
|
|
|
struct snd_soc_codec_conf *cnf;
|
|
|
|
int j;
|
2019-03-20 04:54:42 +00:00
|
|
|
|
|
|
|
dev_dbg(dev, "DAI%d\n", i);
|
|
|
|
|
2021-04-11 23:52:27 +00:00
|
|
|
dev_dbg(dev, "cpu num = %d\n", link->num_cpus);
|
2021-04-11 23:52:09 +00:00
|
|
|
for_each_prop_dai_cpu(props, j, dai)
|
2023-09-11 23:47:09 +00:00
|
|
|
simple_util_debug_dai(priv, "cpu", dai);
|
2021-04-11 23:52:27 +00:00
|
|
|
dev_dbg(dev, "codec num = %d\n", link->num_codecs);
|
2021-04-11 23:52:09 +00:00
|
|
|
for_each_prop_dai_codec(props, j, dai)
|
2023-09-11 23:47:09 +00:00
|
|
|
simple_util_debug_dai(priv, "codec", dai);
|
2019-03-20 04:54:42 +00:00
|
|
|
|
|
|
|
if (link->name)
|
|
|
|
dev_dbg(dev, "dai name = %s\n", link->name);
|
2021-04-11 23:52:23 +00:00
|
|
|
if (link->dai_fmt)
|
|
|
|
dev_dbg(dev, "dai format = %04x\n", link->dai_fmt);
|
2019-03-20 04:54:42 +00:00
|
|
|
if (props->adata.convert_rate)
|
2021-04-11 23:52:55 +00:00
|
|
|
dev_dbg(dev, "convert_rate = %d\n", props->adata.convert_rate);
|
2019-03-20 04:54:42 +00:00
|
|
|
if (props->adata.convert_channels)
|
2021-04-11 23:52:55 +00:00
|
|
|
dev_dbg(dev, "convert_channels = %d\n", props->adata.convert_channels);
|
2021-04-11 23:52:09 +00:00
|
|
|
for_each_prop_codec_conf(props, j, cnf)
|
|
|
|
if (cnf->name_prefix)
|
|
|
|
dev_dbg(dev, "name prefix = %s\n", cnf->name_prefix);
|
2019-03-20 04:54:42 +00:00
|
|
|
if (props->mclk_fs)
|
2021-04-11 23:52:55 +00:00
|
|
|
dev_dbg(dev, "mclk-fs = %d\n", props->mclk_fs);
|
2019-03-20 04:54:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
2023-09-11 23:47:09 +00:00
|
|
|
#define simple_util_debug_info(priv)
|
2019-03-20 04:54:42 +00:00
|
|
|
#endif /* DEBUG */
|
|
|
|
|
2016-12-02 05:27:30 +00:00
|
|
|
#endif /* __SIMPLE_CARD_UTILS_H */
|