aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/txx9/txx9aclc-ac97.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 22:52:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 22:52:22 -0400
commit1286da8bc009cb2aee7f285e94623fc974c0c983 (patch)
tree51ec0a79c3de63fa809b831ae0cbb5b85e44482f /sound/soc/txx9/txx9aclc-ac97.c
parent9e220385c4eb8b7e66174a60ea0e15b6b296f228 (diff)
parent1ba65ae4bdbd43265c51ee4c30ff21a48124b6d8 (diff)
Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "A relative calm release at this time with a flat diffstat. The only significant change in the ALSA core side is the support for more than 32 card instances, configurable via kconfig. Other than that, in both ASoC and other parts, mostly some improvements and fixes on the driver side. - hda: More quirks for ALC269-variants on Dell & co, VIA codec fixes - hda: Haswell HDMI audio fixes, runtime PM improvements - hda: Intel BayTrail support, ALC5505 DSP support - es1968: MediaForte M56VAP support - usb-audio: Improved support for Yamaha/Roland devices - usb-audio: M2Tech hiFace, Audio Advantage Micro II support - hdspm: wordclock fixes - ASoC: Pending fixes for WM8962 - ASoC: Cleanups and fixes for Blackfin, SGTL5000 and UX500 - ASoC: Generalisation of the Bluetooth and HDMI stub drivers - ASoC: SSM2518 and RT5640 codec drivers. - ASoC: Tegra CPUs with RT5640 machine driver - ASoC: AC'97 refactoring bug fixes - ASoC: ADAU1701 driver fixes - Clean up of *_set_drvdata() in a wide range of drivers" * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (284 commits) ALSA: vmaster: Fix the regression of missing vmaster hook call ALSA: hda - Add Dell SSID to support Headset Mic recording ASoC: adau1701: remove control_data assignment ASoC: adau1701: more direct regmap usage ASoC: ac97: fixup multi-platform AC'97 module build failure ASoC: pxa2xx: fixup multi-platform AC'97 build failures ASoC: tegra20-ac97: Remove unused variable ASoC: tegra20-ac97: Remove duplicate error message ALSA: usb-audio: Add Audio Advantage Micro II ASoC: tas5086: fix Mid-Z implementation ASoC: tas5086: fix TAS5086_CLOCK_CONTROL register size ALSA: Replace the magic number 44 with const ALSA: hda - Fix the max length of control name in generic parser ALSA: hda - Guess what, it's two more Dell headset mic quirks ALSA: hda - Yet another Dell headset mic quirk ALSA: hda - Add support for ALC5505 DSP power-save mode ASoC: mfld: Remove unused variable ALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE ALSA: usb-audio: claim autodetected PCM interfaces all at once ALSA: usb-audio: remove superfluous Roland quirks ...
Diffstat (limited to 'sound/soc/txx9/txx9aclc-ac97.c')
-rw-r--r--sound/soc/txx9/txx9aclc-ac97.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 8a2840304d28..4bcce8a3cded 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -119,12 +119,11 @@ static void txx9aclc_ac97_cold_reset(struct snd_ac97 *ac97)
119} 119}
120 120
121/* AC97 controller operations */ 121/* AC97 controller operations */
122struct snd_ac97_bus_ops soc_ac97_ops = { 122static struct snd_ac97_bus_ops txx9aclc_ac97_ops = {
123 .read = txx9aclc_ac97_read, 123 .read = txx9aclc_ac97_read,
124 .write = txx9aclc_ac97_write, 124 .write = txx9aclc_ac97_write,
125 .reset = txx9aclc_ac97_cold_reset, 125 .reset = txx9aclc_ac97_cold_reset,
126}; 126};
127EXPORT_SYMBOL_GPL(soc_ac97_ops);
128 127
129static irqreturn_t txx9aclc_ac97_irq(int irq, void *dev_id) 128static irqreturn_t txx9aclc_ac97_irq(int irq, void *dev_id)
130{ 129{
@@ -188,9 +187,9 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
188 if (!r) 187 if (!r)
189 return -EBUSY; 188 return -EBUSY;
190 189
191 if (!devm_request_mem_region(&pdev->dev, r->start, resource_size(r), 190 drvdata->base = devm_ioremap_resource(&pdev->dev, r);
192 dev_name(&pdev->dev))) 191 if (IS_ERR(drvdata->base))
193 return -EBUSY; 192 return PTR_ERR(drvdata->base);
194 193
195 drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL); 194 drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
196 if (!drvdata) 195 if (!drvdata)
@@ -201,14 +200,15 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
201 r->start >= TXX9_DIRECTMAP_BASE && 200 r->start >= TXX9_DIRECTMAP_BASE &&
202 r->start < TXX9_DIRECTMAP_BASE + 0x400000) 201 r->start < TXX9_DIRECTMAP_BASE + 0x400000)
203 drvdata->physbase |= 0xf00000000ull; 202 drvdata->physbase |= 0xf00000000ull;
204 drvdata->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
205 if (!drvdata->base)
206 return -EBUSY;
207 err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq, 203 err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
208 0, dev_name(&pdev->dev), drvdata); 204 0, dev_name(&pdev->dev), drvdata);
209 if (err < 0) 205 if (err < 0)
210 return err; 206 return err;
211 207
208 err = snd_soc_set_ac97_ops(&txx9aclc_ac97_ops);
209 if (err < 0)
210 return err;
211
212 return snd_soc_register_component(&pdev->dev, &txx9aclc_ac97_component, 212 return snd_soc_register_component(&pdev->dev, &txx9aclc_ac97_component,
213 &txx9aclc_ac97_dai, 1); 213 &txx9aclc_ac97_dai, 1);
214} 214}
@@ -216,6 +216,7 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
216static int txx9aclc_ac97_dev_remove(struct platform_device *pdev) 216static int txx9aclc_ac97_dev_remove(struct platform_device *pdev)
217{ 217{
218 snd_soc_unregister_component(&pdev->dev); 218 snd_soc_unregister_component(&pdev->dev);
219 snd_soc_set_ac97_ops(NULL);
219 return 0; 220 return 0;
220} 221}
221 222