Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47214
b: refs/heads/master
c: cbe83b1
h: refs/heads/master
v: v3
  • Loading branch information
Liam Girdwood authored and Jaroslav Kysela committed Feb 9, 2007
1 parent 78c6343 commit 83b115b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4422b606bc04eab01dd5cb6f8e6dd0608d65bb11
refs/heads/master: cbe83b1795feea33803dc89fce18b2b98abbcc9b
44 changes: 15 additions & 29 deletions trunk/sound/soc/codecs/wm9712.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,6 @@ static unsigned int ac97_read(struct snd_soc_codec *codec,
static int ac97_write(struct snd_soc_codec *codec,
unsigned int reg, unsigned int val);

#define AC97_DIR \
(SND_SOC_DAIDIR_PLAYBACK | SND_SOC_DAIDIR_CAPTURE)

#define AC97_RATES \
(SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_16000 | \
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
SNDRV_PCM_RATE_48000)

/* may need to expand this */
static struct snd_soc_dai_mode ac97_modes[] = {
{
.pcmfmt = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S18_3LE,
.pcmrate = AC97_RATES,
.pcmdir = AC97_DIR,
},
};

/*
* WM9712 register cache
*/
Expand Down Expand Up @@ -554,35 +537,38 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream)
return ac97_write(codec, AC97_PCM_SURR_DAC_RATE, runtime->rate);
}

#define WM9712_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)

struct snd_soc_codec_dai wm9712_dai[] = {
{
.name = "AC97 HiFi",
.playback = {
.stream_name = "HiFi Playback",
.channels_min = 1,
.channels_max = 2,},
.channels_max = 2,
.rates = WM9712_AC97_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
.capture = {
.stream_name = "HiFi Capture",
.channels_min = 1,
.channels_max = 2,},
.channels_max = 2,
.rates = WM9712_AC97_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
.ops = {
.prepare = ac97_prepare,},
.caps = {
.num_modes = ARRAY_SIZE(ac97_modes),
.mode = ac97_modes,},
},
{
},
{
.name = "AC97 Aux",
.playback = {
.stream_name = "Aux Playback",
.channels_min = 1,
.channels_max = 1,},
.channels_max = 1,
.rates = WM9712_AC97_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
.ops = {
.prepare = ac97_aux_prepare,},
.caps = {
.num_modes = ARRAY_SIZE(ac97_modes),
.mode = ac97_modes,},
},
}
};
EXPORT_SYMBOL_GPL(wm9712_dai);

Expand Down

0 comments on commit 83b115b

Please sign in to comment.