Skip to content

Commit

Permalink
ALSA: asoc: codecs - merge structs snd_soc_codec_dai and snd_soc_cpu_…
Browse files Browse the repository at this point in the history
…dai.

This patch merges struct snd_soc_codec_dai and struct
snd_soc_cpu_dai into struct snd_soc_dai for the codec drivers.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Liam Girdwood authored and Jaroslav Kysela committed Jul 10, 2008
1 parent 9cb132d commit e550e17
Show file tree
Hide file tree
Showing 24 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion sound/soc/codecs/ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static int ac97_prepare(struct snd_pcm_substream *substream)
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\
SNDRV_PCM_RATE_48000)

struct snd_soc_codec_dai ac97_dai = {
struct snd_soc_dai ac97_dai = {
.name = "AC97 HiFi",
.type = SND_SOC_DAI_AC97,
.playback = {
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/ac97.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
#define __LINUX_SND_SOC_AC97_H

extern struct snd_soc_codec_device soc_codec_dev_ac97;
extern struct snd_soc_codec_dai ac97_dai;
extern struct snd_soc_dai ac97_dai;

#endif
8 changes: 4 additions & 4 deletions sound/soc/codecs/ak4535.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ static int ak4535_add_widgets(struct snd_soc_codec *codec)
return 0;
}

static int ak4535_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
static int ak4535_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -369,7 +369,7 @@ static int ak4535_hw_params(struct snd_pcm_substream *substream,
return 0;
}

static int ak4535_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
static int ak4535_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand All @@ -394,7 +394,7 @@ static int ak4535_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
return 0;
}

static int ak4535_mute(struct snd_soc_codec_dai *dai, int mute)
static int ak4535_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
u16 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC) & 0xffdf;
Expand Down Expand Up @@ -436,7 +436,7 @@ static int ak4535_set_bias_level(struct snd_soc_codec *codec,
SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)

struct snd_soc_codec_dai ak4535_dai = {
struct snd_soc_dai ak4535_dai = {
.name = "AK4535",
.playback = {
.stream_name = "Playback",
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/ak4535.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct ak4535_setup_data {
unsigned short i2c_address;
};

extern struct snd_soc_codec_dai ak4535_dai;
extern struct snd_soc_dai ak4535_dai;
extern struct snd_soc_codec_device soc_codec_dev_ak4535;

#endif
8 changes: 4 additions & 4 deletions sound/soc/codecs/cs4270.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static struct {
* driver what the input settings can be. This would need to be implemented
* for stand-alone mode to work.
*/
static int cs4270_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
static int cs4270_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -251,7 +251,7 @@ static int cs4270_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
* data for playback only, but ASoC currently does not support different
* formats for playback vs. record.
*/
static int cs4270_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
static int cs4270_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int format)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -471,7 +471,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
* board does not have the MUTEA or MUTEB pins connected to such circuitry,
* then this function will do nothing.
*/
static int cs4270_mute(struct snd_soc_codec_dai *dai, int mute)
static int cs4270_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
int reg6;
Expand Down Expand Up @@ -667,7 +667,7 @@ static int cs4270_i2c_probe(struct i2c_adapter *adapter, int addr, int kind)

#endif /* USE_I2C*/

struct snd_soc_codec_dai cs4270_dai = {
struct snd_soc_dai cs4270_dai = {
.name = "CS4270",
.playback = {
.stream_name = "Playback",
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/cs4270.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* The ASoC codec DAI structure for the CS4270. Assign this structure to
* the .codec_dai field of your machine driver's snd_soc_dai_link structure.
*/
extern struct snd_soc_codec_dai cs4270_dai;
extern struct snd_soc_dai cs4270_dai;

/*
* The ASoC codec device structure for the CS4270. Assign this structure
Expand Down
8 changes: 4 additions & 4 deletions sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
return 0;
}

static int aic3x_mute(struct snd_soc_codec_dai *dai, int mute)
static int aic3x_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
u8 ldac_reg = aic3x_read_reg_cache(codec, LDAC_VOL) & ~MUTE_ON;
Expand All @@ -831,7 +831,7 @@ static int aic3x_mute(struct snd_soc_codec_dai *dai, int mute)
return 0;
}

static int aic3x_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
static int aic3x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand All @@ -841,7 +841,7 @@ static int aic3x_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
return 0;
}

static int aic3x_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -990,7 +990,7 @@ EXPORT_SYMBOL_GPL(aic3x_headset_detected);
#define AIC3X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE)

struct snd_soc_codec_dai aic3x_dai = {
struct snd_soc_dai aic3x_dai = {
.name = "aic3x",
.playback = {
.stream_name = "Playback",
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/tlv320aic3x.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ struct aic3x_setup_data {
unsigned int gpio_func[2];
};

extern struct snd_soc_codec_dai aic3x_dai;
extern struct snd_soc_dai aic3x_dai;
extern struct snd_soc_codec_device soc_codec_dev_aic3x;

#endif /* _AIC3X_H */
6 changes: 3 additions & 3 deletions sound/soc/codecs/uda1380.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static int uda1380_add_widgets(struct snd_soc_codec *codec)
return 0;
}

static int uda1380_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
static int uda1380_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -499,7 +499,7 @@ static void uda1380_pcm_shutdown(struct snd_pcm_substream *substream)
uda1380_write(codec, UDA1380_CLK, clk);
}

static int uda1380_mute(struct snd_soc_codec_dai *codec_dai, int mute)
static int uda1380_mute(struct snd_soc_dai *codec_dai, int mute)
{
struct snd_soc_codec *codec = codec_dai->codec;
u16 mute_reg = uda1380_read_reg_cache(codec, UDA1380_DEEMP) & ~R13_MTM;
Expand Down Expand Up @@ -542,7 +542,7 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec,
SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)

struct snd_soc_codec_dai uda1380_dai[] = {
struct snd_soc_dai uda1380_dai[] = {
{
.name = "UDA1380",
.playback = {
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/uda1380.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct uda1380_setup_data {
#define UDA1380_DAI_PLAYBACK 1 /* playback DAI */
#define UDA1380_DAI_CAPTURE 2 /* capture DAI */

extern struct snd_soc_codec_dai uda1380_dai[3];
extern struct snd_soc_dai uda1380_dai[3];
extern struct snd_soc_codec_device soc_codec_dev_uda1380;

#endif /* _UDA1380_H */
10 changes: 5 additions & 5 deletions sound/soc/codecs/wm8510.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static void pll_factors(unsigned int target, unsigned int source)
pll_div.k = K;
}

static int wm8510_set_dai_pll(struct snd_soc_codec_dai *codec_dai,
static int wm8510_set_dai_pll(struct snd_soc_dai *codec_dai,
int pll_id, unsigned int freq_in, unsigned int freq_out)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -368,7 +368,7 @@ static int wm8510_set_dai_pll(struct snd_soc_codec_dai *codec_dai,
/*
* Configure WM8510 clock dividers.
*/
static int wm8510_set_dai_clkdiv(struct snd_soc_codec_dai *codec_dai,
static int wm8510_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
int div_id, int div)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -402,7 +402,7 @@ static int wm8510_set_dai_clkdiv(struct snd_soc_codec_dai *codec_dai,
return 0;
}

static int wm8510_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
static int wm8510_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -510,7 +510,7 @@ static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}

static int wm8510_mute(struct snd_soc_codec_dai *dai, int mute)
static int wm8510_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
u16 mute_reg = wm8510_read_reg_cache(codec, WM8510_DAC) & 0xffbf;
Expand Down Expand Up @@ -554,7 +554,7 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec,
#define WM8510_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)

struct snd_soc_codec_dai wm8510_dai = {
struct snd_soc_dai wm8510_dai = {
.name = "WM8510 HiFi",
.playback = {
.stream_name = "Playback",
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm8510.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct wm8510_setup_data {
unsigned short i2c_address;
};

extern struct snd_soc_codec_dai wm8510_dai;
extern struct snd_soc_dai wm8510_dai;
extern struct snd_soc_codec_device soc_codec_dev_wm8510;

#endif
8 changes: 4 additions & 4 deletions sound/soc/codecs/wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static void wm8731_shutdown(struct snd_pcm_substream *substream)
}
}

static int wm8731_mute(struct snd_soc_codec_dai *dai, int mute)
static int wm8731_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
u16 mute_reg = wm8731_read_reg_cache(codec, WM8731_APDIGI) & 0xfff7;
Expand All @@ -330,7 +330,7 @@ static int wm8731_mute(struct snd_soc_codec_dai *dai, int mute)
return 0;
}

static int wm8731_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
static int wm8731_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand All @@ -349,7 +349,7 @@ static int wm8731_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
}


static int wm8731_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
static int wm8731_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -443,7 +443,7 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,
#define WM8731_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
SNDRV_PCM_FMTBIT_S24_LE)

struct snd_soc_codec_dai wm8731_dai = {
struct snd_soc_dai wm8731_dai = {
.name = "WM8731",
.playback = {
.stream_name = "Playback",
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm8731.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct wm8731_setup_data {
unsigned short i2c_address;
};

extern struct snd_soc_codec_dai wm8731_dai;
extern struct snd_soc_dai wm8731_dai;
extern struct snd_soc_codec_device soc_codec_dev_wm8731;

#endif
8 changes: 4 additions & 4 deletions sound/soc/codecs/wm8750.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ static inline int get_coeff(int mclk, int rate)
return -EINVAL;
}

static int wm8750_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
static int wm8750_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand All @@ -554,7 +554,7 @@ static int wm8750_set_dai_sysclk(struct snd_soc_codec_dai *codec_dai,
return -EINVAL;
}

static int wm8750_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
static int wm8750_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{
struct snd_soc_codec *codec = codec_dai->codec;
Expand Down Expand Up @@ -647,7 +647,7 @@ static int wm8750_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}

static int wm8750_mute(struct snd_soc_codec_dai *dai, int mute)
static int wm8750_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
u16 mute_reg = wm8750_read_reg_cache(codec, WM8750_ADCDAC) & 0xfff7;
Expand Down Expand Up @@ -692,7 +692,7 @@ static int wm8750_set_bias_level(struct snd_soc_codec *codec,
#define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
SNDRV_PCM_FMTBIT_S24_LE)

struct snd_soc_codec_dai wm8750_dai = {
struct snd_soc_dai wm8750_dai = {
.name = "WM8750",
.playback = {
.stream_name = "Playback",
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm8750.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct wm8750_setup_data {
unsigned short i2c_address;
};

extern struct snd_soc_codec_dai wm8750_dai;
extern struct snd_soc_dai wm8750_dai;
extern struct snd_soc_codec_device soc_codec_dev_wm8750;

#endif
Loading

0 comments on commit e550e17

Please sign in to comment.