diff options
| -rw-r--r-- | sound/atmel/abdac.c | 4 | ||||
| -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/hpi6000.c | 2 | ||||
| -rw-r--r-- | sound/pci/asihpi/hpi6205.c | 2 | ||||
| -rw-r--r-- | sound/pci/asihpi/hpicmn.c | 12 | ||||
| -rw-r--r-- | sound/pci/asihpi/hpioctl.c | 2 | ||||
| -rw-r--r-- | sound/pci/azt3328.c | 26 | ||||
| -rw-r--r-- | sound/pci/cs46xx/dsp_spos.c | 33 | ||||
| -rw-r--r-- | sound/pci/ctxfi/ctpcm.c | 16 | ||||
| -rw-r--r-- | sound/pci/hda/patch_cirrus.c | 1 | ||||
| -rw-r--r-- | sound/pci/hda/patch_conexant.c | 2 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 28 | ||||
| -rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 18 | ||||
| -rw-r--r-- | sound/pci/intel8x0.c | 6 | ||||
| -rw-r--r-- | sound/pci/lx6464es/lx6464es.c | 4 | ||||
| -rw-r--r-- | sound/pci/lx6464es/lx6464es.h | 2 | ||||
| -rw-r--r-- | sound/pci/lx6464es/lx_core.c | 2 | ||||
| -rw-r--r-- | sound/pci/mixart/mixart_hwdep.h | 10 | ||||
| -rw-r--r-- | sound/ppc/pmac.c | 12 | ||||
| -rw-r--r-- | sound/spi/at73c213.c | 2 | ||||
| -rw-r--r-- | sound/usb/mixer_quirks.c | 15 | ||||
| -rw-r--r-- | sound/usb/pcm.c | 4 |
26 files changed, 144 insertions, 81 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index f2f41c854221..6e2409181895 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
| @@ -420,9 +420,9 @@ 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(sample_clk); |
| 426 | goto out_put_pclk; | 426 | goto out_put_pclk; |
| 427 | } | 427 | } |
| 428 | clk_enable(pclk); | 428 | clk_enable(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/hpi6000.c b/sound/pci/asihpi/hpi6000.c index f7e374ec4414..1b9bf9395cfe 100644 --- a/sound/pci/asihpi/hpi6000.c +++ b/sound/pci/asihpi/hpi6000.c | |||
| @@ -625,6 +625,8 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao, | |||
| 625 | control_cache_size, (struct hpi_control_cache_info *) | 625 | control_cache_size, (struct hpi_control_cache_info *) |
| 626 | &phw->control_cache[0] | 626 | &phw->control_cache[0] |
| 627 | ); | 627 | ); |
| 628 | if (!phw->p_cache) | ||
| 629 | pao->has_control_cache = 0; | ||
| 628 | } else | 630 | } else |
| 629 | pao->has_control_cache = 0; | 631 | pao->has_control_cache = 0; |
| 630 | 632 | ||
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c index 22c5fc625533..2672f6591ceb 100644 --- a/sound/pci/asihpi/hpi6205.c +++ b/sound/pci/asihpi/hpi6205.c | |||
| @@ -644,6 +644,8 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao, | |||
| 644 | interface->control_cache.size_in_bytes, | 644 | interface->control_cache.size_in_bytes, |
| 645 | (struct hpi_control_cache_info *) | 645 | (struct hpi_control_cache_info *) |
| 646 | p_control_cache_virtual); | 646 | p_control_cache_virtual); |
| 647 | if (!phw->p_cache) | ||
| 648 | err = HPI_ERROR_MEMORY_ALLOC; | ||
| 647 | } | 649 | } |
| 648 | if (!err) { | 650 | if (!err) { |
| 649 | err = hpios_locked_mem_get_phys_addr(&phw-> | 651 | err = hpios_locked_mem_get_phys_addr(&phw-> |
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c index dda4f1c6f658..d67f4d3db911 100644 --- a/sound/pci/asihpi/hpicmn.c +++ b/sound/pci/asihpi/hpicmn.c | |||
| @@ -571,14 +571,20 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32 | |||
| 571 | { | 571 | { |
| 572 | struct hpi_control_cache *p_cache = | 572 | struct hpi_control_cache *p_cache = |
| 573 | kmalloc(sizeof(*p_cache), GFP_KERNEL); | 573 | kmalloc(sizeof(*p_cache), GFP_KERNEL); |
| 574 | if (!p_cache) | ||
| 575 | return NULL; | ||
| 576 | p_cache->p_info = | ||
| 577 | kmalloc(sizeof(*p_cache->p_info) * number_of_controls, | ||
| 578 | GFP_KERNEL); | ||
| 579 | if (!p_cache->p_info) { | ||
| 580 | kfree(p_cache); | ||
| 581 | return NULL; | ||
| 582 | } | ||
| 574 | p_cache->cache_size_in_bytes = size_in_bytes; | 583 | p_cache->cache_size_in_bytes = size_in_bytes; |
| 575 | p_cache->control_count = number_of_controls; | 584 | p_cache->control_count = number_of_controls; |
| 576 | p_cache->p_cache = | 585 | p_cache->p_cache = |
| 577 | (struct hpi_control_cache_single *)pDSP_control_buffer; | 586 | (struct hpi_control_cache_single *)pDSP_control_buffer; |
| 578 | p_cache->init = 0; | 587 | p_cache->init = 0; |
| 579 | p_cache->p_info = | ||
| 580 | kmalloc(sizeof(*p_cache->p_info) * p_cache->control_count, | ||
| 581 | GFP_KERNEL); | ||
| 582 | return p_cache; | 588 | return p_cache; |
| 583 | } | 589 | } |
| 584 | 590 | ||
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/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c index 3e5ca8fb519f..e377287192aa 100644 --- a/sound/pci/cs46xx/dsp_spos.c +++ b/sound/pci/cs46xx/dsp_spos.c | |||
| @@ -225,39 +225,25 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) | |||
| 225 | { | 225 | { |
| 226 | struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL); | 226 | struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL); |
| 227 | 227 | ||
| 228 | if (ins == NULL) | 228 | if (ins == NULL) |
| 229 | return NULL; | 229 | return NULL; |
| 230 | 230 | ||
| 231 | /* better to use vmalloc for this big table */ | 231 | /* better to use vmalloc for this big table */ |
| 232 | ins->symbol_table.nsymbols = 0; | ||
| 233 | ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) * | 232 | ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) * |
| 234 | DSP_MAX_SYMBOLS); | 233 | DSP_MAX_SYMBOLS); |
| 235 | ins->symbol_table.highest_frag_index = 0; | 234 | ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL); |
| 236 | 235 | ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL); | |
| 237 | if (ins->symbol_table.symbols == NULL) { | 236 | if (!ins->symbol_table.symbols || !ins->code.data || !ins->modules) { |
| 238 | cs46xx_dsp_spos_destroy(chip); | 237 | cs46xx_dsp_spos_destroy(chip); |
| 239 | goto error; | 238 | goto error; |
| 240 | } | 239 | } |
| 241 | 240 | ins->symbol_table.nsymbols = 0; | |
| 241 | ins->symbol_table.highest_frag_index = 0; | ||
| 242 | ins->code.offset = 0; | 242 | ins->code.offset = 0; |
| 243 | ins->code.size = 0; | 243 | ins->code.size = 0; |
| 244 | ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL); | ||
| 245 | |||
| 246 | if (ins->code.data == NULL) { | ||
| 247 | cs46xx_dsp_spos_destroy(chip); | ||
| 248 | goto error; | ||
| 249 | } | ||
| 250 | |||
| 251 | ins->nscb = 0; | 244 | ins->nscb = 0; |
| 252 | ins->ntask = 0; | 245 | ins->ntask = 0; |
| 253 | |||
| 254 | ins->nmodules = 0; | 246 | ins->nmodules = 0; |
| 255 | ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL); | ||
| 256 | |||
| 257 | if (ins->modules == NULL) { | ||
| 258 | cs46xx_dsp_spos_destroy(chip); | ||
| 259 | goto error; | ||
| 260 | } | ||
| 261 | 247 | ||
| 262 | /* default SPDIF input sample rate | 248 | /* default SPDIF input sample rate |
| 263 | to 48000 khz */ | 249 | to 48000 khz */ |
| @@ -271,8 +257,8 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) | |||
| 271 | 257 | ||
| 272 | /* set left and right validity bits and | 258 | /* set left and right validity bits and |
| 273 | default channel status */ | 259 | default channel status */ |
| 274 | ins->spdif_csuv_default = | 260 | ins->spdif_csuv_default = |
| 275 | ins->spdif_csuv_stream = | 261 | ins->spdif_csuv_stream = |
| 276 | /* byte 0 */ ((unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF & 0xff)) << 24) | | 262 | /* byte 0 */ ((unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF & 0xff)) << 24) | |
| 277 | /* byte 1 */ ((unsigned int)_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 8) & 0xff)) << 16) | | 263 | /* byte 1 */ ((unsigned int)_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 8) & 0xff)) << 16) | |
| 278 | /* byte 3 */ (unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) | | 264 | /* byte 3 */ (unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) | |
| @@ -281,6 +267,9 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) | |||
| 281 | return ins; | 267 | return ins; |
| 282 | 268 | ||
| 283 | error: | 269 | error: |
| 270 | kfree(ins->modules); | ||
| 271 | kfree(ins->code.data); | ||
| 272 | vfree(ins->symbol_table.symbols); | ||
| 284 | kfree(ins); | 273 | kfree(ins); |
| 285 | return NULL; | 274 | return NULL; |
| 286 | } | 275 | } |
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_cirrus.c b/sound/pci/hda/patch_cirrus.c index 460fb2ef7e39..18af38ebf757 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
| @@ -1166,6 +1166,7 @@ static const char *cs420x_models[CS420X_MODELS] = { | |||
| 1166 | 1166 | ||
| 1167 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { | 1167 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { |
| 1168 | SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53), | 1168 | SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53), |
| 1169 | SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55), | ||
| 1169 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), | 1170 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), |
| 1170 | SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55), | 1171 | SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55), |
| 1171 | SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), | 1172 | SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 6361f752b5f3..846d1ead47fd 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), |
| @@ -3110,6 +3111,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
| 3110 | SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD), | 3111 | SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD), |
| 3111 | SND_PCI_QUIRK(0x17aa, 0x21b3, "Thinkpad Edge 13 (197)", CXT5066_IDEAPAD), | 3112 | SND_PCI_QUIRK(0x17aa, 0x21b3, "Thinkpad Edge 13 (197)", CXT5066_IDEAPAD), |
| 3112 | SND_PCI_QUIRK(0x17aa, 0x21b4, "Thinkpad Edge", CXT5066_IDEAPAD), | 3113 | SND_PCI_QUIRK(0x17aa, 0x21b4, "Thinkpad Edge", CXT5066_IDEAPAD), |
| 3114 | SND_PCI_QUIRK(0x17aa, 0x21c8, "Thinkpad Edge 11", CXT5066_IDEAPAD), | ||
| 3113 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), | 3115 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), |
| 3114 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G series", CXT5066_IDEAPAD), | 3116 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G series", CXT5066_IDEAPAD), |
| 3115 | SND_PCI_QUIRK(0x17aa, 0x390a, "Lenovo S10-3t", CXT5066_IDEAPAD), | 3117 | SND_PCI_QUIRK(0x17aa, 0x390a, "Lenovo S10-3t", CXT5066_IDEAPAD), |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5f00589cb791..0ac6aed0c889 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -14623,7 +14623,10 @@ static int alc275_setup_dual_adc(struct hda_codec *codec) | |||
| 14623 | /* different alc269-variants */ | 14623 | /* different alc269-variants */ |
| 14624 | enum { | 14624 | enum { |
| 14625 | ALC269_TYPE_NORMAL, | 14625 | ALC269_TYPE_NORMAL, |
| 14626 | ALC269_TYPE_ALC258, | ||
| 14626 | ALC269_TYPE_ALC259, | 14627 | ALC269_TYPE_ALC259, |
| 14628 | ALC269_TYPE_ALC269VB, | ||
| 14629 | ALC269_TYPE_ALC270, | ||
| 14627 | ALC269_TYPE_ALC271X, | 14630 | ALC269_TYPE_ALC271X, |
| 14628 | }; | 14631 | }; |
| 14629 | 14632 | ||
| @@ -15023,7 +15026,7 @@ static int alc269_fill_coef(struct hda_codec *codec) | |||
| 15023 | static int patch_alc269(struct hda_codec *codec) | 15026 | static int patch_alc269(struct hda_codec *codec) |
| 15024 | { | 15027 | { |
| 15025 | struct alc_spec *spec; | 15028 | struct alc_spec *spec; |
| 15026 | int board_config; | 15029 | int board_config, coef; |
| 15027 | int err; | 15030 | int err; |
| 15028 | 15031 | ||
| 15029 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 15032 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
| @@ -15034,14 +15037,23 @@ static int patch_alc269(struct hda_codec *codec) | |||
| 15034 | 15037 | ||
| 15035 | alc_auto_parse_customize_define(codec); | 15038 | alc_auto_parse_customize_define(codec); |
| 15036 | 15039 | ||
| 15037 | if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010){ | 15040 | coef = alc_read_coef_idx(codec, 0); |
| 15041 | if ((coef & 0x00f0) == 0x0010) { | ||
| 15038 | if (codec->bus->pci->subsystem_vendor == 0x1025 && | 15042 | if (codec->bus->pci->subsystem_vendor == 0x1025 && |
| 15039 | spec->cdefine.platform_type == 1) { | 15043 | spec->cdefine.platform_type == 1) { |
| 15040 | alc_codec_rename(codec, "ALC271X"); | 15044 | alc_codec_rename(codec, "ALC271X"); |
| 15041 | spec->codec_variant = ALC269_TYPE_ALC271X; | 15045 | spec->codec_variant = ALC269_TYPE_ALC271X; |
| 15042 | } else { | 15046 | } else if ((coef & 0xf000) == 0x1000) { |
| 15047 | spec->codec_variant = ALC269_TYPE_ALC270; | ||
| 15048 | } else if ((coef & 0xf000) == 0x2000) { | ||
| 15043 | alc_codec_rename(codec, "ALC259"); | 15049 | alc_codec_rename(codec, "ALC259"); |
| 15044 | spec->codec_variant = ALC269_TYPE_ALC259; | 15050 | spec->codec_variant = ALC269_TYPE_ALC259; |
| 15051 | } else if ((coef & 0xf000) == 0x3000) { | ||
| 15052 | alc_codec_rename(codec, "ALC258"); | ||
| 15053 | spec->codec_variant = ALC269_TYPE_ALC258; | ||
| 15054 | } else { | ||
| 15055 | alc_codec_rename(codec, "ALC269VB"); | ||
| 15056 | spec->codec_variant = ALC269_TYPE_ALC269VB; | ||
| 15045 | } | 15057 | } |
| 15046 | } else | 15058 | } else |
| 15047 | alc_fix_pll_init(codec, 0x20, 0x04, 15); | 15059 | alc_fix_pll_init(codec, 0x20, 0x04, 15); |
| @@ -15104,7 +15116,7 @@ static int patch_alc269(struct hda_codec *codec) | |||
| 15104 | spec->stream_digital_capture = &alc269_pcm_digital_capture; | 15116 | spec->stream_digital_capture = &alc269_pcm_digital_capture; |
| 15105 | 15117 | ||
| 15106 | if (!spec->adc_nids) { /* wasn't filled automatically? use default */ | 15118 | if (!spec->adc_nids) { /* wasn't filled automatically? use default */ |
| 15107 | if (spec->codec_variant != ALC269_TYPE_NORMAL) { | 15119 | if (spec->codec_variant == ALC269_TYPE_NORMAL) { |
| 15108 | spec->adc_nids = alc269_adc_nids; | 15120 | spec->adc_nids = alc269_adc_nids; |
| 15109 | spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids); | 15121 | spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids); |
| 15110 | spec->capsrc_nids = alc269_capsrc_nids; | 15122 | spec->capsrc_nids = alc269_capsrc_nids; |
| @@ -19298,6 +19310,7 @@ static const struct alc_fixup alc662_fixups[] = { | |||
| 19298 | 19310 | ||
| 19299 | static struct snd_pci_quirk alc662_fixup_tbl[] = { | 19311 | static struct snd_pci_quirk alc662_fixup_tbl[] = { |
| 19300 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 19312 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
| 19313 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), | ||
| 19301 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), | 19314 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), |
| 19302 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), | 19315 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), |
| 19303 | {} | 19316 | {} |
| @@ -19419,7 +19432,10 @@ static int patch_alc888(struct hda_codec *codec) | |||
| 19419 | { | 19432 | { |
| 19420 | if ((alc_read_coef_idx(codec, 0) & 0x00f0)==0x0030){ | 19433 | if ((alc_read_coef_idx(codec, 0) & 0x00f0)==0x0030){ |
| 19421 | kfree(codec->chip_name); | 19434 | kfree(codec->chip_name); |
| 19422 | codec->chip_name = kstrdup("ALC888-VD", GFP_KERNEL); | 19435 | if (codec->vendor_id == 0x10ec0887) |
| 19436 | codec->chip_name = kstrdup("ALC887-VD", GFP_KERNEL); | ||
| 19437 | else | ||
| 19438 | codec->chip_name = kstrdup("ALC888-VD", GFP_KERNEL); | ||
| 19423 | if (!codec->chip_name) { | 19439 | if (!codec->chip_name) { |
| 19424 | alc_free(codec); | 19440 | alc_free(codec); |
| 19425 | return -ENOMEM; | 19441 | return -ENOMEM; |
| @@ -19909,7 +19925,7 @@ static struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
| 19909 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", | 19925 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", |
| 19910 | .patch = patch_alc882 }, | 19926 | .patch = patch_alc882 }, |
| 19911 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, | 19927 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, |
| 19912 | { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc882 }, | 19928 | { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc888 }, |
| 19913 | { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200", | 19929 | { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200", |
| 19914 | .patch = patch_alc882 }, | 19930 | .patch = patch_alc882 }, |
| 19915 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc888 }, | 19931 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc888 }, |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 93fa59cc60ef..5c710807dfe5 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), |
| @@ -3486,10 +3491,8 @@ static int stac92xx_auto_create_dmic_input_ctls(struct hda_codec *codec, | |||
| 3486 | return err; | 3491 | return err; |
| 3487 | } | 3492 | } |
| 3488 | 3493 | ||
| 3489 | if (snd_hda_get_bool_hint(codec, "separate_dmux") != 1) { | 3494 | if (snd_hda_get_bool_hint(codec, "separate_dmux") != 1) |
| 3490 | snd_hda_add_imux_item(imux, label, index, NULL); | 3495 | snd_hda_add_imux_item(imux, label, index, NULL); |
| 3491 | spec->num_analog_muxes++; | ||
| 3492 | } | ||
| 3493 | } | 3496 | } |
| 3494 | 3497 | ||
| 3495 | return 0; | 3498 | return 0; |
| @@ -5452,12 +5455,17 @@ again: | |||
| 5452 | stac92hd83xxx_brd_tbl[spec->board_config]); | 5455 | stac92hd83xxx_brd_tbl[spec->board_config]); |
| 5453 | 5456 | ||
| 5454 | switch (codec->vendor_id) { | 5457 | switch (codec->vendor_id) { |
| 5458 | case 0x111d76d1: | ||
| 5459 | case 0x111d76d9: | ||
| 5460 | spec->dmic_nids = stac92hd87b_dmic_nids; | ||
| 5461 | spec->num_dmics = stac92xx_connected_ports(codec, | ||
| 5462 | stac92hd87b_dmic_nids, | ||
| 5463 | STAC92HD87B_NUM_DMICS); | ||
| 5464 | /* Fall through */ | ||
| 5455 | case 0x111d7666: | 5465 | case 0x111d7666: |
| 5456 | case 0x111d7667: | 5466 | case 0x111d7667: |
| 5457 | case 0x111d7668: | 5467 | case 0x111d7668: |
| 5458 | case 0x111d7669: | 5468 | case 0x111d7669: |
| 5459 | case 0x111d76d1: | ||
| 5460 | case 0x111d76d9: | ||
| 5461 | spec->num_pins = ARRAY_SIZE(stac92hd88xxx_pin_nids); | 5469 | spec->num_pins = ARRAY_SIZE(stac92hd88xxx_pin_nids); |
| 5462 | spec->pin_nids = stac92hd88xxx_pin_nids; | 5470 | spec->pin_nids = stac92hd88xxx_pin_nids; |
| 5463 | spec->mono_nid = 0; | 5471 | 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/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index ef9af3f4ace2..1bd7a540fd49 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c | |||
| @@ -425,7 +425,7 @@ exit: | |||
| 425 | static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream) | 425 | static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream) |
| 426 | { | 426 | { |
| 427 | struct snd_pcm_substream *substream = lx_stream->stream; | 427 | struct snd_pcm_substream *substream = lx_stream->stream; |
| 428 | const int is_capture = lx_stream->is_capture; | 428 | const unsigned int is_capture = lx_stream->is_capture; |
| 429 | 429 | ||
| 430 | int err; | 430 | int err; |
| 431 | 431 | ||
| @@ -473,7 +473,7 @@ static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream) | |||
| 473 | 473 | ||
| 474 | static void lx_trigger_stop(struct lx6464es *chip, struct lx_stream *lx_stream) | 474 | static void lx_trigger_stop(struct lx6464es *chip, struct lx_stream *lx_stream) |
| 475 | { | 475 | { |
| 476 | const int is_capture = lx_stream->is_capture; | 476 | const unsigned int is_capture = lx_stream->is_capture; |
| 477 | int err; | 477 | int err; |
| 478 | 478 | ||
| 479 | snd_printd(LXP "stopping: stopping stream\n"); | 479 | snd_printd(LXP "stopping: stopping stream\n"); |
diff --git a/sound/pci/lx6464es/lx6464es.h b/sound/pci/lx6464es/lx6464es.h index 51afc048961d..aea621eafbb5 100644 --- a/sound/pci/lx6464es/lx6464es.h +++ b/sound/pci/lx6464es/lx6464es.h | |||
| @@ -60,7 +60,7 @@ struct lx_stream { | |||
| 60 | snd_pcm_uframes_t frame_pos; | 60 | snd_pcm_uframes_t frame_pos; |
| 61 | enum lx_stream_status status; /* free, open, running, draining | 61 | enum lx_stream_status status; /* free, open, running, draining |
| 62 | * pause */ | 62 | * pause */ |
| 63 | int is_capture:1; | 63 | unsigned int is_capture:1; |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | 66 | ||
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c index 3086b751da4a..617f98b0cbae 100644 --- a/sound/pci/lx6464es/lx_core.c +++ b/sound/pci/lx6464es/lx_core.c | |||
| @@ -1152,7 +1152,7 @@ static int lx_interrupt_request_new_buffer(struct lx6464es *chip, | |||
| 1152 | struct lx_stream *lx_stream) | 1152 | struct lx_stream *lx_stream) |
| 1153 | { | 1153 | { |
| 1154 | struct snd_pcm_substream *substream = lx_stream->stream; | 1154 | struct snd_pcm_substream *substream = lx_stream->stream; |
| 1155 | int is_capture = lx_stream->is_capture; | 1155 | const unsigned int is_capture = lx_stream->is_capture; |
| 1156 | int err; | 1156 | int err; |
| 1157 | unsigned long flags; | 1157 | unsigned long flags; |
| 1158 | 1158 | ||
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/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) { |
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 7dae05d8783e..782f741cd00a 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
| @@ -60,7 +60,7 @@ static const struct rc_config { | |||
| 60 | { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ | 60 | { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ |
| 61 | { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */ | 61 | { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */ |
| 62 | { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */ | 62 | { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */ |
| 63 | { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi */ | 63 | { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */ |
| 64 | { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ | 64 | { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| @@ -183,7 +183,13 @@ static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e | |||
| 183 | if (value > 1) | 183 | if (value > 1) |
| 184 | return -EINVAL; | 184 | return -EINVAL; |
| 185 | changed = value != mixer->audigy2nx_leds[index]; | 185 | changed = value != mixer->audigy2nx_leds[index]; |
| 186 | err = snd_usb_ctl_msg(mixer->chip->dev, | 186 | if (mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) |
| 187 | err = snd_usb_ctl_msg(mixer->chip->dev, | ||
| 188 | usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, | ||
| 189 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, | ||
| 190 | !value, 0, NULL, 0, 100); | ||
| 191 | else | ||
| 192 | err = snd_usb_ctl_msg(mixer->chip->dev, | ||
| 187 | usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, | 193 | usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, |
| 188 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, | 194 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, |
| 189 | value, index + 2, NULL, 0, 100); | 195 | value, index + 2, NULL, 0, 100); |
| @@ -225,8 +231,12 @@ static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer) | |||
| 225 | int i, err; | 231 | int i, err; |
| 226 | 232 | ||
| 227 | for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) { | 233 | for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) { |
| 234 | /* USB X-Fi S51 doesn't have a CMSS LED */ | ||
| 235 | if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0) | ||
| 236 | continue; | ||
| 228 | if (i > 1 && /* Live24ext has 2 LEDs only */ | 237 | if (i > 1 && /* Live24ext has 2 LEDs only */ |
| 229 | (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || | 238 | (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || |
| 239 | mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || | ||
| 230 | mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) | 240 | mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) |
| 231 | break; | 241 | break; |
| 232 | err = snd_ctl_add(mixer->chip->card, | 242 | err = snd_ctl_add(mixer->chip->card, |
| @@ -365,6 +375,7 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer) | |||
| 365 | 375 | ||
| 366 | if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020) || | 376 | if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020) || |
| 367 | mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || | 377 | mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || |
| 378 | mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || | ||
| 368 | mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) { | 379 | mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) { |
| 369 | if ((err = snd_audigy2nx_controls_create(mixer)) < 0) | 380 | if ((err = snd_audigy2nx_controls_create(mixer)) < 0) |
| 370 | return err; | 381 | return err; |
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index cff3a3c465d7..4132522ac90f 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
| @@ -676,8 +676,10 @@ static int snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime, | |||
| 676 | if (!needs_knot) | 676 | if (!needs_knot) |
| 677 | return 0; | 677 | return 0; |
| 678 | 678 | ||
| 679 | subs->rate_list.count = count; | ||
| 680 | subs->rate_list.list = kmalloc(sizeof(int) * count, GFP_KERNEL); | 679 | subs->rate_list.list = kmalloc(sizeof(int) * count, GFP_KERNEL); |
| 680 | if (!subs->rate_list.list) | ||
| 681 | return -ENOMEM; | ||
| 682 | subs->rate_list.count = count; | ||
| 681 | subs->rate_list.mask = 0; | 683 | subs->rate_list.mask = 0; |
| 682 | count = 0; | 684 | count = 0; |
| 683 | list_for_each_entry(fp, &subs->fmt_list, list) { | 685 | list_for_each_entry(fp, &subs->fmt_list, list) { |
