Commit 1ef6ab75 authored by Mark Brown's avatar Mark Brown Committed by Jaroslav Kysela

[ALSA] ASoC: Make CPU and codec DAI operations have same type

The CPU and codec DAI operations differ only in the presence of the
digital mute operation for the codec so they may as well be the same
type.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent b2efbbfb
...@@ -272,9 +272,9 @@ struct snd_soc_ops { ...@@ -272,9 +272,9 @@ struct snd_soc_ops {
int (*trigger)(struct snd_pcm_substream *, int); int (*trigger)(struct snd_pcm_substream *, int);
}; };
/* ASoC codec DAI ops */ /* ASoC DAI ops */
struct snd_soc_codec_ops { struct snd_soc_dai_ops {
/* codec DAI clocking configuration */ /* DAI clocking configuration */
int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai, int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai,
int clk_id, unsigned int freq, int dir); int clk_id, unsigned int freq, int dir);
int (*set_pll)(struct snd_soc_codec_dai *codec_dai, int (*set_pll)(struct snd_soc_codec_dai *codec_dai,
...@@ -282,7 +282,7 @@ struct snd_soc_codec_ops { ...@@ -282,7 +282,7 @@ struct snd_soc_codec_ops {
int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai, int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai,
int div_id, int div); int div_id, int div);
/* CPU DAI format configuration */ /* DAI format configuration */
int (*set_fmt)(struct snd_soc_codec_dai *codec_dai, int (*set_fmt)(struct snd_soc_codec_dai *codec_dai,
unsigned int fmt); unsigned int fmt);
int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai, int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai,
...@@ -293,24 +293,6 @@ struct snd_soc_codec_ops { ...@@ -293,24 +293,6 @@ struct snd_soc_codec_ops {
int (*digital_mute)(struct snd_soc_codec_dai *, int mute); int (*digital_mute)(struct snd_soc_codec_dai *, int mute);
}; };
/* ASoC cpu DAI ops */
struct snd_soc_cpu_ops {
/* CPU DAI clocking configuration */
int (*set_sysclk)(struct snd_soc_cpu_dai *cpu_dai,
int clk_id, unsigned int freq, int dir);
int (*set_clkdiv)(struct snd_soc_cpu_dai *cpu_dai,
int div_id, int div);
int (*set_pll)(struct snd_soc_cpu_dai *cpu_dai,
int pll_id, unsigned int freq_in, unsigned int freq_out);
/* CPU DAI format configuration */
int (*set_fmt)(struct snd_soc_cpu_dai *cpu_dai,
unsigned int fmt);
int (*set_tdm_slot)(struct snd_soc_cpu_dai *cpu_dai,
unsigned int mask, int slots);
int (*set_tristate)(struct snd_soc_cpu_dai *, int tristate);
};
/* SoC Codec DAI */ /* SoC Codec DAI */
struct snd_soc_codec_dai { struct snd_soc_codec_dai {
char *name; char *name;
...@@ -328,7 +310,7 @@ struct snd_soc_codec_dai { ...@@ -328,7 +310,7 @@ struct snd_soc_codec_dai {
/* ops */ /* ops */
struct snd_soc_ops ops; struct snd_soc_ops ops;
struct snd_soc_codec_ops dai_ops; struct snd_soc_dai_ops dai_ops;
/* DAI private data */ /* DAI private data */
void *private_data; void *private_data;
...@@ -352,7 +334,7 @@ struct snd_soc_cpu_dai { ...@@ -352,7 +334,7 @@ struct snd_soc_cpu_dai {
/* ops */ /* ops */
struct snd_soc_ops ops; struct snd_soc_ops ops;
struct snd_soc_cpu_ops dai_ops; struct snd_soc_dai_ops dai_ops;
/* DAI capabilities */ /* DAI capabilities */
struct snd_soc_pcm_stream capture; struct snd_soc_pcm_stream capture;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment