diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-07 11:42:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-07 11:42:25 -0400 |
commit | 84db18bbeb5c9c1a9c86e38a89d76ee526fd2c6f (patch) | |
tree | 49d3959eb24cd7c0754ed50e05fb96b0fb8d04aa /sound/soc/codecs/ac97.c | |
parent | 6948ec70355ae6cf6082519e3d76b280373dade1 (diff) | |
parent | 55b371d4ac5ed6f3338a398fbf9f2eb9ace78799 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: mixart: range checking proc file
ALSA: hda - Fix a wrong array range check in patch_realtek.c
ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
ALSA: hda - Enable amplifiers on Acer Inspire 6530G
ASoC: Only do WM8994 bias off transition from standby
ASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices
ASoC: Don't do runtime wm_hubs DC servo updates if using offset correction
ASoC: Support second DC servo readback method for wm_hubs
ASoC: Avoid wraparound in wm_hubs DC servo correction
ALSA: echoaudio - Eliminate use after free
ALSA: i2c: cleanup: change parameter to pointer
ALSA: hda - Add MSI blacklist for Aopen MZ915-M
ASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent ALSA PCM code
ALSA: hda - Update document about MSI and interrupts
ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981
ALSA: hda - Add missing printk argument in previous patch
ASoC: Fix passing platform_data to ac97 bus users and fix a leak
ALSA: hda - Fix ADC/MUX assignment of ALC269 codec
ALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()
ASoC: wm8994: playback => capture
Diffstat (limited to 'sound/soc/codecs/ac97.c')
-rw-r--r-- | sound/soc/codecs/ac97.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index fd101d450d56..1f5e57a4bb7a 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
@@ -81,9 +81,11 @@ static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, | |||
81 | static int ac97_soc_probe(struct platform_device *pdev) | 81 | static int ac97_soc_probe(struct platform_device *pdev) |
82 | { | 82 | { |
83 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 83 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
84 | struct snd_soc_card *card = socdev->card; | ||
84 | struct snd_soc_codec *codec; | 85 | struct snd_soc_codec *codec; |
85 | struct snd_ac97_bus *ac97_bus; | 86 | struct snd_ac97_bus *ac97_bus; |
86 | struct snd_ac97_template ac97_template; | 87 | struct snd_ac97_template ac97_template; |
88 | int i; | ||
87 | int ret = 0; | 89 | int ret = 0; |
88 | 90 | ||
89 | printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION); | 91 | printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION); |
@@ -103,12 +105,6 @@ static int ac97_soc_probe(struct platform_device *pdev) | |||
103 | INIT_LIST_HEAD(&codec->dapm_widgets); | 105 | INIT_LIST_HEAD(&codec->dapm_widgets); |
104 | INIT_LIST_HEAD(&codec->dapm_paths); | 106 | INIT_LIST_HEAD(&codec->dapm_paths); |
105 | 107 | ||
106 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | ||
107 | if (ret < 0) { | ||
108 | printk(KERN_ERR "ASoC: failed to init gen ac97 glue\n"); | ||
109 | goto err; | ||
110 | } | ||
111 | |||
112 | /* register pcms */ | 108 | /* register pcms */ |
113 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 109 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
114 | if (ret < 0) | 110 | if (ret < 0) |
@@ -124,6 +120,13 @@ static int ac97_soc_probe(struct platform_device *pdev) | |||
124 | if (ret < 0) | 120 | if (ret < 0) |
125 | goto bus_err; | 121 | goto bus_err; |
126 | 122 | ||
123 | for (i = 0; i < card->num_links; i++) { | ||
124 | if (card->dai_link[i].codec_dai->ac97_control) { | ||
125 | snd_ac97_dev_add_pdata(codec->ac97, | ||
126 | card->dai_link[i].cpu_dai->ac97_pdata); | ||
127 | } | ||
128 | } | ||
129 | |||
127 | return 0; | 130 | return 0; |
128 | 131 | ||
129 | bus_err: | 132 | bus_err: |