diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-03-25 14:31:35 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-03-25 14:31:35 -0400 |
commit | 8937b7349ca9e25a02b2a72ccb7fba404ddedc5b (patch) | |
tree | 434ffe23d318f8af55850a26c3431ce8b82ab6f4 /sound | |
parent | 997302259f386bca8fe1db67c50296ca426c438f (diff) | |
parent | ffe7f95bb1a4d1e9ca5d252445dc38476e1a208e (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/oss/mixer_oss.c | 3 | ||||
-rw-r--r-- | sound/core/oss/pcm_oss.c | 4 | ||||
-rw-r--r-- | sound/core/sgbuf.c | 7 | ||||
-rw-r--r-- | sound/isa/opl3sa2.c | 18 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 39 | ||||
-rw-r--r-- | sound/pci/mixart/mixart.c | 1 |
6 files changed, 48 insertions, 24 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 4690b8b5681f..e570649184e2 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c | |||
@@ -692,6 +692,9 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer, | |||
692 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right); | 692 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right); |
693 | if (slot->present & SNDRV_MIXER_OSS_PRESENT_CVOLUME) | 693 | if (slot->present & SNDRV_MIXER_OSS_PRESENT_CVOLUME) |
694 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CVOLUME], left, right); | 694 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CVOLUME], left, right); |
695 | } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CVOLUME) { | ||
696 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, | ||
697 | slot->numid[SNDRV_MIXER_OSS_ITEM_CVOLUME], left, right); | ||
695 | } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GVOLUME) { | 698 | } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GVOLUME) { |
696 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GVOLUME], left, right); | 699 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GVOLUME], left, right); |
697 | } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GLOBAL) { | 700 | } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GLOBAL) { |
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 0a1798eafb0b..699d2890535c 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -2872,7 +2872,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, | |||
2872 | setup = kmalloc(sizeof(*setup), GFP_KERNEL); | 2872 | setup = kmalloc(sizeof(*setup), GFP_KERNEL); |
2873 | if (! setup) { | 2873 | if (! setup) { |
2874 | buffer->error = -ENOMEM; | 2874 | buffer->error = -ENOMEM; |
2875 | mutex_lock(&pstr->oss.setup_mutex); | 2875 | mutex_unlock(&pstr->oss.setup_mutex); |
2876 | return; | 2876 | return; |
2877 | } | 2877 | } |
2878 | if (pstr->oss.setup_list == NULL) | 2878 | if (pstr->oss.setup_list == NULL) |
@@ -2886,7 +2886,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, | |||
2886 | if (! template.task_name) { | 2886 | if (! template.task_name) { |
2887 | kfree(setup); | 2887 | kfree(setup); |
2888 | buffer->error = -ENOMEM; | 2888 | buffer->error = -ENOMEM; |
2889 | mutex_lock(&pstr->oss.setup_mutex); | 2889 | mutex_unlock(&pstr->oss.setup_mutex); |
2890 | return; | 2890 | return; |
2891 | } | 2891 | } |
2892 | } | 2892 | } |
diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c index d4564edd61d7..4e7ec2b49873 100644 --- a/sound/core/sgbuf.c +++ b/sound/core/sgbuf.c | |||
@@ -38,6 +38,10 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) | |||
38 | if (! sgbuf) | 38 | if (! sgbuf) |
39 | return -EINVAL; | 39 | return -EINVAL; |
40 | 40 | ||
41 | if (dmab->area) | ||
42 | vunmap(dmab->area); | ||
43 | dmab->area = NULL; | ||
44 | |||
41 | tmpb.dev.type = SNDRV_DMA_TYPE_DEV; | 45 | tmpb.dev.type = SNDRV_DMA_TYPE_DEV; |
42 | tmpb.dev.dev = sgbuf->dev; | 46 | tmpb.dev.dev = sgbuf->dev; |
43 | for (i = 0; i < sgbuf->pages; i++) { | 47 | for (i = 0; i < sgbuf->pages; i++) { |
@@ -48,9 +52,6 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) | |||
48 | tmpb.bytes = (sgbuf->table[i].addr & ~PAGE_MASK) << PAGE_SHIFT; | 52 | tmpb.bytes = (sgbuf->table[i].addr & ~PAGE_MASK) << PAGE_SHIFT; |
49 | snd_dma_free_pages(&tmpb); | 53 | snd_dma_free_pages(&tmpb); |
50 | } | 54 | } |
51 | if (dmab->area) | ||
52 | vunmap(dmab->area); | ||
53 | dmab->area = NULL; | ||
54 | 55 | ||
55 | kfree(sgbuf->table); | 56 | kfree(sgbuf->table); |
56 | kfree(sgbuf->page_table); | 57 | kfree(sgbuf->page_table); |
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 58c972b2af03..b848d1001864 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -550,21 +550,27 @@ static int __devinit snd_opl3sa2_mixer(struct snd_card *card) | |||
550 | #ifdef CONFIG_PM | 550 | #ifdef CONFIG_PM |
551 | static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) | 551 | static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) |
552 | { | 552 | { |
553 | struct snd_opl3sa2 *chip = card->private_data; | 553 | if (card) { |
554 | struct snd_opl3sa2 *chip = card->private_data; | ||
554 | 555 | ||
555 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 556 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
556 | chip->wss->suspend(chip->wss); | 557 | chip->wss->suspend(chip->wss); |
557 | /* power down */ | 558 | /* power down */ |
558 | snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); | 559 | snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); |
560 | } | ||
559 | 561 | ||
560 | return 0; | 562 | return 0; |
561 | } | 563 | } |
562 | 564 | ||
563 | static int snd_opl3sa2_resume(struct snd_card *card) | 565 | static int snd_opl3sa2_resume(struct snd_card *card) |
564 | { | 566 | { |
565 | struct snd_opl3sa2 *chip = card->private_data; | 567 | struct snd_opl3sa2 *chip; |
566 | int i; | 568 | int i; |
567 | 569 | ||
570 | if (!card) | ||
571 | return 0; | ||
572 | |||
573 | chip = card->private_data; | ||
568 | /* power up */ | 574 | /* power up */ |
569 | snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); | 575 | snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); |
570 | 576 | ||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 5e909e0da04b..f3b5723c2859 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2059,26 +2059,31 @@ static int __devinit check_position_fix(struct azx *chip, int fix) | |||
2059 | { | 2059 | { |
2060 | const struct snd_pci_quirk *q; | 2060 | const struct snd_pci_quirk *q; |
2061 | 2061 | ||
2062 | /* Check VIA HD Audio Controller exist */ | 2062 | switch (fix) { |
2063 | if (chip->pci->vendor == PCI_VENDOR_ID_VIA && | 2063 | case POS_FIX_LPIB: |
2064 | chip->pci->device == VIA_HDAC_DEVICE_ID) { | 2064 | case POS_FIX_POSBUF: |
2065 | return fix; | ||
2066 | } | ||
2067 | |||
2068 | /* Check VIA/ATI HD Audio Controller exist */ | ||
2069 | switch (chip->driver_type) { | ||
2070 | case AZX_DRIVER_VIA: | ||
2071 | case AZX_DRIVER_ATI: | ||
2065 | chip->via_dmapos_patch = 1; | 2072 | chip->via_dmapos_patch = 1; |
2066 | /* Use link position directly, avoid any transfer problem. */ | 2073 | /* Use link position directly, avoid any transfer problem. */ |
2067 | return POS_FIX_LPIB; | 2074 | return POS_FIX_LPIB; |
2068 | } | 2075 | } |
2069 | chip->via_dmapos_patch = 0; | 2076 | chip->via_dmapos_patch = 0; |
2070 | 2077 | ||
2071 | if (fix == POS_FIX_AUTO) { | 2078 | q = snd_pci_quirk_lookup(chip->pci, position_fix_list); |
2072 | q = snd_pci_quirk_lookup(chip->pci, position_fix_list); | 2079 | if (q) { |
2073 | if (q) { | 2080 | printk(KERN_INFO |
2074 | printk(KERN_INFO | 2081 | "hda_intel: position_fix set to %d " |
2075 | "hda_intel: position_fix set to %d " | 2082 | "for device %04x:%04x\n", |
2076 | "for device %04x:%04x\n", | 2083 | q->value, q->subvendor, q->subdevice); |
2077 | q->value, q->subvendor, q->subdevice); | 2084 | return q->value; |
2078 | return q->value; | ||
2079 | } | ||
2080 | } | 2085 | } |
2081 | return fix; | 2086 | return POS_FIX_AUTO; |
2082 | } | 2087 | } |
2083 | 2088 | ||
2084 | /* | 2089 | /* |
@@ -2210,9 +2215,17 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2210 | gcap = azx_readw(chip, GCAP); | 2215 | gcap = azx_readw(chip, GCAP); |
2211 | snd_printdd("chipset global capabilities = 0x%x\n", gcap); | 2216 | snd_printdd("chipset global capabilities = 0x%x\n", gcap); |
2212 | 2217 | ||
2218 | /* ATI chips seems buggy about 64bit DMA addresses */ | ||
2219 | if (chip->driver_type == AZX_DRIVER_ATI) | ||
2220 | gcap &= ~0x01; | ||
2221 | |||
2213 | /* allow 64bit DMA address if supported by H/W */ | 2222 | /* allow 64bit DMA address if supported by H/W */ |
2214 | if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) | 2223 | if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) |
2215 | pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); | 2224 | pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); |
2225 | else { | ||
2226 | pci_set_dma_mask(pci, DMA_32BIT_MASK); | ||
2227 | pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK); | ||
2228 | } | ||
2216 | 2229 | ||
2217 | /* read number of streams from GCAP register instead of using | 2230 | /* read number of streams from GCAP register instead of using |
2218 | * hardcoded value | 2231 | * hardcoded value |
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index f23a73577c22..bb162507fe6c 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -607,6 +607,7 @@ static int snd_mixart_hw_params(struct snd_pcm_substream *subs, | |||
607 | /* set the format to the board */ | 607 | /* set the format to the board */ |
608 | err = mixart_set_format(stream, format); | 608 | err = mixart_set_format(stream, format); |
609 | if(err < 0) { | 609 | if(err < 0) { |
610 | mutex_unlock(&mgr->setup_mutex); | ||
610 | return err; | 611 | return err; |
611 | } | 612 | } |
612 | 613 | ||