ac97.c (6627a653bceb3a54e55e5cdc478ec5b8d5c9cc44) ac97.c (6335d05548eece40092000aa91b64a50310d69d5)
1/*
2 * ac97.c -- ALSA Soc AC97 codec support
3 *
4 * Copyright 2005 Wolfson Microelectronics PLC.
5 * Author: Liam Girdwood <lrg@slimlogic.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 27 unchanged lines hidden (view full) ---

36 AC97_PCM_FRONT_DAC_RATE : AC97_PCM_LR_ADC_RATE;
37 return snd_ac97_set_rate(codec->ac97, reg, runtime->rate);
38}
39
40#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
41 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\
42 SNDRV_PCM_RATE_48000)
43
1/*
2 * ac97.c -- ALSA Soc AC97 codec support
3 *
4 * Copyright 2005 Wolfson Microelectronics PLC.
5 * Author: Liam Girdwood <lrg@slimlogic.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 27 unchanged lines hidden (view full) ---

36 AC97_PCM_FRONT_DAC_RATE : AC97_PCM_LR_ADC_RATE;
37 return snd_ac97_set_rate(codec->ac97, reg, runtime->rate);
38}
39
40#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
41 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\
42 SNDRV_PCM_RATE_48000)
43
44static struct snd_soc_dai_ops ac97_dai_ops = {
45 .prepare = ac97_prepare,
46};
47
44struct snd_soc_dai ac97_dai = {
45 .name = "AC97 HiFi",
46 .ac97_control = 1,
47 .playback = {
48 .stream_name = "AC97 Playback",
49 .channels_min = 1,
50 .channels_max = 2,
51 .rates = STD_AC97_RATES,
52 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
53 .capture = {
54 .stream_name = "AC97 Capture",
55 .channels_min = 1,
56 .channels_max = 2,
57 .rates = STD_AC97_RATES,
58 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
48struct snd_soc_dai ac97_dai = {
49 .name = "AC97 HiFi",
50 .ac97_control = 1,
51 .playback = {
52 .stream_name = "AC97 Playback",
53 .channels_min = 1,
54 .channels_max = 2,
55 .rates = STD_AC97_RATES,
56 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
57 .capture = {
58 .stream_name = "AC97 Capture",
59 .channels_min = 1,
60 .channels_max = 2,
61 .rates = STD_AC97_RATES,
62 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
59 .ops = {
60 .prepare = ac97_prepare,},
63 .ops = &ac97_dai_ops,
61};
62EXPORT_SYMBOL_GPL(ac97_dai);
63
64static unsigned int ac97_read(struct snd_soc_codec *codec,
65 unsigned int reg)
66{
67 return soc_ac97_ops.read(codec->ac97, reg);
68}

--- 110 unchanged lines hidden ---
64};
65EXPORT_SYMBOL_GPL(ac97_dai);
66
67static unsigned int ac97_read(struct snd_soc_codec *codec,
68 unsigned int reg)
69{
70 return soc_ac97_ops.read(codec->ac97, reg);
71}

--- 110 unchanged lines hidden ---