summaryrefslogtreecommitdiffstats
path: root/sound/pci/ad1889.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 11:51:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 11:51:59 -0500
commita323ae93a74f669d890926187c68c711895e3454 (patch)
tree9a4ab8ed7bb98dc4321606332a883834ef7c8f6f /sound/pci/ad1889.c
parent3e63430a5cc26bc90a6e33ab33f901196b7b63ac (diff)
parent0e806151e86be52caa1349fa490eab8f09a2b6f5 (diff)
Merge tag 'sound-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "In this batch, you can find lots of cleanups through the whole subsystem, as our good New Year's resolution. Lots of LOCs and commits are about LINE6 driver that was promoted finally from staging tree, and as usual, there've been widely spread ASoC changes. Here some highlights: ALSA core changes - Embedding struct device into ALSA core structures - sequencer core cleanups / fixes - PCM msbits constraints cleanups / fixes - New SNDRV_PCM_TRIGGER_DRAIN command - PCM kerneldoc fixes, header cleanups - PCM code cleanups using more standard codes - Control notification ID fixes Driver cleanups - Cleanups of PCI PM callbacks - Timer helper usages cleanups - Simplification (e.g. argument reduction) of many driver codes HD-audio - Hotkey and LED support on HP laptops with Realtek codecs - Dock station support on HP laptops - Toshiba Satellite S50D fixup - Enhanced wallclock timestamp handling for HD-audio - Componentization to simplify the linkage between i915 and hd-audio drivers for Intel HDMI/DP USB-audio - Akai MPC Element support - Enhanced timestamp handling ASoC - Lots of refactoringin ASoC core, moving drivers to more data driven initialization and rationalizing a lot of DAPM usage - Much improved handling of CDCLK clocks on Samsung I2S controllers - Lots of driver specific cleanups and feature improvements - CODEC support for TI PCM514x and TLV320AIC3104 devices - Board support for Tegra systems with Realtek RT5677 - New driver for Maxim max98357a - More enhancements / fixes for Intel SST driver Others - Promotion of LINE6 driver from staging along with lots of rewrites and cleanups - DT support for old non-ASoC atmel driver - oxygen cleanups, XIO2001 init, Studio Evolution SE6x support - Emu8000 DRAM size detection fix on ISA(!!) AWE64 boards - A few more ak411x fixes for ice1724 boards" * tag 'sound-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (542 commits) ALSA: line6: toneport: Use explicit type for firmware version ALSA: line6: Use explicit type for serial number ALSA: line6: Return EIO if read/write not successful ALSA: line6: Return error if device not responding ALSA: line6: Add delay before reading status ASoC: Intel: Clean data after SST fw fetch ALSA: hda - Add docking station support for another HP machine ALSA: control: fix failure to return new numerical ID in 'replace' event data ALSA: usb: update trigger timestamp on first non-zero URB submitted ALSA: hda: read trigger_timestamp immediately after starting DMA ALSA: pcm: allow for trigger_tstamp snapshot in .trigger ALSA: pcm: don't override timestamp unconditionally ALSA: off by one bug in snd_riptide_joystick_probe() ASoC: rt5670: Set use_single_rw flag for regmap ASoC: rt286: Add rt288 codec support ASoC: max98357a: Fix build in !CONFIG_OF case ASoC: Intel: fix platform_no_drv_owner.cocci warnings ARM: dts: Switch Odroid X2/U2 to simple-audio-card ARM: dts: Exynos4 and Odroid X2/U3 sound device nodes update ALSA: control: fix failure to return numerical ID in 'add' event ...
Diffstat (limited to 'sound/pci/ad1889.c')
-rw-r--r--sound/pci/ad1889.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 1610c38337af..850a8c984c25 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -40,14 +40,13 @@
40#include <linux/compiler.h> 40#include <linux/compiler.h>
41#include <linux/delay.h> 41#include <linux/delay.h>
42#include <linux/module.h> 42#include <linux/module.h>
43#include <linux/io.h>
43 44
44#include <sound/core.h> 45#include <sound/core.h>
45#include <sound/pcm.h> 46#include <sound/pcm.h>
46#include <sound/initval.h> 47#include <sound/initval.h>
47#include <sound/ac97_codec.h> 48#include <sound/ac97_codec.h>
48 49
49#include <asm/io.h>
50
51#include "ad1889.h" 50#include "ad1889.h"
52#include "ac97/ac97_id.h" 51#include "ac97/ac97_id.h"
53 52
@@ -623,14 +622,11 @@ snd_ad1889_interrupt(int irq, void *dev_id)
623} 622}
624 623
625static int 624static int
626snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, struct snd_pcm **rpcm) 625snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device)
627{ 626{
628 int err; 627 int err;
629 struct snd_pcm *pcm; 628 struct snd_pcm *pcm;
630 629
631 if (rpcm)
632 *rpcm = NULL;
633
634 err = snd_pcm_new(chip->card, chip->card->driver, device, 1, 1, &pcm); 630 err = snd_pcm_new(chip->card, chip->card->driver, device, 1, 1, &pcm);
635 if (err < 0) 631 if (err < 0)
636 return err; 632 return err;
@@ -658,9 +654,6 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, struct snd_pcm **rpcm)
658 return err; 654 return err;
659 } 655 }
660 656
661 if (rpcm)
662 *rpcm = pcm;
663
664 return 0; 657 return 0;
665} 658}
666 659
@@ -859,12 +852,9 @@ snd_ad1889_free(struct snd_ad1889 *chip)
859 free_irq(chip->irq, chip); 852 free_irq(chip->irq, chip);
860 853
861skip_hw: 854skip_hw:
862 if (chip->iobase) 855 iounmap(chip->iobase);
863 iounmap(chip->iobase);
864
865 pci_release_regions(chip->pci); 856 pci_release_regions(chip->pci);
866 pci_disable_device(chip->pci); 857 pci_disable_device(chip->pci);
867
868 kfree(chip); 858 kfree(chip);
869 return 0; 859 return 0;
870} 860}
@@ -1016,7 +1006,7 @@ snd_ad1889_probe(struct pci_dev *pci,
1016 if (err < 0) 1006 if (err < 0)
1017 goto free_and_ret; 1007 goto free_and_ret;
1018 1008
1019 err = snd_ad1889_pcm_init(chip, 0, NULL); 1009 err = snd_ad1889_pcm_init(chip, 0);
1020 if (err < 0) 1010 if (err < 0)
1021 goto free_and_ret; 1011 goto free_and_ret;
1022 1012