diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-11-22 02:11:10 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-11-22 02:11:10 -0500 |
commit | d2b88e4c103f37584dc81ef8a41ca584c1ce847b (patch) | |
tree | 247ac000bec902fcc580757d236caa053755ea27 | |
parent | 2146dcfd15ad55cfdd18b45e1e6601d6a86f0cbe (diff) | |
parent | a1d71a2c91239ecc1c1f9c97a081d71ebd30bfe5 (diff) |
Merge branch 'fix/misc' into topic/misc
-rw-r--r-- | sound/atmel/abdac.c | 2 | ||||
-rw-r--r-- | sound/core/pcm_lib.c | 2 | ||||
-rw-r--r-- | sound/oss/dev_table.c | 6 | ||||
-rw-r--r-- | sound/oss/midibuf.c | 4 | ||||
-rw-r--r-- | sound/oss/pss.c | 6 | ||||
-rw-r--r-- | sound/oss/sequencer.c | 4 | ||||
-rw-r--r-- | sound/pci/asihpi/hpioctl.c | 2 | ||||
-rw-r--r-- | sound/pci/azt3328.c | 26 | ||||
-rw-r--r-- | sound/pci/ctxfi/ctpcm.c | 16 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 11 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 14 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 6 | ||||
-rw-r--r-- | sound/pci/mixart/mixart_hwdep.h | 10 | ||||
-rw-r--r-- | sound/ppc/pmac.c | 12 | ||||
-rw-r--r-- | sound/soc/codecs/Kconfig | 3 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 36 | ||||
-rw-r--r-- | sound/soc/codecs/tpa6130a2.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm8900.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 2 | ||||
-rw-r--r-- | sound/soc/pxa/tosa.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 5 | ||||
-rw-r--r-- | sound/spi/at73c213.c | 2 |
23 files changed, 120 insertions, 64 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index f2f41c854221..4e47baada66f 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
@@ -420,7 +420,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev) | |||
420 | return PTR_ERR(pclk); | 420 | return PTR_ERR(pclk); |
421 | } | 421 | } |
422 | sample_clk = clk_get(&pdev->dev, "sample_clk"); | 422 | sample_clk = clk_get(&pdev->dev, "sample_clk"); |
423 | if (IS_ERR(pclk)) { | 423 | if (IS_ERR(sample_clk)) { |
424 | dev_dbg(&pdev->dev, "no sample clock\n"); | 424 | dev_dbg(&pdev->dev, "no sample clock\n"); |
425 | retval = PTR_ERR(pclk); | 425 | retval = PTR_ERR(pclk); |
426 | goto out_put_pclk; | 426 | goto out_put_pclk; |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index a1707cca9c66..b75db8e9cc0f 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -223,7 +223,7 @@ static void xrun_log(struct snd_pcm_substream *substream, | |||
223 | entry->jiffies = jiffies; | 223 | entry->jiffies = jiffies; |
224 | entry->pos = pos; | 224 | entry->pos = pos; |
225 | entry->period_size = runtime->period_size; | 225 | entry->period_size = runtime->period_size; |
226 | entry->buffer_size = runtime->buffer_size;; | 226 | entry->buffer_size = runtime->buffer_size; |
227 | entry->old_hw_ptr = runtime->status->hw_ptr; | 227 | entry->old_hw_ptr = runtime->status->hw_ptr; |
228 | entry->hw_ptr_base = runtime->hw_ptr_base; | 228 | entry->hw_ptr_base = runtime->hw_ptr_base; |
229 | log->idx = (log->idx + 1) % XRUN_LOG_CNT; | 229 | log->idx = (log->idx + 1) % XRUN_LOG_CNT; |
diff --git a/sound/oss/dev_table.c b/sound/oss/dev_table.c index 727bdb9ba2dc..d8cf3e58dc76 100644 --- a/sound/oss/dev_table.c +++ b/sound/oss/dev_table.c | |||
@@ -71,7 +71,7 @@ int sound_install_audiodrv(int vers, char *name, struct audio_driver *driver, | |||
71 | if (sound_nblocks >= MAX_MEM_BLOCKS) | 71 | if (sound_nblocks >= MAX_MEM_BLOCKS) |
72 | sound_nblocks = MAX_MEM_BLOCKS - 1; | 72 | sound_nblocks = MAX_MEM_BLOCKS - 1; |
73 | 73 | ||
74 | op = (struct audio_operations *) (sound_mem_blocks[sound_nblocks] = vmalloc(sizeof(struct audio_operations))); | 74 | op = (struct audio_operations *) (sound_mem_blocks[sound_nblocks] = vzalloc(sizeof(struct audio_operations))); |
75 | sound_nblocks++; | 75 | sound_nblocks++; |
76 | if (sound_nblocks >= MAX_MEM_BLOCKS) | 76 | if (sound_nblocks >= MAX_MEM_BLOCKS) |
77 | sound_nblocks = MAX_MEM_BLOCKS - 1; | 77 | sound_nblocks = MAX_MEM_BLOCKS - 1; |
@@ -81,7 +81,6 @@ int sound_install_audiodrv(int vers, char *name, struct audio_driver *driver, | |||
81 | sound_unload_audiodev(num); | 81 | sound_unload_audiodev(num); |
82 | return -(ENOMEM); | 82 | return -(ENOMEM); |
83 | } | 83 | } |
84 | memset((char *) op, 0, sizeof(struct audio_operations)); | ||
85 | init_waitqueue_head(&op->in_sleeper); | 84 | init_waitqueue_head(&op->in_sleeper); |
86 | init_waitqueue_head(&op->out_sleeper); | 85 | init_waitqueue_head(&op->out_sleeper); |
87 | init_waitqueue_head(&op->poll_sleeper); | 86 | init_waitqueue_head(&op->poll_sleeper); |
@@ -128,7 +127,7 @@ int sound_install_mixer(int vers, char *name, struct mixer_operations *driver, | |||
128 | /* FIXME: This leaks a mixer_operations struct every time its called | 127 | /* FIXME: This leaks a mixer_operations struct every time its called |
129 | until you unload sound! */ | 128 | until you unload sound! */ |
130 | 129 | ||
131 | op = (struct mixer_operations *) (sound_mem_blocks[sound_nblocks] = vmalloc(sizeof(struct mixer_operations))); | 130 | op = (struct mixer_operations *) (sound_mem_blocks[sound_nblocks] = vzalloc(sizeof(struct mixer_operations))); |
132 | sound_nblocks++; | 131 | sound_nblocks++; |
133 | if (sound_nblocks >= MAX_MEM_BLOCKS) | 132 | if (sound_nblocks >= MAX_MEM_BLOCKS) |
134 | sound_nblocks = MAX_MEM_BLOCKS - 1; | 133 | sound_nblocks = MAX_MEM_BLOCKS - 1; |
@@ -137,7 +136,6 @@ int sound_install_mixer(int vers, char *name, struct mixer_operations *driver, | |||
137 | printk(KERN_ERR "Sound: Can't allocate mixer driver for (%s)\n", name); | 136 | printk(KERN_ERR "Sound: Can't allocate mixer driver for (%s)\n", name); |
138 | return -ENOMEM; | 137 | return -ENOMEM; |
139 | } | 138 | } |
140 | memset((char *) op, 0, sizeof(struct mixer_operations)); | ||
141 | memcpy((char *) op, (char *) driver, driver_size); | 139 | memcpy((char *) op, (char *) driver, driver_size); |
142 | 140 | ||
143 | strlcpy(op->name, name, sizeof(op->name)); | 141 | strlcpy(op->name, name, sizeof(op->name)); |
diff --git a/sound/oss/midibuf.c b/sound/oss/midibuf.c index 782b3b84dac6..ceedb1eff203 100644 --- a/sound/oss/midibuf.c +++ b/sound/oss/midibuf.c | |||
@@ -178,7 +178,7 @@ int MIDIbuf_open(int dev, struct file *file) | |||
178 | return err; | 178 | return err; |
179 | 179 | ||
180 | parms[dev].prech_timeout = MAX_SCHEDULE_TIMEOUT; | 180 | parms[dev].prech_timeout = MAX_SCHEDULE_TIMEOUT; |
181 | midi_in_buf[dev] = (struct midi_buf *) vmalloc(sizeof(struct midi_buf)); | 181 | midi_in_buf[dev] = vmalloc(sizeof(struct midi_buf)); |
182 | 182 | ||
183 | if (midi_in_buf[dev] == NULL) | 183 | if (midi_in_buf[dev] == NULL) |
184 | { | 184 | { |
@@ -188,7 +188,7 @@ int MIDIbuf_open(int dev, struct file *file) | |||
188 | } | 188 | } |
189 | midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0; | 189 | midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0; |
190 | 190 | ||
191 | midi_out_buf[dev] = (struct midi_buf *) vmalloc(sizeof(struct midi_buf)); | 191 | midi_out_buf[dev] = vmalloc(sizeof(struct midi_buf)); |
192 | 192 | ||
193 | if (midi_out_buf[dev] == NULL) | 193 | if (midi_out_buf[dev] == NULL) |
194 | { | 194 | { |
diff --git a/sound/oss/pss.c b/sound/oss/pss.c index e19dd5dcc2de..9b800ce5100e 100644 --- a/sound/oss/pss.c +++ b/sound/oss/pss.c | |||
@@ -859,7 +859,7 @@ static int pss_coproc_ioctl(void *dev_info, unsigned int cmd, void __user *arg, | |||
859 | return 0; | 859 | return 0; |
860 | 860 | ||
861 | case SNDCTL_COPR_LOAD: | 861 | case SNDCTL_COPR_LOAD: |
862 | buf = (copr_buffer *) vmalloc(sizeof(copr_buffer)); | 862 | buf = vmalloc(sizeof(copr_buffer)); |
863 | if (buf == NULL) | 863 | if (buf == NULL) |
864 | return -ENOSPC; | 864 | return -ENOSPC; |
865 | if (copy_from_user(buf, arg, sizeof(copr_buffer))) { | 865 | if (copy_from_user(buf, arg, sizeof(copr_buffer))) { |
@@ -871,7 +871,7 @@ static int pss_coproc_ioctl(void *dev_info, unsigned int cmd, void __user *arg, | |||
871 | return err; | 871 | return err; |
872 | 872 | ||
873 | case SNDCTL_COPR_SENDMSG: | 873 | case SNDCTL_COPR_SENDMSG: |
874 | mbuf = (copr_msg *)vmalloc(sizeof(copr_msg)); | 874 | mbuf = vmalloc(sizeof(copr_msg)); |
875 | if (mbuf == NULL) | 875 | if (mbuf == NULL) |
876 | return -ENOSPC; | 876 | return -ENOSPC; |
877 | if (copy_from_user(mbuf, arg, sizeof(copr_msg))) { | 877 | if (copy_from_user(mbuf, arg, sizeof(copr_msg))) { |
@@ -895,7 +895,7 @@ static int pss_coproc_ioctl(void *dev_info, unsigned int cmd, void __user *arg, | |||
895 | 895 | ||
896 | case SNDCTL_COPR_RCVMSG: | 896 | case SNDCTL_COPR_RCVMSG: |
897 | err = 0; | 897 | err = 0; |
898 | mbuf = (copr_msg *)vmalloc(sizeof(copr_msg)); | 898 | mbuf = vmalloc(sizeof(copr_msg)); |
899 | if (mbuf == NULL) | 899 | if (mbuf == NULL) |
900 | return -ENOSPC; | 900 | return -ENOSPC; |
901 | data = (unsigned short *)mbuf->data; | 901 | data = (unsigned short *)mbuf->data; |
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c index e85789e53816..5ea1098ac427 100644 --- a/sound/oss/sequencer.c +++ b/sound/oss/sequencer.c | |||
@@ -1646,13 +1646,13 @@ void sequencer_init(void) | |||
1646 | { | 1646 | { |
1647 | if (sequencer_ok) | 1647 | if (sequencer_ok) |
1648 | return; | 1648 | return; |
1649 | queue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * EV_SZ); | 1649 | queue = vmalloc(SEQ_MAX_QUEUE * EV_SZ); |
1650 | if (queue == NULL) | 1650 | if (queue == NULL) |
1651 | { | 1651 | { |
1652 | printk(KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n"); | 1652 | printk(KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n"); |
1653 | return; | 1653 | return; |
1654 | } | 1654 | } |
1655 | iqueue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * IEV_SZ); | 1655 | iqueue = vmalloc(SEQ_MAX_QUEUE * IEV_SZ); |
1656 | if (iqueue == NULL) | 1656 | if (iqueue == NULL) |
1657 | { | 1657 | { |
1658 | printk(KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n"); | 1658 | printk(KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n"); |
diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c index 62895a719fcb..22dbd91811a4 100644 --- a/sound/pci/asihpi/hpioctl.c +++ b/sound/pci/asihpi/hpioctl.c | |||
@@ -435,7 +435,7 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev) | |||
435 | struct hpi_message hm; | 435 | struct hpi_message hm; |
436 | struct hpi_response hr; | 436 | struct hpi_response hr; |
437 | struct hpi_adapter *pa; | 437 | struct hpi_adapter *pa; |
438 | pa = (struct hpi_adapter *)pci_get_drvdata(pci_dev); | 438 | pa = pci_get_drvdata(pci_dev); |
439 | 439 | ||
440 | hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, | 440 | hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, |
441 | HPI_SUBSYS_DELETE_ADAPTER); | 441 | HPI_SUBSYS_DELETE_ADAPTER); |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 4679ed83a43b..2f3cacbd5528 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -1129,10 +1129,11 @@ snd_azf3328_codec_setdmaa(struct snd_azf3328 *chip, | |||
1129 | 1129 | ||
1130 | count_areas = size/2; | 1130 | count_areas = size/2; |
1131 | addr_area2 = addr+count_areas; | 1131 | addr_area2 = addr+count_areas; |
1132 | count_areas--; /* max. index */ | ||
1133 | snd_azf3328_dbgcodec("setdma: buffers %08lx[%u] / %08lx[%u]\n", | 1132 | snd_azf3328_dbgcodec("setdma: buffers %08lx[%u] / %08lx[%u]\n", |
1134 | addr, count_areas, addr_area2, count_areas); | 1133 | addr, count_areas, addr_area2, count_areas); |
1135 | 1134 | ||
1135 | count_areas--; /* max. index */ | ||
1136 | |||
1136 | /* build combined I/O buffer length word */ | 1137 | /* build combined I/O buffer length word */ |
1137 | lengths = (count_areas << 16) | (count_areas); | 1138 | lengths = (count_areas << 16) | (count_areas); |
1138 | spin_lock_irqsave(&chip->reg_lock, flags); | 1139 | spin_lock_irqsave(&chip->reg_lock, flags); |
@@ -1740,11 +1741,15 @@ static const struct snd_pcm_hardware snd_azf3328_hardware = | |||
1740 | .rate_max = AZF_FREQ_66200, | 1741 | .rate_max = AZF_FREQ_66200, |
1741 | .channels_min = 1, | 1742 | .channels_min = 1, |
1742 | .channels_max = 2, | 1743 | .channels_max = 2, |
1743 | .buffer_bytes_max = 65536, | 1744 | .buffer_bytes_max = (64*1024), |
1744 | .period_bytes_min = 64, | 1745 | .period_bytes_min = 1024, |
1745 | .period_bytes_max = 65536, | 1746 | .period_bytes_max = (32*1024), |
1746 | .periods_min = 1, | 1747 | /* We simply have two DMA areas (instead of a list of descriptors |
1747 | .periods_max = 1024, | 1748 | such as other cards); I believe that this is a fixed hardware |
1749 | attribute and there isn't much driver magic to be done to expand it. | ||
1750 | Thus indicate that we have at least and at most 2 periods. */ | ||
1751 | .periods_min = 2, | ||
1752 | .periods_max = 2, | ||
1748 | /* FIXME: maybe that card actually has a FIFO? | 1753 | /* FIXME: maybe that card actually has a FIFO? |
1749 | * Hmm, it seems newer revisions do have one, but we still don't know | 1754 | * Hmm, it seems newer revisions do have one, but we still don't know |
1750 | * its size... */ | 1755 | * its size... */ |
@@ -1980,8 +1985,13 @@ snd_azf3328_timer_stop(struct snd_timer *timer) | |||
1980 | chip = snd_timer_chip(timer); | 1985 | chip = snd_timer_chip(timer); |
1981 | spin_lock_irqsave(&chip->reg_lock, flags); | 1986 | spin_lock_irqsave(&chip->reg_lock, flags); |
1982 | /* disable timer countdown and interrupt */ | 1987 | /* disable timer countdown and interrupt */ |
1983 | /* FIXME: should we write TIMER_IRQ_ACK here? */ | 1988 | /* Hmm, should we write TIMER_IRQ_ACK here? |
1984 | snd_azf3328_ctrl_outb(chip, IDX_IO_TIMER_VALUE + 3, 0); | 1989 | YES indeed, otherwise a rogue timer operation - which prompts |
1990 | ALSA(?) to call repeated stop() in vain, but NOT start() - | ||
1991 | will never end (value 0x03 is kept shown in control byte). | ||
1992 | Simply manually poking 0x04 _once_ immediately successfully stops | ||
1993 | the hardware/ALSA interrupt activity. */ | ||
1994 | snd_azf3328_ctrl_outb(chip, IDX_IO_TIMER_VALUE + 3, 0x04); | ||
1985 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 1995 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
1986 | snd_azf3328_dbgcallleave(); | 1996 | snd_azf3328_dbgcallleave(); |
1987 | return 0; | 1997 | return 0; |
diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c index 85ab43e89212..457d21189b0d 100644 --- a/sound/pci/ctxfi/ctpcm.c +++ b/sound/pci/ctxfi/ctpcm.c | |||
@@ -129,8 +129,6 @@ static int ct_pcm_playback_open(struct snd_pcm_substream *substream) | |||
129 | 129 | ||
130 | apcm->substream = substream; | 130 | apcm->substream = substream; |
131 | apcm->interrupt = ct_atc_pcm_interrupt; | 131 | apcm->interrupt = ct_atc_pcm_interrupt; |
132 | runtime->private_data = apcm; | ||
133 | runtime->private_free = ct_atc_pcm_free_substream; | ||
134 | if (IEC958 == substream->pcm->device) { | 132 | if (IEC958 == substream->pcm->device) { |
135 | runtime->hw = ct_spdif_passthru_playback_hw; | 133 | runtime->hw = ct_spdif_passthru_playback_hw; |
136 | atc->spdif_out_passthru(atc, 1); | 134 | atc->spdif_out_passthru(atc, 1); |
@@ -155,8 +153,12 @@ static int ct_pcm_playback_open(struct snd_pcm_substream *substream) | |||
155 | } | 153 | } |
156 | 154 | ||
157 | apcm->timer = ct_timer_instance_new(atc->timer, apcm); | 155 | apcm->timer = ct_timer_instance_new(atc->timer, apcm); |
158 | if (!apcm->timer) | 156 | if (!apcm->timer) { |
157 | kfree(apcm); | ||
159 | return -ENOMEM; | 158 | return -ENOMEM; |
159 | } | ||
160 | runtime->private_data = apcm; | ||
161 | runtime->private_free = ct_atc_pcm_free_substream; | ||
160 | 162 | ||
161 | return 0; | 163 | return 0; |
162 | } | 164 | } |
@@ -278,8 +280,6 @@ static int ct_pcm_capture_open(struct snd_pcm_substream *substream) | |||
278 | apcm->started = 0; | 280 | apcm->started = 0; |
279 | apcm->substream = substream; | 281 | apcm->substream = substream; |
280 | apcm->interrupt = ct_atc_pcm_interrupt; | 282 | apcm->interrupt = ct_atc_pcm_interrupt; |
281 | runtime->private_data = apcm; | ||
282 | runtime->private_free = ct_atc_pcm_free_substream; | ||
283 | runtime->hw = ct_pcm_capture_hw; | 283 | runtime->hw = ct_pcm_capture_hw; |
284 | runtime->hw.rate_max = atc->rsr * atc->msr; | 284 | runtime->hw.rate_max = atc->rsr * atc->msr; |
285 | 285 | ||
@@ -298,8 +298,12 @@ static int ct_pcm_capture_open(struct snd_pcm_substream *substream) | |||
298 | } | 298 | } |
299 | 299 | ||
300 | apcm->timer = ct_timer_instance_new(atc->timer, apcm); | 300 | apcm->timer = ct_timer_instance_new(atc->timer, apcm); |
301 | if (!apcm->timer) | 301 | if (!apcm->timer) { |
302 | kfree(apcm); | ||
302 | return -ENOMEM; | 303 | return -ENOMEM; |
304 | } | ||
305 | runtime->private_data = apcm; | ||
306 | runtime->private_free = ct_atc_pcm_free_substream; | ||
303 | 307 | ||
304 | return 0; | 308 | return 0; |
305 | } | 309 | } |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 6361f752b5f3..3cfb31e77b16 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3100,6 +3100,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
3100 | SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO), | 3100 | SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO), |
3101 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), | 3101 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), |
3102 | SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), | 3102 | SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), |
3103 | SND_PCI_QUIRK(0x1043, 0x13f3, "Asus A52J", CXT5066_HP_LAPTOP), | ||
3103 | SND_PCI_QUIRK(0x1179, 0xff1e, "Toshiba Satellite C650D", CXT5066_IDEAPAD), | 3104 | SND_PCI_QUIRK(0x1179, 0xff1e, "Toshiba Satellite C650D", CXT5066_IDEAPAD), |
3104 | SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), | 3105 | SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), |
3105 | SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), | 3106 | SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5f00589cb791..b7e234898fd8 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -10816,6 +10816,9 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) | |||
10816 | return 0; | 10816 | return 0; |
10817 | } | 10817 | } |
10818 | 10818 | ||
10819 | static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, | ||
10820 | const struct auto_pin_cfg *cfg); | ||
10821 | |||
10819 | /* almost identical with ALC880 parser... */ | 10822 | /* almost identical with ALC880 parser... */ |
10820 | static int alc882_parse_auto_config(struct hda_codec *codec) | 10823 | static int alc882_parse_auto_config(struct hda_codec *codec) |
10821 | { | 10824 | { |
@@ -10833,7 +10836,10 @@ static int alc882_parse_auto_config(struct hda_codec *codec) | |||
10833 | err = alc880_auto_fill_dac_nids(spec, &spec->autocfg); | 10836 | err = alc880_auto_fill_dac_nids(spec, &spec->autocfg); |
10834 | if (err < 0) | 10837 | if (err < 0) |
10835 | return err; | 10838 | return err; |
10836 | err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg); | 10839 | if (codec->vendor_id == 0x10ec0887) |
10840 | err = alc861vd_auto_create_multi_out_ctls(spec, &spec->autocfg); | ||
10841 | else | ||
10842 | err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg); | ||
10837 | if (err < 0) | 10843 | if (err < 0) |
10838 | return err; | 10844 | return err; |
10839 | err = alc880_auto_create_extra_out(spec, spec->autocfg.hp_pins[0], | 10845 | err = alc880_auto_create_extra_out(spec, spec->autocfg.hp_pins[0], |
@@ -16963,7 +16969,7 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec) | |||
16963 | #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) | 16969 | #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) |
16964 | 16970 | ||
16965 | /* add playback controls from the parsed DAC table */ | 16971 | /* add playback controls from the parsed DAC table */ |
16966 | /* Based on ALC880 version. But ALC861VD has separate, | 16972 | /* Based on ALC880 version. But ALC861VD and ALC887 have separate, |
16967 | * different NIDs for mute/unmute switch and volume control */ | 16973 | * different NIDs for mute/unmute switch and volume control */ |
16968 | static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, | 16974 | static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, |
16969 | const struct auto_pin_cfg *cfg) | 16975 | const struct auto_pin_cfg *cfg) |
@@ -19298,6 +19304,7 @@ static const struct alc_fixup alc662_fixups[] = { | |||
19298 | 19304 | ||
19299 | static struct snd_pci_quirk alc662_fixup_tbl[] = { | 19305 | static struct snd_pci_quirk alc662_fixup_tbl[] = { |
19300 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 19306 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
19307 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), | ||
19301 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), | 19308 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), |
19302 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), | 19309 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), |
19303 | {} | 19310 | {} |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 93fa59cc60ef..cfd73afad882 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -389,6 +389,11 @@ static hda_nid_t stac92hd83xxx_dmic_nids[STAC92HD83XXX_NUM_DMICS + 1] = { | |||
389 | 0x11, 0x20, 0 | 389 | 0x11, 0x20, 0 |
390 | }; | 390 | }; |
391 | 391 | ||
392 | #define STAC92HD87B_NUM_DMICS 1 | ||
393 | static hda_nid_t stac92hd87b_dmic_nids[STAC92HD87B_NUM_DMICS + 1] = { | ||
394 | 0x11, 0 | ||
395 | }; | ||
396 | |||
392 | #define STAC92HD83XXX_NUM_CAPS 2 | 397 | #define STAC92HD83XXX_NUM_CAPS 2 |
393 | static unsigned long stac92hd83xxx_capvols[] = { | 398 | static unsigned long stac92hd83xxx_capvols[] = { |
394 | HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT), | 399 | HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT), |
@@ -5452,12 +5457,17 @@ again: | |||
5452 | stac92hd83xxx_brd_tbl[spec->board_config]); | 5457 | stac92hd83xxx_brd_tbl[spec->board_config]); |
5453 | 5458 | ||
5454 | switch (codec->vendor_id) { | 5459 | switch (codec->vendor_id) { |
5460 | case 0x111d76d1: | ||
5461 | case 0x111d76d9: | ||
5462 | spec->dmic_nids = stac92hd87b_dmic_nids; | ||
5463 | spec->num_dmics = stac92xx_connected_ports(codec, | ||
5464 | stac92hd87b_dmic_nids, | ||
5465 | STAC92HD87B_NUM_DMICS); | ||
5466 | /* Fall through */ | ||
5455 | case 0x111d7666: | 5467 | case 0x111d7666: |
5456 | case 0x111d7667: | 5468 | case 0x111d7667: |
5457 | case 0x111d7668: | 5469 | case 0x111d7668: |
5458 | case 0x111d7669: | 5470 | case 0x111d7669: |
5459 | case 0x111d76d1: | ||
5460 | case 0x111d76d9: | ||
5461 | spec->num_pins = ARRAY_SIZE(stac92hd88xxx_pin_nids); | 5471 | spec->num_pins = ARRAY_SIZE(stac92hd88xxx_pin_nids); |
5462 | spec->pin_nids = stac92hd88xxx_pin_nids; | 5472 | spec->pin_nids = stac92hd88xxx_pin_nids; |
5463 | spec->mono_nid = 0; | 5473 | spec->mono_nid = 0; |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 400f9ebd243e..629a5494347a 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -1866,6 +1866,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1866 | }, | 1866 | }, |
1867 | { | 1867 | { |
1868 | .subvendor = 0x1028, | 1868 | .subvendor = 0x1028, |
1869 | .subdevice = 0x0182, | ||
1870 | .name = "Dell Latitude D610", /* STAC9750/51 */ | ||
1871 | .type = AC97_TUNE_HP_ONLY | ||
1872 | }, | ||
1873 | { | ||
1874 | .subvendor = 0x1028, | ||
1869 | .subdevice = 0x0186, | 1875 | .subdevice = 0x0186, |
1870 | .name = "Dell Latitude D810", /* cf. Malone #41015 */ | 1876 | .name = "Dell Latitude D810", /* cf. Malone #41015 */ |
1871 | .type = AC97_TUNE_HP_MUTE_LED | 1877 | .type = AC97_TUNE_HP_MUTE_LED |
diff --git a/sound/pci/mixart/mixart_hwdep.h b/sound/pci/mixart/mixart_hwdep.h index a46f5083db99..812e288ef2e7 100644 --- a/sound/pci/mixart/mixart_hwdep.h +++ b/sound/pci/mixart/mixart_hwdep.h | |||
@@ -25,11 +25,21 @@ | |||
25 | 25 | ||
26 | #include <sound/hwdep.h> | 26 | #include <sound/hwdep.h> |
27 | 27 | ||
28 | #ifndef readl_be | ||
28 | #define readl_be(x) be32_to_cpu(__raw_readl(x)) | 29 | #define readl_be(x) be32_to_cpu(__raw_readl(x)) |
30 | #endif | ||
31 | |||
32 | #ifndef writel_be | ||
29 | #define writel_be(data,addr) __raw_writel(cpu_to_be32(data),addr) | 33 | #define writel_be(data,addr) __raw_writel(cpu_to_be32(data),addr) |
34 | #endif | ||
30 | 35 | ||
36 | #ifndef readl_le | ||
31 | #define readl_le(x) le32_to_cpu(__raw_readl(x)) | 37 | #define readl_le(x) le32_to_cpu(__raw_readl(x)) |
38 | #endif | ||
39 | |||
40 | #ifndef writel_le | ||
32 | #define writel_le(data,addr) __raw_writel(cpu_to_le32(data),addr) | 41 | #define writel_le(data,addr) __raw_writel(cpu_to_le32(data),addr) |
42 | #endif | ||
33 | 43 | ||
34 | #define MIXART_MEM(mgr,x) ((mgr)->mem[0].virt + (x)) | 44 | #define MIXART_MEM(mgr,x) ((mgr)->mem[0].virt + (x)) |
35 | #define MIXART_REG(mgr,x) ((mgr)->mem[1].virt + (x)) | 45 | #define MIXART_REG(mgr,x) ((mgr)->mem[1].virt + (x)) |
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 85081172403f..b47cfd45b3b9 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -1228,10 +1228,8 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) | |||
1228 | chip->rsrc[i].start + 1, | 1228 | chip->rsrc[i].start + 1, |
1229 | rnames[i]) == NULL) { | 1229 | rnames[i]) == NULL) { |
1230 | printk(KERN_ERR "snd: can't request rsrc " | 1230 | printk(KERN_ERR "snd: can't request rsrc " |
1231 | " %d (%s: 0x%016llx:%016llx)\n", | 1231 | " %d (%s: %pR)\n", |
1232 | i, rnames[i], | 1232 | i, rnames[i], &chip->rsrc[i]); |
1233 | (unsigned long long)chip->rsrc[i].start, | ||
1234 | (unsigned long long)chip->rsrc[i].end); | ||
1235 | err = -ENODEV; | 1233 | err = -ENODEV; |
1236 | goto __error; | 1234 | goto __error; |
1237 | } | 1235 | } |
@@ -1256,10 +1254,8 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) | |||
1256 | chip->rsrc[i].start + 1, | 1254 | chip->rsrc[i].start + 1, |
1257 | rnames[i]) == NULL) { | 1255 | rnames[i]) == NULL) { |
1258 | printk(KERN_ERR "snd: can't request rsrc " | 1256 | printk(KERN_ERR "snd: can't request rsrc " |
1259 | " %d (%s: 0x%016llx:%016llx)\n", | 1257 | " %d (%s: %pR)\n", |
1260 | i, rnames[i], | 1258 | i, rnames[i], &chip->rsrc[i]); |
1261 | (unsigned long long)chip->rsrc[i].start, | ||
1262 | (unsigned long long)chip->rsrc[i].end); | ||
1263 | err = -ENODEV; | 1259 | err = -ENODEV; |
1264 | goto __error; | 1260 | goto __error; |
1265 | } | 1261 | } |
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 94a9d06b9027..3b5690d28b8b 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig | |||
@@ -25,8 +25,9 @@ config SND_SOC_ALL_CODECS | |||
25 | select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC | 25 | select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC |
26 | select SND_SOC_CS42L51 if I2C | 26 | select SND_SOC_CS42L51 if I2C |
27 | select SND_SOC_CS4270 if I2C | 27 | select SND_SOC_CS4270 if I2C |
28 | select SND_SOC_CX20442 | ||
28 | select SND_SOC_DA7210 if I2C | 29 | select SND_SOC_DA7210 if I2C |
29 | select SND_SOC_JZ4740 if SOC_JZ4740 | 30 | select SND_SOC_JZ4740_CODEC if SOC_JZ4740 |
30 | select SND_SOC_MAX98088 if I2C | 31 | select SND_SOC_MAX98088 if I2C |
31 | select SND_SOC_MAX9877 if I2C | 32 | select SND_SOC_MAX9877 if I2C |
32 | select SND_SOC_PCM3008 | 33 | select SND_SOC_PCM3008 |
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index d251ff54a2d3..c5ab8c805771 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -58,7 +58,7 @@ | |||
58 | (1000000000 / ((rate * 1000) / samples)) | 58 | (1000000000 / ((rate * 1000) / samples)) |
59 | 59 | ||
60 | #define US_TO_SAMPLES(rate, us) \ | 60 | #define US_TO_SAMPLES(rate, us) \ |
61 | (rate / (1000000 / us)) | 61 | (rate / (1000000 / (us < 1000000 ? us : 1000000))) |
62 | 62 | ||
63 | #define UTHR_FROM_PERIOD_SIZE(samples, playrate, burstrate) \ | 63 | #define UTHR_FROM_PERIOD_SIZE(samples, playrate, burstrate) \ |
64 | ((samples * 5000) / ((burstrate * 5000) / (burstrate - playrate))) | 64 | ((samples * 5000) / ((burstrate * 5000) / (burstrate - playrate))) |
@@ -200,7 +200,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg, | |||
200 | u8 *value) | 200 | u8 *value) |
201 | { | 201 | { |
202 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); | 202 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); |
203 | int val; | 203 | int val, ret = 0; |
204 | 204 | ||
205 | *value = reg & 0xff; | 205 | *value = reg & 0xff; |
206 | 206 | ||
@@ -210,6 +210,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg, | |||
210 | if (val < 0) { | 210 | if (val < 0) { |
211 | dev_err(codec->dev, "Read failed (%d)\n", val); | 211 | dev_err(codec->dev, "Read failed (%d)\n", val); |
212 | value[0] = dac33_read_reg_cache(codec, reg); | 212 | value[0] = dac33_read_reg_cache(codec, reg); |
213 | ret = val; | ||
213 | } else { | 214 | } else { |
214 | value[0] = val; | 215 | value[0] = val; |
215 | dac33_write_reg_cache(codec, reg, val); | 216 | dac33_write_reg_cache(codec, reg, val); |
@@ -218,7 +219,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg, | |||
218 | value[0] = dac33_read_reg_cache(codec, reg); | 219 | value[0] = dac33_read_reg_cache(codec, reg); |
219 | } | 220 | } |
220 | 221 | ||
221 | return 0; | 222 | return ret; |
222 | } | 223 | } |
223 | 224 | ||
224 | static int dac33_write(struct snd_soc_codec *codec, unsigned int reg, | 225 | static int dac33_write(struct snd_soc_codec *codec, unsigned int reg, |
@@ -329,13 +330,18 @@ static void dac33_init_chip(struct snd_soc_codec *codec) | |||
329 | dac33_read_reg_cache(codec, DAC33_LINER_TO_RLO_VOL)); | 330 | dac33_read_reg_cache(codec, DAC33_LINER_TO_RLO_VOL)); |
330 | } | 331 | } |
331 | 332 | ||
332 | static inline void dac33_read_id(struct snd_soc_codec *codec) | 333 | static inline int dac33_read_id(struct snd_soc_codec *codec) |
333 | { | 334 | { |
335 | int i, ret = 0; | ||
334 | u8 reg; | 336 | u8 reg; |
335 | 337 | ||
336 | dac33_read(codec, DAC33_DEVICE_ID_MSB, ®); | 338 | for (i = 0; i < 3; i++) { |
337 | dac33_read(codec, DAC33_DEVICE_ID_LSB, ®); | 339 | ret = dac33_read(codec, DAC33_DEVICE_ID_MSB + i, ®); |
338 | dac33_read(codec, DAC33_DEVICE_REV_ID, ®); | 340 | if (ret < 0) |
341 | break; | ||
342 | } | ||
343 | |||
344 | return ret; | ||
339 | } | 345 | } |
340 | 346 | ||
341 | static inline void dac33_soft_power(struct snd_soc_codec *codec, int power) | 347 | static inline void dac33_soft_power(struct snd_soc_codec *codec, int power) |
@@ -1076,6 +1082,9 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream) | |||
1076 | /* Number of samples under i2c latency */ | 1082 | /* Number of samples under i2c latency */ |
1077 | dac33->alarm_threshold = US_TO_SAMPLES(rate, | 1083 | dac33->alarm_threshold = US_TO_SAMPLES(rate, |
1078 | dac33->mode1_latency); | 1084 | dac33->mode1_latency); |
1085 | nsample_limit = DAC33_BUFFER_SIZE_SAMPLES - | ||
1086 | dac33->alarm_threshold; | ||
1087 | |||
1079 | if (dac33->auto_fifo_config) { | 1088 | if (dac33->auto_fifo_config) { |
1080 | if (period_size <= dac33->alarm_threshold) | 1089 | if (period_size <= dac33->alarm_threshold) |
1081 | /* | 1090 | /* |
@@ -1086,6 +1095,8 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream) | |||
1086 | ((dac33->alarm_threshold / period_size) + | 1095 | ((dac33->alarm_threshold / period_size) + |
1087 | (dac33->alarm_threshold % period_size ? | 1096 | (dac33->alarm_threshold % period_size ? |
1088 | 1 : 0)); | 1097 | 1 : 0)); |
1098 | else if (period_size > nsample_limit) | ||
1099 | dac33->nsample = nsample_limit; | ||
1089 | else | 1100 | else |
1090 | dac33->nsample = period_size; | 1101 | dac33->nsample = period_size; |
1091 | } else { | 1102 | } else { |
@@ -1097,8 +1108,7 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream) | |||
1097 | */ | 1108 | */ |
1098 | dac33->nsample_max = substream->runtime->buffer_size - | 1109 | dac33->nsample_max = substream->runtime->buffer_size - |
1099 | period_size; | 1110 | period_size; |
1100 | nsample_limit = DAC33_BUFFER_SIZE_SAMPLES - | 1111 | |
1101 | dac33->alarm_threshold; | ||
1102 | if (dac33->nsample_max > nsample_limit) | 1112 | if (dac33->nsample_max > nsample_limit) |
1103 | dac33->nsample_max = nsample_limit; | 1113 | dac33->nsample_max = nsample_limit; |
1104 | 1114 | ||
@@ -1414,9 +1424,15 @@ static int dac33_soc_probe(struct snd_soc_codec *codec) | |||
1414 | dev_err(codec->dev, "Failed to power up codec: %d\n", ret); | 1424 | dev_err(codec->dev, "Failed to power up codec: %d\n", ret); |
1415 | goto err_power; | 1425 | goto err_power; |
1416 | } | 1426 | } |
1417 | dac33_read_id(codec); | 1427 | ret = dac33_read_id(codec); |
1418 | dac33_hard_power(codec, 0); | 1428 | dac33_hard_power(codec, 0); |
1419 | 1429 | ||
1430 | if (ret < 0) { | ||
1431 | dev_err(codec->dev, "Failed to read chip ID: %d\n", ret); | ||
1432 | ret = -ENODEV; | ||
1433 | goto err_power; | ||
1434 | } | ||
1435 | |||
1420 | /* Check if the IRQ number is valid and request it */ | 1436 | /* Check if the IRQ number is valid and request it */ |
1421 | if (dac33->irq >= 0) { | 1437 | if (dac33->irq >= 0) { |
1422 | ret = request_irq(dac33->irq, dac33_interrupt_handler, | 1438 | ret = request_irq(dac33->irq, dac33_interrupt_handler, |
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 329acc1a2074..ee4fb201de60 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c | |||
@@ -119,13 +119,13 @@ static int tpa6130a2_power(int power) | |||
119 | { | 119 | { |
120 | struct tpa6130a2_data *data; | 120 | struct tpa6130a2_data *data; |
121 | u8 val; | 121 | u8 val; |
122 | int ret; | 122 | int ret = 0; |
123 | 123 | ||
124 | BUG_ON(tpa6130a2_client == NULL); | 124 | BUG_ON(tpa6130a2_client == NULL); |
125 | data = i2c_get_clientdata(tpa6130a2_client); | 125 | data = i2c_get_clientdata(tpa6130a2_client); |
126 | 126 | ||
127 | mutex_lock(&data->mutex); | 127 | mutex_lock(&data->mutex); |
128 | if (power) { | 128 | if (power && !data->power_state) { |
129 | /* Power on */ | 129 | /* Power on */ |
130 | if (data->power_gpio >= 0) | 130 | if (data->power_gpio >= 0) |
131 | gpio_set_value(data->power_gpio, 1); | 131 | gpio_set_value(data->power_gpio, 1); |
@@ -153,7 +153,7 @@ static int tpa6130a2_power(int power) | |||
153 | val = tpa6130a2_read(TPA6130A2_REG_CONTROL); | 153 | val = tpa6130a2_read(TPA6130A2_REG_CONTROL); |
154 | val &= ~TPA6130A2_SWS; | 154 | val &= ~TPA6130A2_SWS; |
155 | tpa6130a2_i2c_write(TPA6130A2_REG_CONTROL, val); | 155 | tpa6130a2_i2c_write(TPA6130A2_REG_CONTROL, val); |
156 | } else { | 156 | } else if (!power && data->power_state) { |
157 | /* set SWS */ | 157 | /* set SWS */ |
158 | val = tpa6130a2_read(TPA6130A2_REG_CONTROL); | 158 | val = tpa6130a2_read(TPA6130A2_REG_CONTROL); |
159 | val |= TPA6130A2_SWS; | 159 | val |= TPA6130A2_SWS; |
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index b4f11724a63f..aca4b1ea10bb 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c | |||
@@ -186,7 +186,6 @@ static int wm8900_volatile_register(unsigned int reg) | |||
186 | { | 186 | { |
187 | switch (reg) { | 187 | switch (reg) { |
188 | case WM8900_REG_ID: | 188 | case WM8900_REG_ID: |
189 | case WM8900_REG_POWER1: | ||
190 | return 1; | 189 | return 1; |
191 | default: | 190 | default: |
192 | return 0; | 191 | return 0; |
@@ -1200,11 +1199,6 @@ static int wm8900_probe(struct snd_soc_codec *codec) | |||
1200 | return -ENODEV; | 1199 | return -ENODEV; |
1201 | } | 1200 | } |
1202 | 1201 | ||
1203 | /* Read back from the chip */ | ||
1204 | reg = snd_soc_read(codec, WM8900_REG_POWER1); | ||
1205 | reg = (reg >> 12) & 0xf; | ||
1206 | dev_info(codec->dev, "WM8900 revision %d\n", reg); | ||
1207 | |||
1208 | wm8900_reset(codec); | 1202 | wm8900_reset(codec); |
1209 | 1203 | ||
1210 | /* Turn the chip on */ | 1204 | /* Turn the chip on */ |
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 2cb81538cd91..19ca782ac970 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -123,7 +123,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec) | |||
123 | reg_r = reg & WM8993_DCS_DAC_WR_VAL_0_MASK; | 123 | reg_r = reg & WM8993_DCS_DAC_WR_VAL_0_MASK; |
124 | break; | 124 | break; |
125 | default: | 125 | default: |
126 | WARN(1, "Unknown DCS readback method"); | 126 | WARN(1, "Unknown DCS readback method\n"); |
127 | break; | 127 | break; |
128 | } | 128 | } |
129 | 129 | ||
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index a3bfb2e8b70f..73d0edd8ded9 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c | |||
@@ -79,7 +79,7 @@ static void tosa_ext_control(struct snd_soc_codec *codec) | |||
79 | static int tosa_startup(struct snd_pcm_substream *substream) | 79 | static int tosa_startup(struct snd_pcm_substream *substream) |
80 | { | 80 | { |
81 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 81 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
82 | struct snd_soc_codec *codec = rtd->card->codec; | 82 | struct snd_soc_codec *codec = rtd->codec; |
83 | 83 | ||
84 | /* check the jack status at stream startup */ | 84 | /* check the jack status at stream startup */ |
85 | tosa_ext_control(codec); | 85 | tosa_ext_control(codec); |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1c8f3f507f54..614a8b30d87b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -165,8 +165,11 @@ static ssize_t pmdown_time_set(struct device *dev, | |||
165 | { | 165 | { |
166 | struct snd_soc_pcm_runtime *rtd = | 166 | struct snd_soc_pcm_runtime *rtd = |
167 | container_of(dev, struct snd_soc_pcm_runtime, dev); | 167 | container_of(dev, struct snd_soc_pcm_runtime, dev); |
168 | int ret; | ||
168 | 169 | ||
169 | strict_strtol(buf, 10, &rtd->pmdown_time); | 170 | ret = strict_strtol(buf, 10, &rtd->pmdown_time); |
171 | if (ret) | ||
172 | return ret; | ||
170 | 173 | ||
171 | return count; | 174 | return count; |
172 | } | 175 | } |
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c index 1bc56b2b94e2..337a00241a1f 100644 --- a/sound/spi/at73c213.c +++ b/sound/spi/at73c213.c | |||
@@ -155,7 +155,7 @@ static int snd_at73c213_set_bitrate(struct snd_at73c213 *chip) | |||
155 | if (max_tries < 1) | 155 | if (max_tries < 1) |
156 | max_tries = 1; | 156 | max_tries = 1; |
157 | 157 | ||
158 | /* ssc_div must be a power of 2. */ | 158 | /* ssc_div must be even. */ |
159 | ssc_div = (ssc_div + 1) & ~1UL; | 159 | ssc_div = (ssc_div + 1) & ~1UL; |
160 | 160 | ||
161 | if ((ssc_rate / (ssc_div * 2 * 16)) < BITRATE_MIN) { | 161 | if ((ssc_rate / (ssc_div * 2 * 16)) < BITRATE_MIN) { |