diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/arm/Makefile | 2 | ||||
-rw-r--r-- | sound/arm/aaci.c | 16 | ||||
-rw-r--r-- | sound/arm/devdma.c | 80 | ||||
-rw-r--r-- | sound/arm/devdma.h | 3 | ||||
-rw-r--r-- | sound/core/pcm_native.c | 83 | ||||
-rw-r--r-- | sound/oss/hex2hex.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 15 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 17 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1712.h | 4 | ||||
-rw-r--r-- | sound/pci/ice1712/prodigy_hifi.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 2 | ||||
-rw-r--r-- | sound/soc/omap/omap3evm.c | 2 | ||||
-rw-r--r-- | sound/soc/omap/omap3pandora.c | 3 | ||||
-rw-r--r-- | sound/usb/usbmixer.c | 9 |
16 files changed, 108 insertions, 136 deletions
diff --git a/sound/arm/Makefile b/sound/arm/Makefile index 5a549ed6c8aa..8c0c851d4641 100644 --- a/sound/arm/Makefile +++ b/sound/arm/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_SND_ARMAACI) += snd-aaci.o | 5 | obj-$(CONFIG_SND_ARMAACI) += snd-aaci.o |
6 | snd-aaci-objs := aaci.o devdma.o | 6 | snd-aaci-objs := aaci.o |
7 | 7 | ||
8 | obj-$(CONFIG_SND_PXA2XX_PCM) += snd-pxa2xx-pcm.o | 8 | obj-$(CONFIG_SND_PXA2XX_PCM) += snd-pxa2xx-pcm.o |
9 | snd-pxa2xx-pcm-objs := pxa2xx-pcm.o | 9 | snd-pxa2xx-pcm-objs := pxa2xx-pcm.o |
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 1f0f8213e2d5..e59372887f36 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <sound/pcm_params.h> | 30 | #include <sound/pcm_params.h> |
31 | 31 | ||
32 | #include "aaci.h" | 32 | #include "aaci.h" |
33 | #include "devdma.h" | ||
34 | 33 | ||
35 | #define DRIVER_NAME "aaci-pl041" | 34 | #define DRIVER_NAME "aaci-pl041" |
36 | 35 | ||
@@ -492,7 +491,7 @@ static int aaci_pcm_hw_free(struct snd_pcm_substream *substream) | |||
492 | /* | 491 | /* |
493 | * Clear out the DMA and any allocated buffers. | 492 | * Clear out the DMA and any allocated buffers. |
494 | */ | 493 | */ |
495 | devdma_hw_free(NULL, substream); | 494 | snd_pcm_lib_free_pages(substream); |
496 | 495 | ||
497 | return 0; | 496 | return 0; |
498 | } | 497 | } |
@@ -505,8 +504,8 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, | |||
505 | 504 | ||
506 | aaci_pcm_hw_free(substream); | 505 | aaci_pcm_hw_free(substream); |
507 | 506 | ||
508 | err = devdma_hw_alloc(NULL, substream, | 507 | err = snd_pcm_lib_malloc_pages(substream, |
509 | params_buffer_bytes(params)); | 508 | params_buffer_bytes(params)); |
510 | if (err < 0) | 509 | if (err < 0) |
511 | goto out; | 510 | goto out; |
512 | 511 | ||
@@ -551,11 +550,6 @@ static snd_pcm_uframes_t aaci_pcm_pointer(struct snd_pcm_substream *substream) | |||
551 | return bytes_to_frames(runtime, bytes); | 550 | return bytes_to_frames(runtime, bytes); |
552 | } | 551 | } |
553 | 552 | ||
554 | static int aaci_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma) | ||
555 | { | ||
556 | return devdma_mmap(NULL, substream, vma); | ||
557 | } | ||
558 | |||
559 | 553 | ||
560 | /* | 554 | /* |
561 | * Playback specific ALSA stuff | 555 | * Playback specific ALSA stuff |
@@ -722,7 +716,6 @@ static struct snd_pcm_ops aaci_playback_ops = { | |||
722 | .prepare = aaci_pcm_prepare, | 716 | .prepare = aaci_pcm_prepare, |
723 | .trigger = aaci_pcm_playback_trigger, | 717 | .trigger = aaci_pcm_playback_trigger, |
724 | .pointer = aaci_pcm_pointer, | 718 | .pointer = aaci_pcm_pointer, |
725 | .mmap = aaci_pcm_mmap, | ||
726 | }; | 719 | }; |
727 | 720 | ||
728 | static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream, | 721 | static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream, |
@@ -850,7 +843,6 @@ static struct snd_pcm_ops aaci_capture_ops = { | |||
850 | .prepare = aaci_pcm_capture_prepare, | 843 | .prepare = aaci_pcm_capture_prepare, |
851 | .trigger = aaci_pcm_capture_trigger, | 844 | .trigger = aaci_pcm_capture_trigger, |
852 | .pointer = aaci_pcm_pointer, | 845 | .pointer = aaci_pcm_pointer, |
853 | .mmap = aaci_pcm_mmap, | ||
854 | }; | 846 | }; |
855 | 847 | ||
856 | /* | 848 | /* |
@@ -1040,6 +1032,8 @@ static int __devinit aaci_init_pcm(struct aaci *aaci) | |||
1040 | 1032 | ||
1041 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); | 1033 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); |
1042 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); | 1034 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); |
1035 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, | ||
1036 | NULL, 0, 64 * 104); | ||
1043 | } | 1037 | } |
1044 | 1038 | ||
1045 | return ret; | 1039 | return ret; |
diff --git a/sound/arm/devdma.c b/sound/arm/devdma.c deleted file mode 100644 index 9d1e6665b546..000000000000 --- a/sound/arm/devdma.c +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * linux/sound/arm/devdma.c | ||
3 | * | ||
4 | * Copyright (C) 2003-2004 Russell King, All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * ARM DMA shim for ALSA. | ||
11 | */ | ||
12 | #include <linux/device.h> | ||
13 | #include <linux/dma-mapping.h> | ||
14 | |||
15 | #include <sound/core.h> | ||
16 | #include <sound/pcm.h> | ||
17 | |||
18 | #include "devdma.h" | ||
19 | |||
20 | void devdma_hw_free(struct device *dev, struct snd_pcm_substream *substream) | ||
21 | { | ||
22 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
23 | struct snd_dma_buffer *buf = runtime->dma_buffer_p; | ||
24 | |||
25 | if (runtime->dma_area == NULL) | ||
26 | return; | ||
27 | |||
28 | if (buf != &substream->dma_buffer) { | ||
29 | dma_free_coherent(buf->dev.dev, buf->bytes, buf->area, buf->addr); | ||
30 | kfree(runtime->dma_buffer_p); | ||
31 | } | ||
32 | |||
33 | snd_pcm_set_runtime_buffer(substream, NULL); | ||
34 | } | ||
35 | |||
36 | int devdma_hw_alloc(struct device *dev, struct snd_pcm_substream *substream, size_t size) | ||
37 | { | ||
38 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
39 | struct snd_dma_buffer *buf = runtime->dma_buffer_p; | ||
40 | int ret = 0; | ||
41 | |||
42 | if (buf) { | ||
43 | if (buf->bytes >= size) | ||
44 | goto out; | ||
45 | devdma_hw_free(dev, substream); | ||
46 | } | ||
47 | |||
48 | if (substream->dma_buffer.area != NULL && substream->dma_buffer.bytes >= size) { | ||
49 | buf = &substream->dma_buffer; | ||
50 | } else { | ||
51 | buf = kmalloc(sizeof(struct snd_dma_buffer), GFP_KERNEL); | ||
52 | if (!buf) | ||
53 | goto nomem; | ||
54 | |||
55 | buf->dev.type = SNDRV_DMA_TYPE_DEV; | ||
56 | buf->dev.dev = dev; | ||
57 | buf->area = dma_alloc_coherent(dev, size, &buf->addr, GFP_KERNEL); | ||
58 | buf->bytes = size; | ||
59 | buf->private_data = NULL; | ||
60 | |||
61 | if (!buf->area) | ||
62 | goto free; | ||
63 | } | ||
64 | snd_pcm_set_runtime_buffer(substream, buf); | ||
65 | ret = 1; | ||
66 | out: | ||
67 | runtime->dma_bytes = size; | ||
68 | return ret; | ||
69 | |||
70 | free: | ||
71 | kfree(buf); | ||
72 | nomem: | ||
73 | return -ENOMEM; | ||
74 | } | ||
75 | |||
76 | int devdma_mmap(struct device *dev, struct snd_pcm_substream *substream, struct vm_area_struct *vma) | ||
77 | { | ||
78 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
79 | return dma_mmap_coherent(dev, vma, runtime->dma_area, runtime->dma_addr, runtime->dma_bytes); | ||
80 | } | ||
diff --git a/sound/arm/devdma.h b/sound/arm/devdma.h deleted file mode 100644 index d025329c8a0f..000000000000 --- a/sound/arm/devdma.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | void devdma_hw_free(struct device *dev, struct snd_pcm_substream *substream); | ||
2 | int devdma_hw_alloc(struct device *dev, struct snd_pcm_substream *substream, size_t size); | ||
3 | int devdma_mmap(struct device *dev, struct snd_pcm_substream *substream, struct vm_area_struct *vma); | ||
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index ab73edf2c89a..29ab46a12e11 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/time.h> | 26 | #include <linux/time.h> |
27 | #include <linux/pm_qos_params.h> | 27 | #include <linux/pm_qos_params.h> |
28 | #include <linux/uio.h> | 28 | #include <linux/uio.h> |
29 | #include <linux/dma-mapping.h> | ||
29 | #include <sound/core.h> | 30 | #include <sound/core.h> |
30 | #include <sound/control.h> | 31 | #include <sound/control.h> |
31 | #include <sound/info.h> | 32 | #include <sound/info.h> |
@@ -3061,6 +3062,27 @@ static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file | |||
3061 | } | 3062 | } |
3062 | #endif /* coherent mmap */ | 3063 | #endif /* coherent mmap */ |
3063 | 3064 | ||
3065 | static inline struct page * | ||
3066 | snd_pcm_default_page_ops(struct snd_pcm_substream *substream, unsigned long ofs) | ||
3067 | { | ||
3068 | void *vaddr = substream->runtime->dma_area + ofs; | ||
3069 | #if defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT) | ||
3070 | if (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) | ||
3071 | return virt_to_page(CAC_ADDR(vaddr)); | ||
3072 | #endif | ||
3073 | #if defined(CONFIG_PPC32) && defined(CONFIG_NOT_COHERENT_CACHE) | ||
3074 | if (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) { | ||
3075 | dma_addr_t addr = substream->runtime->dma_addr + ofs; | ||
3076 | addr -= get_dma_offset(substream->dma_buffer.dev.dev); | ||
3077 | /* assume dma_handle set via pfn_to_phys() in | ||
3078 | * mm/dma-noncoherent.c | ||
3079 | */ | ||
3080 | return pfn_to_page(addr >> PAGE_SHIFT); | ||
3081 | } | ||
3082 | #endif | ||
3083 | return virt_to_page(vaddr); | ||
3084 | } | ||
3085 | |||
3064 | /* | 3086 | /* |
3065 | * fault callback for mmapping a RAM page | 3087 | * fault callback for mmapping a RAM page |
3066 | */ | 3088 | */ |
@@ -3071,7 +3093,6 @@ static int snd_pcm_mmap_data_fault(struct vm_area_struct *area, | |||
3071 | struct snd_pcm_runtime *runtime; | 3093 | struct snd_pcm_runtime *runtime; |
3072 | unsigned long offset; | 3094 | unsigned long offset; |
3073 | struct page * page; | 3095 | struct page * page; |
3074 | void *vaddr; | ||
3075 | size_t dma_bytes; | 3096 | size_t dma_bytes; |
3076 | 3097 | ||
3077 | if (substream == NULL) | 3098 | if (substream == NULL) |
@@ -3081,36 +3102,53 @@ static int snd_pcm_mmap_data_fault(struct vm_area_struct *area, | |||
3081 | dma_bytes = PAGE_ALIGN(runtime->dma_bytes); | 3102 | dma_bytes = PAGE_ALIGN(runtime->dma_bytes); |
3082 | if (offset > dma_bytes - PAGE_SIZE) | 3103 | if (offset > dma_bytes - PAGE_SIZE) |
3083 | return VM_FAULT_SIGBUS; | 3104 | return VM_FAULT_SIGBUS; |
3084 | if (substream->ops->page) { | 3105 | if (substream->ops->page) |
3085 | page = substream->ops->page(substream, offset); | 3106 | page = substream->ops->page(substream, offset); |
3086 | if (!page) | 3107 | else |
3087 | return VM_FAULT_SIGBUS; | 3108 | page = snd_pcm_default_page_ops(substream, offset); |
3088 | } else { | 3109 | if (!page) |
3089 | vaddr = runtime->dma_area + offset; | 3110 | return VM_FAULT_SIGBUS; |
3090 | page = virt_to_page(vaddr); | ||
3091 | } | ||
3092 | get_page(page); | 3111 | get_page(page); |
3093 | vmf->page = page; | 3112 | vmf->page = page; |
3094 | return 0; | 3113 | return 0; |
3095 | } | 3114 | } |
3096 | 3115 | ||
3097 | static const struct vm_operations_struct snd_pcm_vm_ops_data = | 3116 | static const struct vm_operations_struct snd_pcm_vm_ops_data = { |
3098 | { | 3117 | .open = snd_pcm_mmap_data_open, |
3118 | .close = snd_pcm_mmap_data_close, | ||
3119 | }; | ||
3120 | |||
3121 | static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = { | ||
3099 | .open = snd_pcm_mmap_data_open, | 3122 | .open = snd_pcm_mmap_data_open, |
3100 | .close = snd_pcm_mmap_data_close, | 3123 | .close = snd_pcm_mmap_data_close, |
3101 | .fault = snd_pcm_mmap_data_fault, | 3124 | .fault = snd_pcm_mmap_data_fault, |
3102 | }; | 3125 | }; |
3103 | 3126 | ||
3127 | #ifndef ARCH_HAS_DMA_MMAP_COHERENT | ||
3128 | /* This should be defined / handled globally! */ | ||
3129 | #ifdef CONFIG_ARM | ||
3130 | #define ARCH_HAS_DMA_MMAP_COHERENT | ||
3131 | #endif | ||
3132 | #endif | ||
3133 | |||
3104 | /* | 3134 | /* |
3105 | * mmap the DMA buffer on RAM | 3135 | * mmap the DMA buffer on RAM |
3106 | */ | 3136 | */ |
3107 | static int snd_pcm_default_mmap(struct snd_pcm_substream *substream, | 3137 | static int snd_pcm_default_mmap(struct snd_pcm_substream *substream, |
3108 | struct vm_area_struct *area) | 3138 | struct vm_area_struct *area) |
3109 | { | 3139 | { |
3110 | area->vm_ops = &snd_pcm_vm_ops_data; | ||
3111 | area->vm_private_data = substream; | ||
3112 | area->vm_flags |= VM_RESERVED; | 3140 | area->vm_flags |= VM_RESERVED; |
3113 | atomic_inc(&substream->mmap_count); | 3141 | #ifdef ARCH_HAS_DMA_MMAP_COHERENT |
3142 | if (!substream->ops->page && | ||
3143 | substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) | ||
3144 | return dma_mmap_coherent(substream->dma_buffer.dev.dev, | ||
3145 | area, | ||
3146 | substream->runtime->dma_area, | ||
3147 | substream->runtime->dma_addr, | ||
3148 | area->vm_end - area->vm_start); | ||
3149 | #endif /* ARCH_HAS_DMA_MMAP_COHERENT */ | ||
3150 | /* mmap with fault handler */ | ||
3151 | area->vm_ops = &snd_pcm_vm_ops_data_fault; | ||
3114 | return 0; | 3152 | return 0; |
3115 | } | 3153 | } |
3116 | 3154 | ||
@@ -3118,12 +3156,6 @@ static int snd_pcm_default_mmap(struct snd_pcm_substream *substream, | |||
3118 | * mmap the DMA buffer on I/O memory area | 3156 | * mmap the DMA buffer on I/O memory area |
3119 | */ | 3157 | */ |
3120 | #if SNDRV_PCM_INFO_MMAP_IOMEM | 3158 | #if SNDRV_PCM_INFO_MMAP_IOMEM |
3121 | static const struct vm_operations_struct snd_pcm_vm_ops_data_mmio = | ||
3122 | { | ||
3123 | .open = snd_pcm_mmap_data_open, | ||
3124 | .close = snd_pcm_mmap_data_close, | ||
3125 | }; | ||
3126 | |||
3127 | int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, | 3159 | int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, |
3128 | struct vm_area_struct *area) | 3160 | struct vm_area_struct *area) |
3129 | { | 3161 | { |
@@ -3133,8 +3165,6 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, | |||
3133 | #ifdef pgprot_noncached | 3165 | #ifdef pgprot_noncached |
3134 | area->vm_page_prot = pgprot_noncached(area->vm_page_prot); | 3166 | area->vm_page_prot = pgprot_noncached(area->vm_page_prot); |
3135 | #endif | 3167 | #endif |
3136 | area->vm_ops = &snd_pcm_vm_ops_data_mmio; | ||
3137 | area->vm_private_data = substream; | ||
3138 | area->vm_flags |= VM_IO; | 3168 | area->vm_flags |= VM_IO; |
3139 | size = area->vm_end - area->vm_start; | 3169 | size = area->vm_end - area->vm_start; |
3140 | offset = area->vm_pgoff << PAGE_SHIFT; | 3170 | offset = area->vm_pgoff << PAGE_SHIFT; |
@@ -3142,7 +3172,6 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, | |||
3142 | (substream->runtime->dma_addr + offset) >> PAGE_SHIFT, | 3172 | (substream->runtime->dma_addr + offset) >> PAGE_SHIFT, |
3143 | size, area->vm_page_prot)) | 3173 | size, area->vm_page_prot)) |
3144 | return -EAGAIN; | 3174 | return -EAGAIN; |
3145 | atomic_inc(&substream->mmap_count); | ||
3146 | return 0; | 3175 | return 0; |
3147 | } | 3176 | } |
3148 | 3177 | ||
@@ -3159,6 +3188,7 @@ int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, | |||
3159 | long size; | 3188 | long size; |
3160 | unsigned long offset; | 3189 | unsigned long offset; |
3161 | size_t dma_bytes; | 3190 | size_t dma_bytes; |
3191 | int err; | ||
3162 | 3192 | ||
3163 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 3193 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
3164 | if (!(area->vm_flags & (VM_WRITE|VM_READ))) | 3194 | if (!(area->vm_flags & (VM_WRITE|VM_READ))) |
@@ -3183,10 +3213,15 @@ int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, | |||
3183 | if (offset > dma_bytes - size) | 3213 | if (offset > dma_bytes - size) |
3184 | return -EINVAL; | 3214 | return -EINVAL; |
3185 | 3215 | ||
3216 | area->vm_ops = &snd_pcm_vm_ops_data; | ||
3217 | area->vm_private_data = substream; | ||
3186 | if (substream->ops->mmap) | 3218 | if (substream->ops->mmap) |
3187 | return substream->ops->mmap(substream, area); | 3219 | err = substream->ops->mmap(substream, area); |
3188 | else | 3220 | else |
3189 | return snd_pcm_default_mmap(substream, area); | 3221 | err = snd_pcm_default_mmap(substream, area); |
3222 | if (!err) | ||
3223 | atomic_inc(&substream->mmap_count); | ||
3224 | return err; | ||
3190 | } | 3225 | } |
3191 | 3226 | ||
3192 | EXPORT_SYMBOL(snd_pcm_mmap_data); | 3227 | EXPORT_SYMBOL(snd_pcm_mmap_data); |
diff --git a/sound/oss/hex2hex.c b/sound/oss/hex2hex.c index 5460faae98c9..041ef5c52bc2 100644 --- a/sound/oss/hex2hex.c +++ b/sound/oss/hex2hex.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #define MAX_SIZE (256*1024) | 12 | #define MAX_SIZE (256*1024) |
13 | unsigned char buf[MAX_SIZE]; | 13 | unsigned char buf[MAX_SIZE]; |
14 | 14 | ||
15 | int loadhex(FILE *inf, unsigned char *buf) | 15 | static int loadhex(FILE *inf, unsigned char *buf) |
16 | { | 16 | { |
17 | int l=0, c, i; | 17 | int l=0, c, i; |
18 | 18 | ||
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 6479e65858d3..905859d4f4df 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -110,6 +110,7 @@ struct conexant_spec { | |||
110 | 110 | ||
111 | unsigned int dell_automute; | 111 | unsigned int dell_automute; |
112 | unsigned int port_d_mode; | 112 | unsigned int port_d_mode; |
113 | unsigned char ext_mic_bias; | ||
113 | }; | 114 | }; |
114 | 115 | ||
115 | static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo, | 116 | static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo, |
@@ -1927,6 +1928,11 @@ static hda_nid_t cxt5066_adc_nids[3] = { 0x14, 0x15, 0x16 }; | |||
1927 | static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 }; | 1928 | static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 }; |
1928 | #define CXT5066_SPDIF_OUT 0x21 | 1929 | #define CXT5066_SPDIF_OUT 0x21 |
1929 | 1930 | ||
1931 | /* OLPC's microphone port is DC coupled for use with external sensors, | ||
1932 | * therefore we use a 50% mic bias in order to center the input signal with | ||
1933 | * the DC input range of the codec. */ | ||
1934 | #define CXT5066_OLPC_EXT_MIC_BIAS PIN_VREF50 | ||
1935 | |||
1930 | static struct hda_channel_mode cxt5066_modes[1] = { | 1936 | static struct hda_channel_mode cxt5066_modes[1] = { |
1931 | { 2, NULL }, | 1937 | { 2, NULL }, |
1932 | }; | 1938 | }; |
@@ -1980,9 +1986,10 @@ static int cxt5066_hp_master_sw_put(struct snd_kcontrol *kcontrol, | |||
1980 | /* toggle input of built-in and mic jack appropriately */ | 1986 | /* toggle input of built-in and mic jack appropriately */ |
1981 | static void cxt5066_automic(struct hda_codec *codec) | 1987 | static void cxt5066_automic(struct hda_codec *codec) |
1982 | { | 1988 | { |
1983 | static struct hda_verb ext_mic_present[] = { | 1989 | struct conexant_spec *spec = codec->spec; |
1990 | struct hda_verb ext_mic_present[] = { | ||
1984 | /* enable external mic, port B */ | 1991 | /* enable external mic, port B */ |
1985 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | 1992 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, spec->ext_mic_bias}, |
1986 | 1993 | ||
1987 | /* switch to external mic input */ | 1994 | /* switch to external mic input */ |
1988 | {0x17, AC_VERB_SET_CONNECT_SEL, 0}, | 1995 | {0x17, AC_VERB_SET_CONNECT_SEL, 0}, |
@@ -2235,7 +2242,7 @@ static struct hda_verb cxt5066_init_verbs_olpc[] = { | |||
2235 | {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */ | 2242 | {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */ |
2236 | 2243 | ||
2237 | /* Port B: external microphone */ | 2244 | /* Port B: external microphone */ |
2238 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | 2245 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, CXT5066_OLPC_EXT_MIC_BIAS}, |
2239 | 2246 | ||
2240 | /* Port C: internal microphone */ | 2247 | /* Port C: internal microphone */ |
2241 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | 2248 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, |
@@ -2353,6 +2360,7 @@ static int patch_cxt5066(struct hda_codec *codec) | |||
2353 | spec->input_mux = &cxt5066_capture_source; | 2360 | spec->input_mux = &cxt5066_capture_source; |
2354 | 2361 | ||
2355 | spec->port_d_mode = PIN_HP; | 2362 | spec->port_d_mode = PIN_HP; |
2363 | spec->ext_mic_bias = PIN_VREF80; | ||
2356 | 2364 | ||
2357 | spec->num_init_verbs = 1; | 2365 | spec->num_init_verbs = 1; |
2358 | spec->init_verbs[0] = cxt5066_init_verbs; | 2366 | spec->init_verbs[0] = cxt5066_init_verbs; |
@@ -2384,6 +2392,7 @@ static int patch_cxt5066(struct hda_codec *codec) | |||
2384 | spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc; | 2392 | spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc; |
2385 | spec->mixers[spec->num_mixers++] = cxt5066_mixers; | 2393 | spec->mixers[spec->num_mixers++] = cxt5066_mixers; |
2386 | spec->port_d_mode = 0; | 2394 | spec->port_d_mode = 0; |
2395 | spec->ext_mic_bias = CXT5066_OLPC_EXT_MIC_BIAS; | ||
2387 | 2396 | ||
2388 | /* no S/PDIF out */ | 2397 | /* no S/PDIF out */ |
2389 | spec->multiout.dig_out_nid = 0; | 2398 | spec->multiout.dig_out_nid = 0; |
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 9fb60276f5c9..6afdab09bab7 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -397,6 +397,7 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec) | |||
397 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | 397 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { |
398 | { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, | 398 | { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, |
399 | { .id = 0x10de0003, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, | 399 | { .id = 0x10de0003, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, |
400 | { .id = 0x10de0005, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, | ||
400 | { .id = 0x10de0006, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, | 401 | { .id = 0x10de0006, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, |
401 | { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi_8ch }, | 402 | { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi_8ch }, |
402 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | 403 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, |
@@ -406,6 +407,7 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | |||
406 | 407 | ||
407 | MODULE_ALIAS("snd-hda-codec-id:10de0002"); | 408 | MODULE_ALIAS("snd-hda-codec-id:10de0002"); |
408 | MODULE_ALIAS("snd-hda-codec-id:10de0003"); | 409 | MODULE_ALIAS("snd-hda-codec-id:10de0003"); |
410 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); | ||
409 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); | 411 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); |
410 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); | 412 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); |
411 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 413 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6edb5ec78ecd..24b07c9b6a8e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4684,9 +4684,9 @@ static int alc880_parse_auto_config(struct hda_codec *codec) | |||
4684 | spec->multiout.dig_out_nid = dig_nid; | 4684 | spec->multiout.dig_out_nid = dig_nid; |
4685 | else { | 4685 | else { |
4686 | spec->multiout.slave_dig_outs = spec->slave_dig_outs; | 4686 | spec->multiout.slave_dig_outs = spec->slave_dig_outs; |
4687 | spec->slave_dig_outs[i - 1] = dig_nid; | 4687 | if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1) |
4688 | if (i == ARRAY_SIZE(spec->slave_dig_outs) - 1) | ||
4689 | break; | 4688 | break; |
4689 | spec->slave_dig_outs[i - 1] = dig_nid; | ||
4690 | } | 4690 | } |
4691 | } | 4691 | } |
4692 | if (spec->autocfg.dig_in_pin) | 4692 | if (spec->autocfg.dig_in_pin) |
@@ -6249,7 +6249,7 @@ static struct snd_pci_quirk alc260_cfg_tbl[] = { | |||
6249 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), | 6249 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), |
6250 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), | 6250 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), |
6251 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), | 6251 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), |
6252 | SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_HP_3013), | 6252 | SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_AUTO), /* no quirk */ |
6253 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), | 6253 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), |
6254 | SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013), | 6254 | SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013), |
6255 | SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_DC7600), | 6255 | SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_DC7600), |
@@ -8911,10 +8911,11 @@ static struct snd_pci_quirk alc882_ssid_cfg_tbl[] = { | |||
8911 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), | 8911 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), |
8912 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), | 8912 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), |
8913 | SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), | 8913 | SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), |
8914 | /* FIXME: HP jack sense seems not working for MBP 5,1, so apparently | 8914 | /* FIXME: HP jack sense seems not working for MBP 5,1 or 5,2, |
8915 | * no perfect solution yet | 8915 | * so apparently no perfect solution yet |
8916 | */ | 8916 | */ |
8917 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC885_MB5), | 8917 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC885_MB5), |
8918 | SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC885_MB5), | ||
8918 | {} /* terminator */ | 8919 | {} /* terminator */ |
8919 | }; | 8920 | }; |
8920 | 8921 | ||
@@ -9813,9 +9814,9 @@ static int alc882_parse_auto_config(struct hda_codec *codec) | |||
9813 | spec->multiout.dig_out_nid = dig_nid; | 9814 | spec->multiout.dig_out_nid = dig_nid; |
9814 | else { | 9815 | else { |
9815 | spec->multiout.slave_dig_outs = spec->slave_dig_outs; | 9816 | spec->multiout.slave_dig_outs = spec->slave_dig_outs; |
9816 | spec->slave_dig_outs[i - 1] = dig_nid; | 9817 | if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1) |
9817 | if (i == ARRAY_SIZE(spec->slave_dig_outs) - 1) | ||
9818 | break; | 9818 | break; |
9819 | spec->slave_dig_outs[i - 1] = dig_nid; | ||
9819 | } | 9820 | } |
9820 | } | 9821 | } |
9821 | if (spec->autocfg.dig_in_pin) | 9822 | if (spec->autocfg.dig_in_pin) |
@@ -11460,6 +11461,8 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
11460 | SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD), | 11461 | SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD), |
11461 | SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ | 11462 | SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ |
11462 | SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), | 11463 | SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), |
11464 | SND_PCI_QUIRK(0x104d, 0x9035, "Sony VAIO VGN-FW170J", ALC262_AUTO), | ||
11465 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony VAIO Type G", ALC262_AUTO), | ||
11463 | SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", | 11466 | SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", |
11464 | ALC262_SONY_ASSAMD), | 11467 | ALC262_SONY_ASSAMD), |
11465 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", | 11468 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index e18a439ba51f..ec25262e59e7 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1590,6 +1590,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { | |||
1590 | "Dell Studio 17", STAC_DELL_M6_DMIC), | 1590 | "Dell Studio 17", STAC_DELL_M6_DMIC), |
1591 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, | 1591 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, |
1592 | "Dell Studio 1555", STAC_DELL_M6_DMIC), | 1592 | "Dell Studio 1555", STAC_DELL_M6_DMIC), |
1593 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02bd, | ||
1594 | "Dell Studio 1557", STAC_DELL_M6_DMIC), | ||
1593 | {} /* terminator */ | 1595 | {} /* terminator */ |
1594 | }; | 1596 | }; |
1595 | 1597 | ||
diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h index 9da2dae64c5b..d063149e7047 100644 --- a/sound/pci/ice1712/ice1712.h +++ b/sound/pci/ice1712/ice1712.h | |||
@@ -382,8 +382,8 @@ struct snd_ice1712 { | |||
382 | #ifdef CONFIG_PM | 382 | #ifdef CONFIG_PM |
383 | int (*pm_suspend)(struct snd_ice1712 *); | 383 | int (*pm_suspend)(struct snd_ice1712 *); |
384 | int (*pm_resume)(struct snd_ice1712 *); | 384 | int (*pm_resume)(struct snd_ice1712 *); |
385 | int pm_suspend_enabled:1; | 385 | unsigned int pm_suspend_enabled:1; |
386 | int pm_saved_is_spdif_master:1; | 386 | unsigned int pm_saved_is_spdif_master:1; |
387 | unsigned int pm_saved_spdif_ctrl; | 387 | unsigned int pm_saved_spdif_ctrl; |
388 | unsigned char pm_saved_spdif_cfg; | 388 | unsigned char pm_saved_spdif_cfg; |
389 | unsigned int pm_saved_route; | 389 | unsigned int pm_saved_route; |
diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c index c75515f5be6f..6a9fee3ee78f 100644 --- a/sound/pci/ice1712/prodigy_hifi.c +++ b/sound/pci/ice1712/prodigy_hifi.c | |||
@@ -1100,7 +1100,7 @@ static void ak4396_init(struct snd_ice1712 *ice) | |||
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | #ifdef CONFIG_PM | 1102 | #ifdef CONFIG_PM |
1103 | static int __devinit prodigy_hd2_resume(struct snd_ice1712 *ice) | 1103 | static int prodigy_hd2_resume(struct snd_ice1712 *ice) |
1104 | { | 1104 | { |
1105 | /* initialize ak4396 codec and restore previous mixer volumes */ | 1105 | /* initialize ak4396 codec and restore previous mixer volumes */ |
1106 | struct prodigy_hifi_spec *spec = ice->spec; | 1106 | struct prodigy_hifi_spec *spec = ice->spec; |
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 35606ae60868..fb6b7dd558f3 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -265,8 +265,8 @@ static const int bosr_usb_divisor_table[] = { | |||
265 | #define UPPER_GROUP ((1<<8) | (1<<9) | (1<<10) | (1<<11) | (1<<15)) | 265 | #define UPPER_GROUP ((1<<8) | (1<<9) | (1<<10) | (1<<11) | (1<<15)) |
266 | static const unsigned short sr_valid_mask[] = { | 266 | static const unsigned short sr_valid_mask[] = { |
267 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/ | 267 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/ |
268 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/ | ||
269 | LOWER_GROUP, /* Usb, bosr - 0*/ | 268 | LOWER_GROUP, /* Usb, bosr - 0*/ |
269 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/ | ||
270 | UPPER_GROUP, /* Usb, bosr - 1*/ | 270 | UPPER_GROUP, /* Usb, bosr - 1*/ |
271 | }; | 271 | }; |
272 | /* | 272 | /* |
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c index 9114c263077b..13aa380de162 100644 --- a/sound/soc/omap/omap3evm.c +++ b/sound/soc/omap/omap3evm.c | |||
@@ -144,4 +144,4 @@ module_exit(omap3evm_soc_exit); | |||
144 | 144 | ||
145 | MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); | 145 | MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); |
146 | MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM"); | 146 | MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM"); |
147 | MODULE_LICENSE("GPLv2"); | 147 | MODULE_LICENSE("GPL v2"); |
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index ad219aaf7cb8..0cd06f5dd356 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c | |||
@@ -134,7 +134,7 @@ static int omap3pandora_hp_event(struct snd_soc_dapm_widget *w, | |||
134 | * |P| <--- TWL4030 <--------- Line In and MICs | 134 | * |P| <--- TWL4030 <--------- Line In and MICs |
135 | */ | 135 | */ |
136 | static const struct snd_soc_dapm_widget omap3pandora_out_dapm_widgets[] = { | 136 | static const struct snd_soc_dapm_widget omap3pandora_out_dapm_widgets[] = { |
137 | SND_SOC_DAPM_DAC("PCM DAC", "Playback", SND_SOC_NOPM, 0, 0), | 137 | SND_SOC_DAPM_DAC("PCM DAC", "HiFi Playback", SND_SOC_NOPM, 0, 0), |
138 | SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM, | 138 | SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM, |
139 | 0, 0, NULL, 0, omap3pandora_hp_event, | 139 | 0, 0, NULL, 0, omap3pandora_hp_event, |
140 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 140 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
@@ -181,6 +181,7 @@ static int omap3pandora_out_init(struct snd_soc_codec *codec) | |||
181 | snd_soc_dapm_nc_pin(codec, "CARKITR"); | 181 | snd_soc_dapm_nc_pin(codec, "CARKITR"); |
182 | snd_soc_dapm_nc_pin(codec, "HFL"); | 182 | snd_soc_dapm_nc_pin(codec, "HFL"); |
183 | snd_soc_dapm_nc_pin(codec, "HFR"); | 183 | snd_soc_dapm_nc_pin(codec, "HFR"); |
184 | snd_soc_dapm_nc_pin(codec, "VIBRA"); | ||
184 | 185 | ||
185 | ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets, | 186 | ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets, |
186 | ARRAY_SIZE(omap3pandora_out_dapm_widgets)); | 187 | ARRAY_SIZE(omap3pandora_out_dapm_widgets)); |
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 9efcfd08d747..c998220b99c6 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c | |||
@@ -1071,6 +1071,15 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, unsig | |||
1071 | channels = (ftr[0] - 7) / csize - 1; | 1071 | channels = (ftr[0] - 7) / csize - 1; |
1072 | 1072 | ||
1073 | master_bits = snd_usb_combine_bytes(ftr + 6, csize); | 1073 | master_bits = snd_usb_combine_bytes(ftr + 6, csize); |
1074 | /* master configuration quirks */ | ||
1075 | switch (state->chip->usb_id) { | ||
1076 | case USB_ID(0x08bb, 0x2702): | ||
1077 | snd_printk(KERN_INFO | ||
1078 | "usbmixer: master volume quirk for PCM2702 chip\n"); | ||
1079 | /* disable non-functional volume control */ | ||
1080 | master_bits &= ~(1 << (USB_FEATURE_VOLUME - 1)); | ||
1081 | break; | ||
1082 | } | ||
1074 | if (channels > 0) | 1083 | if (channels > 0) |
1075 | first_ch_bits = snd_usb_combine_bytes(ftr + 6 + csize, csize); | 1084 | first_ch_bits = snd_usb_combine_bytes(ftr + 6 + csize, csize); |
1076 | else | 1085 | else |