sound fixes for 3.15-rc1

Here is a bunch of small fixes that have been collected since the
 previous pull request.  In addition to various misc fixes, the
 following are included:
 
 - HD-audio quirks for Dell, HP, Chromebook, and ALC28x codecs
 - HD-audio AMD HDMI regression fix
 - Continued PM support/fixes for ice1712 driver
 - Multiplatform fixes for ASoC samsung drivers
 - Addition of device id tables to a few ASoC drivers
 - Bit clock polarity config and error flag fixes in ASoC fsl_sai
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTRra6AAoJEGwxgFQ9KSmkovkP/RCDZfQO733wAJGAtbUeRrrp
 OaSeM2FJTajttUehTYK3uyCbrM7gOTJasf9icQSGOv+17x0O/EIVc+iBEO6cJc8I
 sbEQLk3Uq8cO1+geaC9MX6tbdaXu1GtSVL61Eqo2Gm2pDHb95C+6vAEU4tE+CNaj
 HcznS6uyZ/Sd7RMpw58jstcVt6OOZRw1fabEN6a9RmmbcRjaZ5BT4xUScrRnr3t7
 hR9e3mMCGwDmufrso6yhd2uYVqjcVGO8NTdj6fbt4aPRkBS8HxYC0lhvTz6CO1oN
 VZ75poc6DQgtdVvpi95sBI3DDnkFrV2FwjdZtSQdm4ykF56h51eDDHF9EWbYdomw
 7fldHc3iRzg+0OGX2Askl3b4KfePDncWRt0/9XklftBHktyUvVpwLKlZ3nqq6VA5
 U2FfKZPuREQUhiKp8s1SXlnXhQ/hQVUMEAwOD1MhcZnIcvKQSCVvYGwdy8rKdt/A
 GaZofubIP9FYJ0Cu99A5IDoR85h0lNzYuxa2c0lOi+u1w3egHSS7KRsE07XxKsVM
 HgWUZZ7NAsROletcc6E3Zkmq/kwccCVfWyhRPLLoLEEPuaLwz/XoE+ZhtB0XhKZm
 PiEiMv2E3OaBMus5sHeXfxjkbnmysvK/3X8fuxkZD5nP9uzex8qPSDlcjC8pWmvW
 H6x3WSKbn+5Pm0HtSAun
 =7zfG
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here is a bunch of small fixes that have been collected since the
  previous pull request.  In addition to various misc fixes, the
  following are included:

   - HD-audio quirks for Dell, HP, Chromebook, and ALC28x codecs
   - HD-audio AMD HDMI regression fix
   - Continued PM support/fixes for ice1712 driver
   - Multiplatform fixes for ASoC samsung drivers
   - Addition of device id tables to a few ASoC drivers
   - Bit clock polarity config and error flag fixes in ASoC fsl_sai"

* tag 'sound-fix-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits)
  ALSA: usb-audio: Suppress repetitive debug messages from retire_playback_urb()
  ALSA: hda - Make full_reset boolean
  ALSA: hda - add headset mic detect quirk for a Dell laptop
  sound: dmasound: use module_platform_driver_probe()
  ALSA: au1x00: use module_platform_driver()
  ALSA: hda - Use runtime helper to check active state.
  ALSA: ice1712: Fix boundary checks in PCM pointer ops
  ASoC: davinci-mcasp: Fix bit clock polarity settings
  ASoC: samsung: Fix build on multiplatform
  ASoC: fsl_sai: Fix Bit Clock Polarity configurations
  ALSA: hda - Do not assign streams in reverse order
  ALSA: hda/realtek - Add eapd shutup to ALC283
  ALSA: hda/realtek - Change model name alias for ChromeOS
  ASoC: da732x: Print correct major id
  ALSA: hda/realtek - Improve HP depop when system change power state on Chromebook
  ASoC: cs42l52: Fix mask for REVID
  sound/oss: Remove uncompilable DBG macro use
  ALSA: ice1712: Save/restore routing and rate registers
  ALSA: ice1712: restore AK4xxx volumes on resume
  ASoC: alc56(23|32): fix undefined return value of probing code
  ...
This commit is contained in:
Linus Torvalds 2014-04-10 09:19:44 -07:00
commit e7990d45bb
41 changed files with 323 additions and 183 deletions

View File

@ -20,15 +20,6 @@ Required properties:
have. have.
- interrupt-parent: The phandle for the interrupt controller that - interrupt-parent: The phandle for the interrupt controller that
services interrupts for this device. services interrupts for this device.
- fsl,mode: The operating mode for the SSI interface.
"i2s-slave" - I2S mode, SSI is clock slave
"i2s-master" - I2S mode, SSI is clock master
"lj-slave" - left-justified mode, SSI is clock slave
"lj-master" - l.j. mode, SSI is clock master
"rj-slave" - right-justified mode, SSI is clock slave
"rj-master" - r.j., SSI is clock master
"ac97-slave" - AC97 mode, SSI is clock slave
"ac97-master" - AC97 mode, SSI is clock master
- fsl,playback-dma: Phandle to a node for the DMA channel to use for - fsl,playback-dma: Phandle to a node for the DMA channel to use for
playback of audio. This is typically dictated by SOC playback of audio. This is typically dictated by SOC
design. See the notes below. design. See the notes below.
@ -47,6 +38,9 @@ Required properties:
be connected together, and SRFS and STFS be connected be connected together, and SRFS and STFS be connected
together. This would still allow different sample sizes, together. This would still allow different sample sizes,
but not different sample rates. but not different sample rates.
- clocks: "ipg" - Required clock for the SSI unit
"baud" - Required clock for SSI master mode. Otherwise this
clock is not used
Required are also ac97 link bindings if ac97 is used. See Required are also ac97 link bindings if ac97 is used. See
Documentation/devicetree/bindings/sound/soc-ac97link.txt for the necessary Documentation/devicetree/bindings/sound/soc-ac97link.txt for the necessary
@ -64,6 +58,15 @@ Optional properties:
Documentation/devicetree/bindings/dma/dma.txt. Documentation/devicetree/bindings/dma/dma.txt.
- dma-names: Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq - dma-names: Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
is not defined. is not defined.
- fsl,mode: The operating mode for the SSI interface.
"i2s-slave" - I2S mode, SSI is clock slave
"i2s-master" - I2S mode, SSI is clock master
"lj-slave" - left-justified mode, SSI is clock slave
"lj-master" - l.j. mode, SSI is clock master
"rj-slave" - right-justified mode, SSI is clock slave
"rj-master" - r.j., SSI is clock master
"ac97-slave" - AC97 mode, SSI is clock slave
"ac97-master" - AC97 mode, SSI is clock master
Child 'codec' node required properties: Child 'codec' node required properties:
- compatible: Compatible list, contains the name of the codec - compatible: Compatible list, contains the name of the codec

View File

@ -188,6 +188,7 @@
struct snd_pcm_substream; struct snd_pcm_substream;
int snd_cs8427_init(struct snd_i2c_bus *bus, struct snd_i2c_device *device);
int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr, int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr,
unsigned int reset_timeout, struct snd_i2c_device **r_cs8427); unsigned int reset_timeout, struct snd_i2c_device **r_cs8427);
int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg,

View File

@ -150,10 +150,8 @@ static void snd_cs8427_free(struct snd_i2c_device *device)
kfree(device->private_data); kfree(device->private_data);
} }
int snd_cs8427_create(struct snd_i2c_bus *bus, int snd_cs8427_init(struct snd_i2c_bus *bus,
unsigned char addr, struct snd_i2c_device *device)
unsigned int reset_timeout,
struct snd_i2c_device **r_cs8427)
{ {
static unsigned char initvals1[] = { static unsigned char initvals1[] = {
CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC, CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC,
@ -200,22 +198,10 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
Inhibit E->F transfers. */ Inhibit E->F transfers. */
CS8427_UD | CS8427_EFTUI | CS8427_DETUI, CS8427_UD | CS8427_EFTUI | CS8427_DETUI,
}; };
struct cs8427 *chip = device->private_data;
int err; int err;
struct cs8427 *chip;
struct snd_i2c_device *device;
unsigned char buf[24]; unsigned char buf[24];
if ((err = snd_i2c_device_create(bus, "CS8427",
CS8427_ADDR | (addr & 7),
&device)) < 0)
return err;
chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) {
snd_i2c_device_free(device);
return -ENOMEM;
}
device->private_free = snd_cs8427_free;
snd_i2c_lock(bus); snd_i2c_lock(bus);
err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER); err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER);
if (err != CS8427_VER8427A) { if (err != CS8427_VER8427A) {
@ -264,10 +250,44 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
snd_i2c_unlock(bus); snd_i2c_unlock(bus);
/* turn on run bit and rock'n'roll */ /* turn on run bit and rock'n'roll */
snd_cs8427_reset(device);
return 0;
__fail:
snd_i2c_unlock(bus);
return err;
}
EXPORT_SYMBOL(snd_cs8427_init);
int snd_cs8427_create(struct snd_i2c_bus *bus,
unsigned char addr,
unsigned int reset_timeout,
struct snd_i2c_device **r_cs8427)
{
int err;
struct cs8427 *chip;
struct snd_i2c_device *device;
err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7),
&device);
if (err < 0)
return err;
chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) {
snd_i2c_device_free(device);
return -ENOMEM;
}
device->private_free = snd_cs8427_free;
if (reset_timeout < 1) if (reset_timeout < 1)
reset_timeout = 1; reset_timeout = 1;
chip->reset_timeout = reset_timeout; chip->reset_timeout = reset_timeout;
snd_cs8427_reset(device);
err = snd_cs8427_init(bus, device);
if (err)
goto __fail;
#if 0 // it's nice for read tests #if 0 // it's nice for read tests
{ {
@ -286,7 +306,6 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
return 0; return 0;
__fail: __fail:
snd_i2c_unlock(bus);
snd_i2c_device_free(device); snd_i2c_device_free(device);
return err < 0 ? err : -EIO; return err < 0 ? err : -EIO;
} }

View File

@ -725,15 +725,4 @@ struct platform_driver au1000_ac97c_driver = {
.remove = au1000_ac97_remove, .remove = au1000_ac97_remove,
}; };
static int __init au1000_ac97_load(void) module_platform_driver(au1000_ac97c_driver);
{
return platform_driver_register(&au1000_ac97c_driver);
}
static void __exit au1000_ac97_unload(void)
{
platform_driver_unregister(&au1000_ac97c_driver);
}
module_init(au1000_ac97_load);
module_exit(au1000_ac97_unload);

View File

@ -50,8 +50,6 @@
#include <linux/pnp.h> #include <linux/pnp.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#define DEB(x)
#define DEB1(x)
#include "sound_config.h" #include "sound_config.h"
#include "ad1848.h" #include "ad1848.h"
@ -1016,8 +1014,6 @@ static void ad1848_close(int dev)
ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc;
ad1848_port_info *portc = (ad1848_port_info *) audio_devs[dev]->portc; ad1848_port_info *portc = (ad1848_port_info *) audio_devs[dev]->portc;
DEB(printk("ad1848_close(void)\n"));
devc->intr_active = 0; devc->intr_active = 0;
ad1848_halt(dev); ad1848_halt(dev);

View File

@ -733,19 +733,7 @@ static struct platform_driver amiga_audio_driver = {
}, },
}; };
static int __init amiga_audio_init(void) module_platform_driver_probe(amiga_audio_driver, amiga_audio_probe);
{
return platform_driver_probe(&amiga_audio_driver, amiga_audio_probe);
}
module_init(amiga_audio_init);
static void __exit amiga_audio_exit(void)
{
platform_driver_unregister(&amiga_audio_driver);
}
module_exit(amiga_audio_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:amiga-audio"); MODULE_ALIAS("platform:amiga-audio");

View File

@ -275,7 +275,6 @@ static int opl3_kill_note (int devno, int voice, int note, int velocity)
devc->v_alloc->map[voice] = 0; devc->v_alloc->map[voice] = 0;
map = &pv_map[devc->lv_map[voice]]; map = &pv_map[devc->lv_map[voice]];
DEB(printk("Kill note %d\n", voice));
if (map->voice_mode == 0) if (map->voice_mode == 0)
return 0; return 0;
@ -873,8 +872,6 @@ static void opl3_aftertouch(int dev, int voice, int pressure)
map = &pv_map[devc->lv_map[voice]]; map = &pv_map[devc->lv_map[voice]];
DEB(printk("Aftertouch %d\n", voice));
if (map->voice_mode == 0) if (map->voice_mode == 0)
return; return;

View File

@ -21,10 +21,6 @@
#include "pas2.h" #include "pas2.h"
#ifndef DEB
#define DEB(what) /* (what) */
#endif
extern int pas_translate_code; extern int pas_translate_code;
extern char pas_model; extern char pas_model;
extern int *pas_osp; extern int *pas_osp;
@ -120,8 +116,6 @@ pas_mixer_set(int whichDev, unsigned int level)
{ {
int left, right, devmask, changed, i, mixer = 0; int left, right, devmask, changed, i, mixer = 0;
DEB(printk("static int pas_mixer_set(int whichDev = %d, unsigned int level = %X)\n", whichDev, level));
left = level & 0x7f; left = level & 0x7f;
right = (level & 0x7f00) >> 8; right = (level & 0x7f00) >> 8;
@ -207,8 +201,6 @@ pas_mixer_reset(void)
{ {
int foo; int foo;
DEB(printk("pas2_mixer.c: void pas_mixer_reset(void)\n"));
for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++) for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++)
pas_mixer_set(foo, levels[foo]); pas_mixer_set(foo, levels[foo]);
@ -220,7 +212,6 @@ static int pas_mixer_ioctl(int dev, unsigned int cmd, void __user *arg)
int level,v ; int level,v ;
int __user *p = (int __user *)arg; int __user *p = (int __user *)arg;
DEB(printk("pas2_mixer.c: int pas_mixer_ioctl(unsigned int cmd = %X, unsigned int arg = %X)\n", cmd, arg));
if (cmd == SOUND_MIXER_PRIVATE1) { /* Set loudness bit */ if (cmd == SOUND_MIXER_PRIVATE1) { /* Set loudness bit */
if (get_user(level, p)) if (get_user(level, p))
return -EFAULT; return -EFAULT;

View File

@ -22,10 +22,6 @@
#include "pas2.h" #include "pas2.h"
#ifndef DEB
#define DEB(WHAT)
#endif
#define PAS_PCM_INTRBITS (0x08) #define PAS_PCM_INTRBITS (0x08)
/* /*
* Sample buffer timer interrupt enable * Sample buffer timer interrupt enable
@ -156,8 +152,6 @@ static int pas_audio_ioctl(int dev, unsigned int cmd, void __user *arg)
int val, ret; int val, ret;
int __user *p = arg; int __user *p = arg;
DEB(printk("pas2_pcm.c: static int pas_audio_ioctl(unsigned int cmd = %X, unsigned int arg = %X)\n", cmd, arg));
switch (cmd) switch (cmd)
{ {
case SOUND_PCM_WRITE_RATE: case SOUND_PCM_WRITE_RATE:
@ -204,8 +198,6 @@ static int pas_audio_ioctl(int dev, unsigned int cmd, void __user *arg)
static void pas_audio_reset(int dev) static void pas_audio_reset(int dev)
{ {
DEB(printk("pas2_pcm.c: static void pas_audio_reset(void)\n"));
pas_write(pas_read(0xF8A) & ~0x40, 0xF8A); /* Disable PCM */ pas_write(pas_read(0xF8A) & ~0x40, 0xF8A); /* Disable PCM */
} }
@ -214,8 +206,6 @@ static int pas_audio_open(int dev, int mode)
int err; int err;
unsigned long flags; unsigned long flags;
DEB(printk("pas2_pcm.c: static int pas_audio_open(int mode = %X)\n", mode));
spin_lock_irqsave(&pas_lock, flags); spin_lock_irqsave(&pas_lock, flags);
if (pcm_busy) if (pcm_busy)
{ {
@ -239,8 +229,6 @@ static void pas_audio_close(int dev)
{ {
unsigned long flags; unsigned long flags;
DEB(printk("pas2_pcm.c: static void pas_audio_close(void)\n"));
spin_lock_irqsave(&pas_lock, flags); spin_lock_irqsave(&pas_lock, flags);
pas_audio_reset(dev); pas_audio_reset(dev);
@ -256,8 +244,6 @@ static void pas_audio_output_block(int dev, unsigned long buf, int count,
{ {
unsigned long flags, cnt; unsigned long flags, cnt;
DEB(printk("pas2_pcm.c: static void pas_audio_output_block(char *buf = %P, int count = %X)\n", buf, count));
cnt = count; cnt = count;
if (audio_devs[dev]->dmap_out->dma > 3) if (audio_devs[dev]->dmap_out->dma > 3)
cnt >>= 1; cnt >>= 1;
@ -303,8 +289,6 @@ static void pas_audio_start_input(int dev, unsigned long buf, int count,
unsigned long flags; unsigned long flags;
int cnt; int cnt;
DEB(printk("pas2_pcm.c: static void pas_audio_start_input(char *buf = %P, int count = %X)\n", buf, count));
cnt = count; cnt = count;
if (audio_devs[dev]->dmap_out->dma > 3) if (audio_devs[dev]->dmap_out->dma > 3)
cnt >>= 1; cnt >>= 1;
@ -388,8 +372,6 @@ static struct audio_driver pas_audio_driver =
void __init pas_pcm_init(struct address_info *hw_config) void __init pas_pcm_init(struct address_info *hw_config)
{ {
DEB(printk("pas2_pcm.c: long pas_pcm_init()\n"));
pcm_bitsok = 8; pcm_bitsok = 8;
if (pas_read(0xEF8B) & 0x08) if (pas_read(0xEF8B) & 0x08)
pcm_bitsok |= 16; pcm_bitsok |= 16;

View File

@ -226,8 +226,6 @@ int sb_dsp_reset(sb_devc * devc)
{ {
int loopc; int loopc;
DEB(printk("Entered sb_dsp_reset()\n"));
if (devc->model == MDL_ESS) return ess_dsp_reset (devc); if (devc->model == MDL_ESS) return ess_dsp_reset (devc);
/* This is only for non-ESS chips */ /* This is only for non-ESS chips */
@ -246,8 +244,6 @@ int sb_dsp_reset(sb_devc * devc)
return 0; /* Sorry */ return 0; /* Sorry */
} }
DEB(printk("sb_dsp_reset() OK\n"));
return 1; return 1;
} }

View File

@ -865,8 +865,6 @@ printk(KERN_INFO "FKS: ess_dsp_reset 1\n");
ess_show_mixerregs (devc); ess_show_mixerregs (devc);
#endif #endif
DEB(printk("Entered ess_dsp_reset()\n"));
outb(3, DSP_RESET); /* Reset FIFO too */ outb(3, DSP_RESET); /* Reset FIFO too */
udelay(10); udelay(10);
@ -881,8 +879,6 @@ ess_show_mixerregs (devc);
} }
ess_extended (devc); ess_extended (devc);
DEB(printk("sb_dsp_reset() OK\n"));
#ifdef FKS_LOGGING #ifdef FKS_LOGGING
printk(KERN_INFO "FKS: dsp_reset 2\n"); printk(KERN_INFO "FKS: dsp_reset 2\n");
ess_show_mixerregs (devc); ess_show_mixerregs (devc);

View File

@ -216,8 +216,6 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun
dev = dev >> 4; dev = dev >> 4;
DEB(printk("sequencer_write(dev=%d, count=%d)\n", dev, count));
if (mode == OPEN_READ) if (mode == OPEN_READ)
return -EIO; return -EIO;
@ -959,8 +957,6 @@ int sequencer_open(int dev, struct file *file)
dev = dev >> 4; dev = dev >> 4;
mode = translate_mode(file); mode = translate_mode(file);
DEB(printk("sequencer_open(dev=%d)\n", dev));
if (!sequencer_ok) if (!sequencer_ok)
{ {
/* printk("Sound card: sequencer not initialized\n");*/ /* printk("Sound card: sequencer not initialized\n");*/
@ -1133,8 +1129,6 @@ void sequencer_release(int dev, struct file *file)
dev = dev >> 4; dev = dev >> 4;
DEB(printk("sequencer_release(dev=%d)\n", dev));
/* /*
* Wait until the queue is empty (if we don't have nonblock) * Wait until the queue is empty (if we don't have nonblock)
*/ */

View File

@ -123,10 +123,6 @@ static inline int translate_mode(struct file *file)
#include "sound_calls.h" #include "sound_calls.h"
#include "dev_table.h" #include "dev_table.h"
#ifndef DEB
#define DEB(x)
#endif
#ifndef DDB #ifndef DDB
#define DDB(x) do {} while (0) #define DDB(x) do {} while (0)
#endif #endif

View File

@ -154,7 +154,6 @@ static ssize_t sound_read(struct file *file, char __user *buf, size_t count, lof
mutex_lock(&soundcard_mutex); mutex_lock(&soundcard_mutex);
DEB(printk("sound_read(dev=%d, count=%d)\n", dev, count));
switch (dev & 0x0f) { switch (dev & 0x0f) {
case SND_DEV_DSP: case SND_DEV_DSP:
case SND_DEV_DSP16: case SND_DEV_DSP16:
@ -180,7 +179,6 @@ static ssize_t sound_write(struct file *file, const char __user *buf, size_t cou
int ret = -EINVAL; int ret = -EINVAL;
mutex_lock(&soundcard_mutex); mutex_lock(&soundcard_mutex);
DEB(printk("sound_write(dev=%d, count=%d)\n", dev, count));
switch (dev & 0x0f) { switch (dev & 0x0f) {
case SND_DEV_SEQ: case SND_DEV_SEQ:
case SND_DEV_SEQ2: case SND_DEV_SEQ2:
@ -206,7 +204,6 @@ static int sound_open(struct inode *inode, struct file *file)
int dev = iminor(inode); int dev = iminor(inode);
int retval; int retval;
DEB(printk("sound_open(dev=%d)\n", dev));
if ((dev >= SND_NDEVS) || (dev < 0)) { if ((dev >= SND_NDEVS) || (dev < 0)) {
printk(KERN_ERR "Invalid minor device %d\n", dev); printk(KERN_ERR "Invalid minor device %d\n", dev);
return -ENXIO; return -ENXIO;
@ -257,7 +254,6 @@ static int sound_release(struct inode *inode, struct file *file)
int dev = iminor(inode); int dev = iminor(inode);
mutex_lock(&soundcard_mutex); mutex_lock(&soundcard_mutex);
DEB(printk("sound_release(dev=%d)\n", dev));
switch (dev & 0x0f) { switch (dev & 0x0f) {
case SND_DEV_CTL: case SND_DEV_CTL:
module_put(mixer_devs[dev >> 4]->owner); module_put(mixer_devs[dev >> 4]->owner);
@ -351,7 +347,6 @@ static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (!access_ok(VERIFY_WRITE, p, len)) if (!access_ok(VERIFY_WRITE, p, len))
return -EFAULT; return -EFAULT;
} }
DEB(printk("sound_ioctl(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg));
if (cmd == OSS_GETVERSION) if (cmd == OSS_GETVERSION)
return __put_user(SOUND_VERSION, (int __user *)p); return __put_user(SOUND_VERSION, (int __user *)p);
@ -409,7 +404,6 @@ static unsigned int sound_poll(struct file *file, poll_table * wait)
struct inode *inode = file_inode(file); struct inode *inode = file_inode(file);
int dev = iminor(inode); int dev = iminor(inode);
DEB(printk("sound_poll(dev=%d)\n", dev));
switch (dev & 0x0f) { switch (dev & 0x0f) {
case SND_DEV_SEQ: case SND_DEV_SEQ:
case SND_DEV_SEQ2: case SND_DEV_SEQ2:

View File

@ -274,19 +274,12 @@ static int reset_uart401(uart401_devc * devc)
} }
} }
/* Flush input before enabling interrupts */
if (ok) if (ok)
{ uart401_input_loop(devc);
DEB(printk("Reset UART401 OK\n"));
}
else else
DDB(printk("Reset UART401 failed - No hardware detected.\n")); DDB(printk("Reset UART401 failed - No hardware detected.\n"));
if (ok)
uart401_input_loop(devc); /*
* Flush input before enabling interrupts
*/
return ok; return ok;
} }

View File

@ -187,13 +187,14 @@ azx_assign_device(struct azx *chip, struct snd_pcm_substream *substream)
struct azx_dev *azx_dev = &chip->azx_dev[dev]; struct azx_dev *azx_dev = &chip->azx_dev[dev];
dsp_lock(azx_dev); dsp_lock(azx_dev);
if (!azx_dev->opened && !dsp_is_locked(azx_dev)) { if (!azx_dev->opened && !dsp_is_locked(azx_dev)) {
res = azx_dev; if (azx_dev->assigned_key == key) {
if (res->assigned_key == key) { azx_dev->opened = 1;
res->opened = 1; azx_dev->assigned_key = key;
res->assigned_key = key;
dsp_unlock(azx_dev); dsp_unlock(azx_dev);
return azx_dev; return azx_dev;
} }
if (!res)
res = azx_dev;
} }
dsp_unlock(azx_dev); dsp_unlock(azx_dev);
} }
@ -1604,7 +1605,7 @@ static void azx_exit_link_reset(struct azx *chip)
} }
/* reset codec link */ /* reset codec link */
static int azx_reset(struct azx *chip, int full_reset) static int azx_reset(struct azx *chip, bool full_reset)
{ {
if (!full_reset) if (!full_reset)
goto __skip; goto __skip;
@ -1701,7 +1702,7 @@ static void azx_int_clear(struct azx *chip)
/* /*
* reset and start the controller registers * reset and start the controller registers
*/ */
void azx_init_chip(struct azx *chip, int full_reset) void azx_init_chip(struct azx *chip, bool full_reset)
{ {
if (chip->initialized) if (chip->initialized)
return; return;
@ -1758,7 +1759,7 @@ irqreturn_t azx_interrupt(int irq, void *dev_id)
#ifdef CONFIG_PM_RUNTIME #ifdef CONFIG_PM_RUNTIME
if (chip->driver_caps & AZX_DCAPS_PM_RUNTIME) if (chip->driver_caps & AZX_DCAPS_PM_RUNTIME)
if (chip->card->dev->power.runtime_status != RPM_ACTIVE) if (!pm_runtime_active(chip->card->dev))
return IRQ_NONE; return IRQ_NONE;
#endif #endif
@ -1841,7 +1842,7 @@ static void azx_bus_reset(struct hda_bus *bus)
bus->in_reset = 1; bus->in_reset = 1;
azx_stop_chip(chip); azx_stop_chip(chip);
azx_init_chip(chip, 1); azx_init_chip(chip, true);
#ifdef CONFIG_PM #ifdef CONFIG_PM
if (chip->initialized) { if (chip->initialized) {
struct azx_pcm *p; struct azx_pcm *p;
@ -1948,7 +1949,7 @@ int azx_codec_create(struct azx *chip, const char *model,
* get back to the sanity state. * get back to the sanity state.
*/ */
azx_stop_chip(chip); azx_stop_chip(chip);
azx_init_chip(chip, 1); azx_init_chip(chip, true);
} }
} }
} }

View File

@ -37,7 +37,7 @@ int azx_alloc_stream_pages(struct azx *chip);
void azx_free_stream_pages(struct azx *chip); void azx_free_stream_pages(struct azx *chip);
/* Low level azx interface */ /* Low level azx interface */
void azx_init_chip(struct azx *chip, int full_reset); void azx_init_chip(struct azx *chip, bool full_reset);
void azx_stop_chip(struct azx *chip); void azx_stop_chip(struct azx *chip);
void azx_enter_link_reset(struct azx *chip); void azx_enter_link_reset(struct azx *chip);
irqreturn_t azx_interrupt(int irq, void *dev_id); irqreturn_t azx_interrupt(int irq, void *dev_id);

View File

@ -636,7 +636,7 @@ static int azx_resume(struct device *dev)
return -EIO; return -EIO;
azx_init_pci(chip); azx_init_pci(chip);
azx_init_chip(chip, 1); azx_init_chip(chip, true);
snd_hda_resume(chip->bus); snd_hda_resume(chip->bus);
snd_power_change_state(card, SNDRV_CTL_POWER_D0); snd_power_change_state(card, SNDRV_CTL_POWER_D0);
@ -689,7 +689,7 @@ static int azx_runtime_resume(struct device *dev)
status = azx_readw(chip, STATESTS); status = azx_readw(chip, STATESTS);
azx_init_pci(chip); azx_init_pci(chip);
azx_init_chip(chip, 1); azx_init_chip(chip, true);
bus = chip->bus; bus = chip->bus;
if (status && bus) { if (status && bus) {

View File

@ -3026,6 +3026,11 @@ static void alc283_init(struct hda_codec *codec)
bool hp_pin_sense; bool hp_pin_sense;
int val; int val;
if (!spec->gen.autocfg.hp_outs) {
if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
hp_pin = spec->gen.autocfg.line_out_pins[0];
}
alc283_restore_default_value(codec); alc283_restore_default_value(codec);
if (!hp_pin) if (!hp_pin)
@ -3062,6 +3067,11 @@ static void alc283_shutup(struct hda_codec *codec)
bool hp_pin_sense; bool hp_pin_sense;
int val; int val;
if (!spec->gen.autocfg.hp_outs) {
if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
hp_pin = spec->gen.autocfg.line_out_pins[0];
}
if (!hp_pin) { if (!hp_pin) {
alc269_shutup(codec); alc269_shutup(codec);
return; return;
@ -3085,6 +3095,7 @@ static void alc283_shutup(struct hda_codec *codec)
if (hp_pin_sense) if (hp_pin_sense)
msleep(100); msleep(100);
alc_auto_setup_eapd(codec, false);
snd_hda_shutup_pins(codec); snd_hda_shutup_pins(codec);
alc_write_coef_idx(codec, 0x43, 0x9614); alc_write_coef_idx(codec, 0x43, 0x9614);
} }
@ -3361,8 +3372,9 @@ static void alc269_fixup_mic_mute_hook(void *private_data, int enabled)
if (spec->mute_led_polarity) if (spec->mute_led_polarity)
enabled = !enabled; enabled = !enabled;
pinval = AC_PINCTL_IN_EN | pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid);
(enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80); pinval &= ~AC_PINCTL_VREFEN;
pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80;
if (spec->mute_led_nid) if (spec->mute_led_nid)
snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval);
} }
@ -3994,6 +4006,10 @@ static void alc283_fixup_chromebook(struct hda_codec *codec,
spec->gen.mixer_nid = 0; spec->gen.mixer_nid = 0;
break; break;
case HDA_FIXUP_ACT_INIT: case HDA_FIXUP_ACT_INIT:
/* MIC2-VREF control */
/* Set to manual mode */
val = alc_read_coef_idx(codec, 0x06);
alc_write_coef_idx(codec, 0x06, val & ~0x000c);
/* Enable Line1 input control by verb */ /* Enable Line1 input control by verb */
val = alc_read_coef_idx(codec, 0x1a); val = alc_read_coef_idx(codec, 0x1a);
alc_write_coef_idx(codec, 0x1a, val | (1 << 4)); alc_write_coef_idx(codec, 0x1a, val | (1 << 4));
@ -4602,6 +4618,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x0658, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0658, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x065f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x065f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0662, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0662, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0667, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
@ -4768,7 +4785,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
{.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
{.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"},
{.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-chrome"}, {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"},
{.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
{} {}
}; };

View File

@ -579,12 +579,37 @@ static struct snd_ak4xxx_private akm_vx442_priv = {
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int snd_ice1712_delta_resume(struct snd_ice1712 *ice) static int snd_ice1712_delta_resume(struct snd_ice1712 *ice)
{ {
unsigned char akm_backup[AK4XXX_IMAGE_SIZE]; unsigned char akm_img_bak[AK4XXX_IMAGE_SIZE];
unsigned char akm_vol_bak[AK4XXX_IMAGE_SIZE];
/* init spdif */
switch (ice->eeprom.subvendor) {
case ICE1712_SUBDEVICE_AUDIOPHILE:
case ICE1712_SUBDEVICE_DELTA410:
case ICE1712_SUBDEVICE_DELTA1010E:
case ICE1712_SUBDEVICE_DELTA1010LT:
case ICE1712_SUBDEVICE_VX442:
case ICE1712_SUBDEVICE_DELTA66E:
snd_cs8427_init(ice->i2c, ice->cs8427);
break;
case ICE1712_SUBDEVICE_DELTA1010:
case ICE1712_SUBDEVICE_MEDIASTATION:
/* nothing */
break;
case ICE1712_SUBDEVICE_DELTADIO2496:
case ICE1712_SUBDEVICE_DELTA66:
/* Set spdif defaults */
snd_ice1712_delta_cs8403_spdif_write(ice, ice->spdif.cs8403_bits);
break;
}
/* init codec and restore registers */ /* init codec and restore registers */
if (ice->akm_codecs) { if (ice->akm_codecs) {
memcpy(akm_backup, ice->akm->images, sizeof(akm_backup)); memcpy(akm_img_bak, ice->akm->images, sizeof(akm_img_bak));
memcpy(akm_vol_bak, ice->akm->volumes, sizeof(akm_vol_bak));
snd_akm4xxx_init(ice->akm); snd_akm4xxx_init(ice->akm);
memcpy(ice->akm->images, akm_backup, sizeof(akm_backup)); memcpy(ice->akm->images, akm_img_bak, sizeof(akm_img_bak));
memcpy(ice->akm->volumes, akm_vol_bak, sizeof(akm_vol_bak));
snd_akm4xxx_reset(ice->akm, 0); snd_akm4xxx_reset(ice->akm, 0);
} }

View File

@ -685,9 +685,10 @@ static snd_pcm_uframes_t snd_ice1712_playback_pointer(struct snd_pcm_substream *
if (!(snd_ice1712_read(ice, ICE1712_IREG_PBK_CTRL) & 1)) if (!(snd_ice1712_read(ice, ICE1712_IREG_PBK_CTRL) & 1))
return 0; return 0;
ptr = runtime->buffer_size - inw(ice->ddma_port + 4); ptr = runtime->buffer_size - inw(ice->ddma_port + 4);
ptr = bytes_to_frames(substream->runtime, ptr);
if (ptr == runtime->buffer_size) if (ptr == runtime->buffer_size)
ptr = 0; ptr = 0;
return bytes_to_frames(substream->runtime, ptr); return ptr;
} }
static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(struct snd_pcm_substream *substream) static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(struct snd_pcm_substream *substream)
@ -704,9 +705,10 @@ static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(struct snd_pcm_substrea
addr = ICE1712_DSC_ADDR0; addr = ICE1712_DSC_ADDR0;
ptr = snd_ice1712_ds_read(ice, substream->number * 2, addr) - ptr = snd_ice1712_ds_read(ice, substream->number * 2, addr) -
ice->playback_con_virt_addr[substream->number]; ice->playback_con_virt_addr[substream->number];
ptr = bytes_to_frames(substream->runtime, ptr);
if (ptr == substream->runtime->buffer_size) if (ptr == substream->runtime->buffer_size)
ptr = 0; ptr = 0;
return bytes_to_frames(substream->runtime, ptr); return ptr;
} }
static snd_pcm_uframes_t snd_ice1712_capture_pointer(struct snd_pcm_substream *substream) static snd_pcm_uframes_t snd_ice1712_capture_pointer(struct snd_pcm_substream *substream)
@ -717,9 +719,10 @@ static snd_pcm_uframes_t snd_ice1712_capture_pointer(struct snd_pcm_substream *s
if (!(snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL) & 1)) if (!(snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL) & 1))
return 0; return 0;
ptr = inl(ICEREG(ice, CONCAP_ADDR)) - ice->capture_con_virt_addr; ptr = inl(ICEREG(ice, CONCAP_ADDR)) - ice->capture_con_virt_addr;
ptr = bytes_to_frames(substream->runtime, ptr);
if (ptr == substream->runtime->buffer_size) if (ptr == substream->runtime->buffer_size)
ptr = 0; ptr = 0;
return bytes_to_frames(substream->runtime, ptr); return ptr;
} }
static const struct snd_pcm_hardware snd_ice1712_playback = { static const struct snd_pcm_hardware snd_ice1712_playback = {
@ -1048,6 +1051,8 @@ __out:
old = inb(ICEMT(ice, RATE)); old = inb(ICEMT(ice, RATE));
if (!force && old == val) if (!force && old == val)
goto __out; goto __out;
ice->cur_rate = rate;
outb(val, ICEMT(ice, RATE)); outb(val, ICEMT(ice, RATE));
spin_unlock_irqrestore(&ice->reg_lock, flags); spin_unlock_irqrestore(&ice->reg_lock, flags);
@ -1114,9 +1119,10 @@ static snd_pcm_uframes_t snd_ice1712_playback_pro_pointer(struct snd_pcm_substre
if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_PLAYBACK_START)) if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_PLAYBACK_START))
return 0; return 0;
ptr = ice->playback_pro_size - (inw(ICEMT(ice, PLAYBACK_SIZE)) << 2); ptr = ice->playback_pro_size - (inw(ICEMT(ice, PLAYBACK_SIZE)) << 2);
ptr = bytes_to_frames(substream->runtime, ptr);
if (ptr == substream->runtime->buffer_size) if (ptr == substream->runtime->buffer_size)
ptr = 0; ptr = 0;
return bytes_to_frames(substream->runtime, ptr); return ptr;
} }
static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(struct snd_pcm_substream *substream) static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(struct snd_pcm_substream *substream)
@ -1127,9 +1133,10 @@ static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(struct snd_pcm_substrea
if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_CAPTURE_START_SHADOW)) if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_CAPTURE_START_SHADOW))
return 0; return 0;
ptr = ice->capture_pro_size - (inw(ICEMT(ice, CAPTURE_SIZE)) << 2); ptr = ice->capture_pro_size - (inw(ICEMT(ice, CAPTURE_SIZE)) << 2);
ptr = bytes_to_frames(substream->runtime, ptr);
if (ptr == substream->runtime->buffer_size) if (ptr == substream->runtime->buffer_size)
ptr = 0; ptr = 0;
return bytes_to_frames(substream->runtime, ptr); return ptr;
} }
static const struct snd_pcm_hardware snd_ice1712_playback_pro = { static const struct snd_pcm_hardware snd_ice1712_playback_pro = {
@ -2832,6 +2839,12 @@ static int snd_ice1712_suspend(struct device *dev)
snd_pcm_suspend_all(ice->pcm_ds); snd_pcm_suspend_all(ice->pcm_ds);
snd_ac97_suspend(ice->ac97); snd_ac97_suspend(ice->ac97);
spin_lock_irq(&ice->reg_lock);
ice->pm_saved_is_spdif_master = is_spdif_master(ice);
ice->pm_saved_spdif_ctrl = inw(ICEMT(ice, ROUTE_SPDOUT));
ice->pm_saved_route = inw(ICEMT(ice, ROUTE_PSDOUT03));
spin_unlock_irq(&ice->reg_lock);
if (ice->pm_suspend) if (ice->pm_suspend)
ice->pm_suspend(ice); ice->pm_suspend(ice);
@ -2846,6 +2859,7 @@ static int snd_ice1712_resume(struct device *dev)
struct pci_dev *pci = to_pci_dev(dev); struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev); struct snd_card *card = dev_get_drvdata(dev);
struct snd_ice1712 *ice = card->private_data; struct snd_ice1712 *ice = card->private_data;
int rate;
if (!ice->pm_suspend_enabled) if (!ice->pm_suspend_enabled)
return 0; return 0;
@ -2860,14 +2874,37 @@ static int snd_ice1712_resume(struct device *dev)
pci_set_master(pci); pci_set_master(pci);
if (ice->cur_rate)
rate = ice->cur_rate;
else
rate = PRO_RATE_DEFAULT;
if (snd_ice1712_chip_init(ice) < 0) { if (snd_ice1712_chip_init(ice) < 0) {
snd_card_disconnect(card); snd_card_disconnect(card);
return -EIO; return -EIO;
} }
ice->cur_rate = rate;
if (ice->pm_resume) if (ice->pm_resume)
ice->pm_resume(ice); ice->pm_resume(ice);
if (ice->pm_saved_is_spdif_master) {
/* switching to external clock via SPDIF */
spin_lock_irq(&ice->reg_lock);
outb(inb(ICEMT(ice, RATE)) | ICE1712_SPDIF_MASTER,
ICEMT(ice, RATE));
spin_unlock_irq(&ice->reg_lock);
snd_ice1712_set_input_clock_source(ice, 1);
} else {
/* internal on-card clock */
snd_ice1712_set_pro_rate(ice, rate, 1);
snd_ice1712_set_input_clock_source(ice, 0);
}
outw(ice->pm_saved_spdif_ctrl, ICEMT(ice, ROUTE_SPDOUT));
outw(ice->pm_saved_route, ICEMT(ice, ROUTE_PSDOUT03));
if (ice->ac97) if (ice->ac97)
snd_ac97_resume(ice->ac97); snd_ac97_resume(ice->ac97);

View File

@ -902,7 +902,6 @@ static int alc5623_probe(struct snd_soc_codec *codec)
{ {
struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec); struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec);
struct snd_soc_dapm_context *dapm = &codec->dapm; struct snd_soc_dapm_context *dapm = &codec->dapm;
int ret;
alc5623_reset(codec); alc5623_reset(codec);
@ -961,7 +960,7 @@ static int alc5623_probe(struct snd_soc_codec *codec)
return -EINVAL; return -EINVAL;
} }
return ret; return 0;
} }
/* power down chip */ /* power down chip */

View File

@ -1061,7 +1061,6 @@ static int alc5632_resume(struct snd_soc_codec *codec)
static int alc5632_probe(struct snd_soc_codec *codec) static int alc5632_probe(struct snd_soc_codec *codec)
{ {
struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec); struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec);
int ret;
/* power on device */ /* power on device */
alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY); alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
@ -1075,7 +1074,7 @@ static int alc5632_probe(struct snd_soc_codec *codec)
return -EINVAL; return -EINVAL;
} }
return ret; return 0;
} }
/* power down chip */ /* power down chip */
@ -1191,11 +1190,18 @@ static const struct i2c_device_id alc5632_i2c_table[] = {
}; };
MODULE_DEVICE_TABLE(i2c, alc5632_i2c_table); MODULE_DEVICE_TABLE(i2c, alc5632_i2c_table);
static const struct of_device_id alc5632_of_match[] = {
{ .compatible = "realtek,alc5632", },
{ }
};
MODULE_DEVICE_TABLE(of, alc5632_of_match);
/* i2c codec control layer */ /* i2c codec control layer */
static struct i2c_driver alc5632_i2c_driver = { static struct i2c_driver alc5632_i2c_driver = {
.driver = { .driver = {
.name = "alc5632", .name = "alc5632",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = of_match_ptr(alc5632_of_match),
}, },
.probe = alc5632_i2c_probe, .probe = alc5632_i2c_probe,
.remove = alc5632_i2c_remove, .remove = alc5632_i2c_remove,

View File

@ -1259,7 +1259,7 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
} }
dev_info(&i2c_client->dev, "Cirrus Logic CS42L52, Revision: %02X\n", dev_info(&i2c_client->dev, "Cirrus Logic CS42L52, Revision: %02X\n",
reg & 0xFF); reg & CS42L52_CHIP_REV_MASK);
/* Set Platform Data */ /* Set Platform Data */
if (cs42l52->pdata.mica_diff_cfg) if (cs42l52->pdata.mica_diff_cfg)

View File

@ -37,7 +37,7 @@
#define CS42L52_CHIP_REV_A0 0x00 #define CS42L52_CHIP_REV_A0 0x00
#define CS42L52_CHIP_REV_A1 0x01 #define CS42L52_CHIP_REV_A1 0x01
#define CS42L52_CHIP_REV_B0 0x02 #define CS42L52_CHIP_REV_B0 0x02
#define CS42L52_CHIP_REV_MASK 0x03 #define CS42L52_CHIP_REV_MASK 0x07
#define CS42L52_PWRCTL1 0x02 #define CS42L52_PWRCTL1 0x02
#define CS42L52_PWRCTL1_PDN_ALL 0x9F #define CS42L52_PWRCTL1_PDN_ALL 0x9F

View File

@ -495,17 +495,16 @@ int cs42xx8_probe(struct device *dev, struct regmap *regmap)
regcache_cache_bypass(cs42xx8->regmap, true); regcache_cache_bypass(cs42xx8->regmap, true);
/* Validate the chip ID */ /* Validate the chip ID */
regmap_read(cs42xx8->regmap, CS42XX8_CHIPID, &val); ret = regmap_read(cs42xx8->regmap, CS42XX8_CHIPID, &val);
if (val < 0) { if (ret < 0) {
dev_err(dev, "failed to get device ID: %x", val); dev_err(dev, "failed to get device ID, ret = %d", ret);
ret = -EINVAL;
goto err_enable; goto err_enable;
} }
/* The top four bits of the chip ID should be 0000 */ /* The top four bits of the chip ID should be 0000 */
if ((val & CS42XX8_CHIPID_CHIP_ID_MASK) != 0x00) { if (((val & CS42XX8_CHIPID_CHIP_ID_MASK) >> 4) != 0x00) {
dev_err(dev, "unmatched chip ID: %d\n", dev_err(dev, "unmatched chip ID: %d\n",
val & CS42XX8_CHIPID_CHIP_ID_MASK); (val & CS42XX8_CHIPID_CHIP_ID_MASK) >> 4);
ret = -EINVAL; ret = -EINVAL;
goto err_enable; goto err_enable;
} }

View File

@ -1571,7 +1571,8 @@ static int da732x_i2c_probe(struct i2c_client *i2c,
} }
dev_info(&i2c->dev, "Revision: %d.%d\n", dev_info(&i2c->dev, "Revision: %d.%d\n",
(reg & DA732X_ID_MAJOR_MASK), (reg & DA732X_ID_MINOR_MASK)); (reg & DA732X_ID_MAJOR_MASK) >> 4,
(reg & DA732X_ID_MINOR_MASK));
ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da732x, ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da732x,
da732x_dai, ARRAY_SIZE(da732x_dai)); da732x_dai, ARRAY_SIZE(da732x_dai));

View File

@ -2399,11 +2399,18 @@ static const struct i2c_device_id max98090_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, max98090_i2c_id); MODULE_DEVICE_TABLE(i2c, max98090_i2c_id);
static const struct of_device_id max98090_of_match[] = {
{ .compatible = "maxim,max98090", },
{ }
};
MODULE_DEVICE_TABLE(of, max98090_of_match);
static struct i2c_driver max98090_i2c_driver = { static struct i2c_driver max98090_i2c_driver = {
.driver = { .driver = {
.name = "max98090", .name = "max98090",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = &max98090_pm, .pm = &max98090_pm,
.of_match_table = of_match_ptr(max98090_of_match),
}, },
.probe = max98090_i2c_probe, .probe = max98090_i2c_probe,
.remove = max98090_i2c_remove, .remove = max98090_i2c_remove,

View File

@ -2074,6 +2074,14 @@ static const struct i2c_device_id rt5640_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id); MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id);
#if defined(CONFIG_OF)
static const struct of_device_id rt5640_of_match[] = {
{ .compatible = "realtek,rt5640", },
{},
};
MODULE_DEVICE_TABLE(of, rt5640_of_match);
#endif
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
static struct acpi_device_id rt5640_acpi_match[] = { static struct acpi_device_id rt5640_acpi_match[] = {
{ "INT33CA", 0 }, { "INT33CA", 0 },
@ -2203,6 +2211,7 @@ static struct i2c_driver rt5640_i2c_driver = {
.name = "rt5640", .name = "rt5640",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.acpi_match_table = ACPI_PTR(rt5640_acpi_match), .acpi_match_table = ACPI_PTR(rt5640_acpi_match),
.of_match_table = of_match_ptr(rt5640_of_match),
}, },
.probe = rt5640_i2c_probe, .probe = rt5640_i2c_probe,
.remove = rt5640_i2c_remove, .remove = rt5640_i2c_remove,

View File

@ -43,9 +43,16 @@ static const struct i2c_device_id tlv320aic23_id[] = {
MODULE_DEVICE_TABLE(i2c, tlv320aic23_id); MODULE_DEVICE_TABLE(i2c, tlv320aic23_id);
static const struct of_device_id tlv320aic23_of_match[] = {
{ .compatible = "ti,tlv320aic23", },
{ }
};
MODULE_DEVICE_TABLE(of, tlv320aic23_of_match);
static struct i2c_driver tlv320aic23_i2c_driver = { static struct i2c_driver tlv320aic23_i2c_driver = {
.driver = { .driver = {
.name = "tlv320aic23-codec", .name = "tlv320aic23-codec",
.of_match_table = of_match_ptr(tlv320aic23_of_match),
}, },
.probe = tlv320aic23_i2c_probe, .probe = tlv320aic23_i2c_probe,
.remove = __exit_p(tlv320aic23_i2c_remove), .remove = __exit_p(tlv320aic23_i2c_remove),

View File

@ -336,7 +336,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL); mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
mcasp_clr_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL); mcasp_clr_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL); mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
mcasp_clr_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL); mcasp_clr_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
break; break;
@ -344,7 +344,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL); mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL); mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL); mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL); mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
break; break;
@ -352,7 +352,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL); mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL); mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL); mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL); mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
break; break;

View File

@ -23,6 +23,71 @@
#include "fsl_sai.h" #include "fsl_sai.h"
#define FSL_SAI_FLAGS (FSL_SAI_CSR_SEIE |\
FSL_SAI_CSR_FEIE)
static irqreturn_t fsl_sai_isr(int irq, void *devid)
{
struct fsl_sai *sai = (struct fsl_sai *)devid;
struct device *dev = &sai->pdev->dev;
u32 xcsr, mask;
/* Only handle those what we enabled */
mask = (FSL_SAI_FLAGS >> FSL_SAI_CSR_xIE_SHIFT) << FSL_SAI_CSR_xF_SHIFT;
/* Tx IRQ */
regmap_read(sai->regmap, FSL_SAI_TCSR, &xcsr);
xcsr &= mask;
if (xcsr & FSL_SAI_CSR_WSF)
dev_dbg(dev, "isr: Start of Tx word detected\n");
if (xcsr & FSL_SAI_CSR_SEF)
dev_warn(dev, "isr: Tx Frame sync error detected\n");
if (xcsr & FSL_SAI_CSR_FEF) {
dev_warn(dev, "isr: Transmit underrun detected\n");
/* FIFO reset for safety */
xcsr |= FSL_SAI_CSR_FR;
}
if (xcsr & FSL_SAI_CSR_FWF)
dev_dbg(dev, "isr: Enabled transmit FIFO is empty\n");
if (xcsr & FSL_SAI_CSR_FRF)
dev_dbg(dev, "isr: Transmit FIFO watermark has been reached\n");
regmap_update_bits(sai->regmap, FSL_SAI_TCSR,
FSL_SAI_CSR_xF_W_MASK | FSL_SAI_CSR_FR, xcsr);
/* Rx IRQ */
regmap_read(sai->regmap, FSL_SAI_RCSR, &xcsr);
xcsr &= mask;
if (xcsr & FSL_SAI_CSR_WSF)
dev_dbg(dev, "isr: Start of Rx word detected\n");
if (xcsr & FSL_SAI_CSR_SEF)
dev_warn(dev, "isr: Rx Frame sync error detected\n");
if (xcsr & FSL_SAI_CSR_FEF) {
dev_warn(dev, "isr: Receive overflow detected\n");
/* FIFO reset for safety */
xcsr |= FSL_SAI_CSR_FR;
}
if (xcsr & FSL_SAI_CSR_FWF)
dev_dbg(dev, "isr: Enabled receive FIFO is full\n");
if (xcsr & FSL_SAI_CSR_FRF)
dev_dbg(dev, "isr: Receive FIFO watermark has been reached\n");
regmap_update_bits(sai->regmap, FSL_SAI_RCSR,
FSL_SAI_CSR_xF_W_MASK | FSL_SAI_CSR_FR, xcsr);
return IRQ_HANDLED;
}
static int fsl_sai_set_dai_sysclk_tr(struct snd_soc_dai *cpu_dai, static int fsl_sai_set_dai_sysclk_tr(struct snd_soc_dai *cpu_dai,
int clk_id, unsigned int freq, int fsl_dir) int clk_id, unsigned int freq, int fsl_dir)
{ {
@ -114,7 +179,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* that is, together with the last bit of the previous * that is, together with the last bit of the previous
* data word. * data word.
*/ */
val_cr2 &= ~FSL_SAI_CR2_BCP; val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP; val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
break; break;
case SND_SOC_DAIFMT_LEFT_J: case SND_SOC_DAIFMT_LEFT_J:
@ -122,7 +187,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* Frame high, one word length for frame sync, * Frame high, one word length for frame sync,
* frame sync asserts with the first bit of the frame. * frame sync asserts with the first bit of the frame.
*/ */
val_cr2 &= ~FSL_SAI_CR2_BCP; val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP); val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
break; break;
case SND_SOC_DAIFMT_DSP_A: case SND_SOC_DAIFMT_DSP_A:
@ -132,7 +197,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* that is, together with the last bit of the previous * that is, together with the last bit of the previous
* data word. * data word.
*/ */
val_cr2 &= ~FSL_SAI_CR2_BCP; val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~FSL_SAI_CR4_FSP; val_cr4 &= ~FSL_SAI_CR4_FSP;
val_cr4 |= FSL_SAI_CR4_FSE; val_cr4 |= FSL_SAI_CR4_FSE;
sai->is_dsp_mode = true; sai->is_dsp_mode = true;
@ -142,7 +207,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* Frame high, one bit for frame sync, * Frame high, one bit for frame sync,
* frame sync asserts with the first bit of the frame. * frame sync asserts with the first bit of the frame.
*/ */
val_cr2 &= ~FSL_SAI_CR2_BCP; val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP); val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
sai->is_dsp_mode = true; sai->is_dsp_mode = true;
break; break;
@ -373,8 +438,8 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
{ {
struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev); struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev);
regmap_update_bits(sai->regmap, FSL_SAI_TCSR, 0xffffffff, 0x0); regmap_update_bits(sai->regmap, FSL_SAI_TCSR, 0xffffffff, FSL_SAI_FLAGS);
regmap_update_bits(sai->regmap, FSL_SAI_RCSR, 0xffffffff, 0x0); regmap_update_bits(sai->regmap, FSL_SAI_RCSR, 0xffffffff, FSL_SAI_FLAGS);
regmap_update_bits(sai->regmap, FSL_SAI_TCR1, FSL_SAI_CR1_RFW_MASK, regmap_update_bits(sai->regmap, FSL_SAI_TCR1, FSL_SAI_CR1_RFW_MASK,
FSL_SAI_MAXBURST_TX * 2); FSL_SAI_MAXBURST_TX * 2);
regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK, regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK,
@ -490,12 +555,14 @@ static int fsl_sai_probe(struct platform_device *pdev)
struct fsl_sai *sai; struct fsl_sai *sai;
struct resource *res; struct resource *res;
void __iomem *base; void __iomem *base;
int ret; int irq, ret;
sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL); sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL);
if (!sai) if (!sai)
return -ENOMEM; return -ENOMEM;
sai->pdev = pdev;
sai->big_endian_regs = of_property_read_bool(np, "big-endian-regs"); sai->big_endian_regs = of_property_read_bool(np, "big-endian-regs");
if (sai->big_endian_regs) if (sai->big_endian_regs)
fsl_sai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG; fsl_sai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
@ -514,6 +581,18 @@ static int fsl_sai_probe(struct platform_device *pdev)
return PTR_ERR(sai->regmap); return PTR_ERR(sai->regmap);
} }
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
return irq;
}
ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai);
if (ret) {
dev_err(&pdev->dev, "failed to claim irq %u\n", irq);
return ret;
}
sai->dma_params_rx.addr = res->start + FSL_SAI_RDR; sai->dma_params_rx.addr = res->start + FSL_SAI_RDR;
sai->dma_params_tx.addr = res->start + FSL_SAI_TDR; sai->dma_params_tx.addr = res->start + FSL_SAI_TDR;
sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX; sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX;

View File

@ -37,7 +37,21 @@
/* SAI Transmit/Recieve Control Register */ /* SAI Transmit/Recieve Control Register */
#define FSL_SAI_CSR_TERE BIT(31) #define FSL_SAI_CSR_TERE BIT(31)
#define FSL_SAI_CSR_FR BIT(25)
#define FSL_SAI_CSR_xF_SHIFT 16
#define FSL_SAI_CSR_xF_W_SHIFT 18
#define FSL_SAI_CSR_xF_MASK (0x1f << FSL_SAI_CSR_xF_SHIFT)
#define FSL_SAI_CSR_xF_W_MASK (0x7 << FSL_SAI_CSR_xF_W_SHIFT)
#define FSL_SAI_CSR_WSF BIT(20)
#define FSL_SAI_CSR_SEF BIT(19)
#define FSL_SAI_CSR_FEF BIT(18)
#define FSL_SAI_CSR_FWF BIT(17) #define FSL_SAI_CSR_FWF BIT(17)
#define FSL_SAI_CSR_FRF BIT(16)
#define FSL_SAI_CSR_xIE_SHIFT 8
#define FSL_SAI_CSR_WSIE BIT(12)
#define FSL_SAI_CSR_SEIE BIT(11)
#define FSL_SAI_CSR_FEIE BIT(10)
#define FSL_SAI_CSR_FWIE BIT(9)
#define FSL_SAI_CSR_FRIE BIT(8) #define FSL_SAI_CSR_FRIE BIT(8)
#define FSL_SAI_CSR_FRDE BIT(0) #define FSL_SAI_CSR_FRDE BIT(0)
@ -99,6 +113,7 @@
#define FSL_SAI_MAXBURST_RX 6 #define FSL_SAI_MAXBURST_RX 6
struct fsl_sai { struct fsl_sai {
struct platform_device *pdev;
struct regmap *regmap; struct regmap *regmap;
bool big_endian_regs; bool big_endian_regs;

View File

@ -39,15 +39,15 @@ struct s3c_ac97_info {
}; };
static struct s3c_ac97_info s3c_ac97; static struct s3c_ac97_info s3c_ac97;
static struct s3c2410_dma_client s3c_dma_client_out = { static struct s3c_dma_client s3c_dma_client_out = {
.name = "AC97 PCMOut" .name = "AC97 PCMOut"
}; };
static struct s3c2410_dma_client s3c_dma_client_in = { static struct s3c_dma_client s3c_dma_client_in = {
.name = "AC97 PCMIn" .name = "AC97 PCMIn"
}; };
static struct s3c2410_dma_client s3c_dma_client_micin = { static struct s3c_dma_client s3c_dma_client_micin = {
.name = "AC97 MicIn" .name = "AC97 MicIn"
}; };

View File

@ -14,8 +14,12 @@
#include <sound/dmaengine_pcm.h> #include <sound/dmaengine_pcm.h>
struct s3c_dma_client {
char *name;
};
struct s3c_dma_params { struct s3c_dma_params {
struct s3c2410_dma_client *client; /* stream identifier */ struct s3c_dma_client *client; /* stream identifier */
int channel; /* Channel ID */ int channel; /* Channel ID */
dma_addr_t dma_addr; dma_addr_t dma_addr;
int dma_size; /* Size of the DMA transfer */ int dma_size; /* Size of the DMA transfer */

View File

@ -1211,10 +1211,10 @@ static int samsung_i2s_probe(struct platform_device *pdev)
pri_dai->dma_playback.dma_addr = regs_base + I2STXD; pri_dai->dma_playback.dma_addr = regs_base + I2STXD;
pri_dai->dma_capture.dma_addr = regs_base + I2SRXD; pri_dai->dma_capture.dma_addr = regs_base + I2SRXD;
pri_dai->dma_playback.client = pri_dai->dma_playback.client =
(struct s3c2410_dma_client *)&pri_dai->dma_playback; (struct s3c_dma_client *)&pri_dai->dma_playback;
pri_dai->dma_playback.ch_name = "tx"; pri_dai->dma_playback.ch_name = "tx";
pri_dai->dma_capture.client = pri_dai->dma_capture.client =
(struct s3c2410_dma_client *)&pri_dai->dma_capture; (struct s3c_dma_client *)&pri_dai->dma_capture;
pri_dai->dma_capture.ch_name = "rx"; pri_dai->dma_capture.ch_name = "rx";
pri_dai->dma_playback.dma_size = 4; pri_dai->dma_playback.dma_size = 4;
pri_dai->dma_capture.dma_size = 4; pri_dai->dma_capture.dma_size = 4;
@ -1233,7 +1233,7 @@ static int samsung_i2s_probe(struct platform_device *pdev)
} }
sec_dai->dma_playback.dma_addr = regs_base + I2STXDS; sec_dai->dma_playback.dma_addr = regs_base + I2STXDS;
sec_dai->dma_playback.client = sec_dai->dma_playback.client =
(struct s3c2410_dma_client *)&sec_dai->dma_playback; (struct s3c_dma_client *)&sec_dai->dma_playback;
sec_dai->dma_playback.ch_name = "tx-sec"; sec_dai->dma_playback.ch_name = "tx-sec";
if (!np) { if (!np) {

View File

@ -20,7 +20,6 @@
#include <sound/pcm_params.h> #include <sound/pcm_params.h>
#include <linux/platform_data/asoc-s3c.h> #include <linux/platform_data/asoc-s3c.h>
#include <mach/dma.h>
#include "dma.h" #include "dma.h"
#include "pcm.h" #include "pcm.h"
@ -132,11 +131,11 @@ struct s3c_pcm_info {
struct s3c_dma_params *dma_capture; struct s3c_dma_params *dma_capture;
}; };
static struct s3c2410_dma_client s3c_pcm_dma_client_out = { static struct s3c_dma_client s3c_pcm_dma_client_out = {
.name = "PCM Stereo out" .name = "PCM Stereo out"
}; };
static struct s3c2410_dma_client s3c_pcm_dma_client_in = { static struct s3c_dma_client s3c_pcm_dma_client_in = {
.name = "PCM Stereo in" .name = "PCM Stereo in"
}; };

View File

@ -33,11 +33,11 @@
#include "regs-i2s-v2.h" #include "regs-i2s-v2.h"
#include "s3c2412-i2s.h" #include "s3c2412-i2s.h"
static struct s3c2410_dma_client s3c2412_dma_client_out = { static struct s3c_dma_client s3c2412_dma_client_out = {
.name = "I2S PCM Stereo out" .name = "I2S PCM Stereo out"
}; };
static struct s3c2410_dma_client s3c2412_dma_client_in = { static struct s3c_dma_client s3c2412_dma_client_in = {
.name = "I2S PCM Stereo in" .name = "I2S PCM Stereo in"
}; };

View File

@ -31,11 +31,11 @@
#include "dma.h" #include "dma.h"
#include "s3c24xx-i2s.h" #include "s3c24xx-i2s.h"
static struct s3c2410_dma_client s3c24xx_dma_client_out = { static struct s3c_dma_client s3c24xx_dma_client_out = {
.name = "I2S PCM Stereo out" .name = "I2S PCM Stereo out"
}; };
static struct s3c2410_dma_client s3c24xx_dma_client_in = { static struct s3c_dma_client s3c24xx_dma_client_in = {
.name = "I2S PCM Stereo in" .name = "I2S PCM Stereo in"
}; };

View File

@ -18,7 +18,6 @@
#include <sound/pcm_params.h> #include <sound/pcm_params.h>
#include <linux/platform_data/asoc-s3c.h> #include <linux/platform_data/asoc-s3c.h>
#include <mach/dma.h>
#include "dma.h" #include "dma.h"
#include "spdif.h" #include "spdif.h"
@ -94,7 +93,7 @@ struct samsung_spdif_info {
struct s3c_dma_params *dma_playback; struct s3c_dma_params *dma_playback;
}; };
static struct s3c2410_dma_client spdif_dma_client_out = { static struct s3c_dma_client spdif_dma_client_out = {
.name = "S/PDIF Stereo out", .name = "S/PDIF Stereo out",
}; };

View File

@ -1501,7 +1501,8 @@ static void retire_playback_urb(struct snd_usb_substream *subs,
* The error should be lower than 2ms since the estimate relies * The error should be lower than 2ms since the estimate relies
* on two reads of a counter updated every ms. * on two reads of a counter updated every ms.
*/ */
if (abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2) if (printk_ratelimit() &&
abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2)
dev_dbg(&subs->dev->dev, dev_dbg(&subs->dev->dev,
"delay: estimated %d, actual %d\n", "delay: estimated %d, actual %d\n",
est_delay, subs->last_delay); est_delay, subs->last_delay);