diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 15:38:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 15:38:47 -0700 |
commit | c70929147a10fa4538886cb23b934b509c4c0e49 (patch) | |
tree | bd7c25f679b271fc81f2cedc7a70ef059586c353 /sound/pci/cs4281.c | |
parent | 4b1779c2cf030c68aefe939d946475e4136c1895 (diff) | |
parent | 69dd89fd2b9406603d218cab8996cfb232d5b8b9 (diff) | |
download | talos-obmc-linux-c70929147a10fa4538886cb23b934b509c4c0e49.tar.gz talos-obmc-linux-c70929147a10fa4538886cb23b934b509c4c0e49.zip |
Merge tag 'sound-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"There have been lots of changes in ALSA core, HD-audio and ASoC, also
most of PCI drivers touched by conversions of printks. All these
resulted in a high volume and wide ranged patch sets in this release.
Many changes are fairly trivial, but also lots of nice cleanups and
refactors. There are a few new drivers, most notably, the Intel
Haswell and Baytrail ASoC driver.
Core changes:
- A bit modernization; embed the device struct into snd_card struct,
so that it may be referred from the beginning. A new
snd_card_new() function is introduced for that, and all drivers
have been converted.
- Simplification in the device management code in ALSA core; now
managed by a simple priority list instead
- Converted many kernel messages to use the standard dev_err() & co;
this would be the pretty visible difference, especially for
HD-audio.
HD-audio:
- Conexant codecs use the auto-parser as default now; the old static
code still remains in case of regressions. Some old quirks have
been rewritten with the fixups for auto-parser.
- C-Media codecs also use the auto-parser as default now, too.
- A device struct is assigned to each HD-audio codec, and the
formerly hwdep attributes are accessible over the codec sysfs, too.
hwdep attributes still remain for compatibility.
- Split the PCI-specific stuff for HD-audio controller into a
separate module, ane make a helper module for the generic
controller driver. This is a preliminary change for supporting
Tegra HDMI controller in near future, which slipped from 3.15
merge.
- Device-specific fixes: mute LED support for Lenovo Ideapad, mic LED
fix for HP laptops, more ASUS subwoofer quirks, yet more Dell
laptop headset quirks
- Make the HD-audio codec response a bit more robust
- A few improvements on Realtek ALC282 / 283 about the pop noises
- A couple of Intel HDMI fixes
ASoC:
- Lots of cleanups for enumerations; refactored lots of error prone
original codes to use more modern APIs
- Elimination of the ASoC level wrappers for I2C and SPI moving us
closer to converting to regmap completely and avoiding some
randconfig hassle
- Provide both manually and transparently locked DAPM APIs rather
than a mix of the two fixing some concurrency issues
- Start converting CODEC drivers to use separate bus interface
drivers rather than having them all in one file helping avoid
dependency issues
- DPCM support for Intel Haswell and Bay Trail platforms, lots of
fixes
- Lots of work on improvements for simple-card, DaVinci and the
Renesas rcar drivers.
- New drivers for Analog Devices ADAU1977, TI PCM512x and parts of
the CSR SiRF SoC, TLV320AIC31XXX, Armada 370 DB, Cirrus cs42xx8
- Fixes for the simple-card DAI format DT mess
- DT support for a couple more devices.
- Use of the tdm_slot mapping in a few drivers
Others:
- Support of reset_resume callback for improved S4 in USB-audio
driver; the device with boot quirks have been little tested, which
we need to watch out in this development cycle
- Add PM support for ICE1712 driver (finally!); it's still pretty
partial support, only for M-Audio devices"
* tag 'sound-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (610 commits)
ALSA: ice1712: Add suspend support for M-Audio ICE1712-based cards
ALSA: ice1712: add suspend support for ICE1712 chip
ALSA: hda - Enable beep for ASUS 1015E
ALSA: asihpi: fix some indenting in snd_card_asihpi_pcm_new()
ALSA: hda - add headset mic detect quirks for three Dell laptops
ASoC: tegra: move AC97 clock handling to the machine driver
ASoC: simple-card: Handle many DAI links
ASoC: simple-card: Add DT documentation for multi-DAI links
ASoC: simple-card: dynamically allocate the DAI link and properties
ASoC: imx-ssi: Add .xlate_tdm_slot_mask() support.
ASoC: fsl-esai: Add .xlate_tdm_slot_mask() support.
ASoC: fsl-utils: Add fsl_asoc_xlate_tdm_slot_mask() support.
ASoC: core: remove the 'of_' prefix of of_xlate_tdm_slot_mask.
ASoC: rcar: subnode tidyup for renesas,rsnd.txt
ASoC: Remove name_prefix unset during DAI link init hack
ALSA: hda - Inform the unexpectedly ignored pins by auto-parser
ASoC: rcar: bugfix: it cares about the non-src case
ARM: bockw: fixup SND_SOC_DAIFMT_CBx_CFx flags
ASoC: pcm: Drop incorrect double/extra frees
ASoC: mfld_machine: Fix compile error
...
Diffstat (limited to 'sound/pci/cs4281.c')
-rw-r--r-- | sound/pci/cs4281.c | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index 1dc793e742d7..43d1f912c641 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c @@ -564,7 +564,8 @@ static void snd_cs4281_ac97_write(struct snd_ac97 *ac97, return; } } - snd_printk(KERN_ERR "AC'97 write problem, reg = 0x%x, val = 0x%x\n", reg, val); + dev_err(chip->card->dev, + "AC'97 write problem, reg = 0x%x, val = 0x%x\n", reg, val); } static unsigned short snd_cs4281_ac97_read(struct snd_ac97 *ac97, @@ -624,7 +625,8 @@ static unsigned short snd_cs4281_ac97_read(struct snd_ac97 *ac97, goto __ok1; } - snd_printk(KERN_ERR "AC'97 read problem (ACCTL_DCV), reg = 0x%x\n", reg); + dev_err(chip->card->dev, + "AC'97 read problem (ACCTL_DCV), reg = 0x%x\n", reg); result = 0xffff; goto __end; @@ -643,7 +645,8 @@ static unsigned short snd_cs4281_ac97_read(struct snd_ac97 *ac97, udelay(10); } - snd_printk(KERN_ERR "AC'97 read problem (ACSTS_VSTS), reg = 0x%x\n", reg); + dev_err(chip->card->dev, + "AC'97 read problem (ACSTS_VSTS), reg = 0x%x\n", reg); result = 0xffff; goto __end; @@ -835,8 +838,9 @@ static snd_pcm_uframes_t snd_cs4281_pointer(struct snd_pcm_substream *substream) struct cs4281 *chip = snd_pcm_substream_chip(substream); /* - printk(KERN_DEBUG "DCC = 0x%x, buffer_size = 0x%x, jiffies = %li\n", - snd_cs4281_peekBA0(chip, dma->regDCC), runtime->buffer_size, + dev_dbg(chip->card->dev, + "DCC = 0x%x, buffer_size = 0x%x, jiffies = %li\n", + snd_cs4281_peekBA0(chip, dma->regDCC), runtime->buffer_size, jiffies); */ return runtime->buffer_size - @@ -1265,7 +1269,8 @@ static int snd_cs4281_create_gameport(struct cs4281 *chip) chip->gameport = gp = gameport_allocate_port(); if (!gp) { - printk(KERN_ERR "cs4281: cannot allocate memory for gameport\n"); + dev_err(chip->card->dev, + "cannot allocate memory for gameport\n"); return -ENOMEM; } @@ -1361,7 +1366,7 @@ static int snd_cs4281_create(struct snd_card *card, chip->irq = -1; pci_set_master(pci); if (dual_codec < 0 || dual_codec > 3) { - snd_printk(KERN_ERR "invalid dual_codec option %d\n", dual_codec); + dev_err(card->dev, "invalid dual_codec option %d\n", dual_codec); dual_codec = 0; } chip->dual_codec = dual_codec; @@ -1383,7 +1388,7 @@ static int snd_cs4281_create(struct snd_card *card, if (request_irq(pci->irq, snd_cs4281_interrupt, IRQF_SHARED, KBUILD_MODNAME, chip)) { - snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); + dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); snd_cs4281_free(chip); return -ENOMEM; } @@ -1402,8 +1407,6 @@ static int snd_cs4281_create(struct snd_card *card, snd_cs4281_proc_init(chip); - snd_card_set_dev(card, &pci->dev); - *rchip = chip; return 0; } @@ -1425,7 +1428,8 @@ static int snd_cs4281_chip_init(struct cs4281 *chip) snd_cs4281_pokeBA0(chip, BA0_CFLR, BA0_CFLR_DEFAULT); tmp = snd_cs4281_peekBA0(chip, BA0_CFLR); if (tmp != BA0_CFLR_DEFAULT) { - snd_printk(KERN_ERR "CFLR setup failed (0x%x)\n", tmp); + dev_err(chip->card->dev, + "CFLR setup failed (0x%x)\n", tmp); return -EIO; } } @@ -1436,11 +1440,13 @@ static int snd_cs4281_chip_init(struct cs4281 *chip) snd_cs4281_pokeBA0(chip, BA0_CWPR, 0x4281); if ((tmp = snd_cs4281_peekBA0(chip, BA0_SERC1)) != (BA0_SERC1_SO1EN | BA0_SERC1_AC97)) { - snd_printk(KERN_ERR "SERC1 AC'97 check failed (0x%x)\n", tmp); + dev_err(chip->card->dev, + "SERC1 AC'97 check failed (0x%x)\n", tmp); return -EIO; } if ((tmp = snd_cs4281_peekBA0(chip, BA0_SERC2)) != (BA0_SERC2_SI1EN | BA0_SERC2_AC97)) { - snd_printk(KERN_ERR "SERC2 AC'97 check failed (0x%x)\n", tmp); + dev_err(chip->card->dev, + "SERC2 AC'97 check failed (0x%x)\n", tmp); return -EIO; } @@ -1502,7 +1508,7 @@ static int snd_cs4281_chip_init(struct cs4281 *chip) schedule_timeout_uninterruptible(1); } while (time_after_eq(end_time, jiffies)); - snd_printk(KERN_ERR "DLLRDY not seen\n"); + dev_err(chip->card->dev, "DLLRDY not seen\n"); return -EIO; __ok0: @@ -1528,7 +1534,9 @@ static int snd_cs4281_chip_init(struct cs4281 *chip) schedule_timeout_uninterruptible(1); } while (time_after_eq(end_time, jiffies)); - snd_printk(KERN_ERR "never read codec ready from AC'97 (0x%x)\n", snd_cs4281_peekBA0(chip, BA0_ACSTS)); + dev_err(chip->card->dev, + "never read codec ready from AC'97 (0x%x)\n", + snd_cs4281_peekBA0(chip, BA0_ACSTS)); return -EIO; __ok1: @@ -1539,7 +1547,8 @@ static int snd_cs4281_chip_init(struct cs4281 *chip) goto __codec2_ok; schedule_timeout_uninterruptible(1); } while (time_after_eq(end_time, jiffies)); - snd_printk(KERN_INFO "secondary codec doesn't respond. disable it...\n"); + dev_info(chip->card->dev, + "secondary codec doesn't respond. disable it...\n"); chip->dual_codec = 0; __codec2_ok: ; } @@ -1569,7 +1578,7 @@ static int snd_cs4281_chip_init(struct cs4281 *chip) if (--retry_count > 0) goto __retry; - snd_printk(KERN_ERR "never read ISV3 and ISV4 from AC'97\n"); + dev_err(chip->card->dev, "never read ISV3 and ISV4 from AC'97\n"); return -EIO; __ok2: @@ -1917,7 +1926,8 @@ static int snd_cs4281_probe(struct pci_dev *pci, return -ENOENT; } - err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, + 0, &card); if (err < 0) return err; @@ -2055,8 +2065,7 @@ static int cs4281_resume(struct device *dev) pci_set_power_state(pci, PCI_D0); pci_restore_state(pci); if (pci_enable_device(pci) < 0) { - printk(KERN_ERR "cs4281: pci_enable_device failed, " - "disabling device\n"); + dev_err(dev, "pci_enable_device failed, disabling device\n"); snd_card_disconnect(card); return -EIO; } |