diff options
Diffstat (limited to 'sound')
29 files changed, 143 insertions, 185 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 83b0328d389e..1497dce1b04a 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <sound/pcm_params.h> | 27 | #include <sound/pcm_params.h> |
28 | 28 | ||
29 | #include "aaci.h" | 29 | #include "aaci.h" |
30 | #include "devdma.h" | ||
31 | 30 | ||
32 | #define DRIVER_NAME "aaci-pl041" | 31 | #define DRIVER_NAME "aaci-pl041" |
33 | 32 | ||
@@ -489,7 +488,7 @@ static int aaci_pcm_hw_free(struct snd_pcm_substream *substream) | |||
489 | /* | 488 | /* |
490 | * Clear out the DMA and any allocated buffers. | 489 | * Clear out the DMA and any allocated buffers. |
491 | */ | 490 | */ |
492 | devdma_hw_free(NULL, substream); | 491 | snd_pcm_lib_free_pages(substream); |
493 | 492 | ||
494 | return 0; | 493 | return 0; |
495 | } | 494 | } |
@@ -506,8 +505,8 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, | |||
506 | aacirun->pcm_open = 0; | 505 | aacirun->pcm_open = 0; |
507 | } | 506 | } |
508 | 507 | ||
509 | err = devdma_hw_alloc(NULL, substream, | 508 | err = snd_pcm_lib_malloc_pages(substream, |
510 | params_buffer_bytes(params)); | 509 | params_buffer_bytes(params)); |
511 | if (err < 0) | 510 | if (err < 0) |
512 | goto out; | 511 | goto out; |
513 | 512 | ||
@@ -546,11 +545,6 @@ static snd_pcm_uframes_t aaci_pcm_pointer(struct snd_pcm_substream *substream) | |||
546 | return bytes_to_frames(runtime, bytes); | 545 | return bytes_to_frames(runtime, bytes); |
547 | } | 546 | } |
548 | 547 | ||
549 | static int aaci_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma) | ||
550 | { | ||
551 | return devdma_mmap(NULL, substream, vma); | ||
552 | } | ||
553 | |||
554 | 548 | ||
555 | /* | 549 | /* |
556 | * Playback specific ALSA stuff | 550 | * Playback specific ALSA stuff |
@@ -717,7 +711,6 @@ static struct snd_pcm_ops aaci_playback_ops = { | |||
717 | .prepare = aaci_pcm_prepare, | 711 | .prepare = aaci_pcm_prepare, |
718 | .trigger = aaci_pcm_playback_trigger, | 712 | .trigger = aaci_pcm_playback_trigger, |
719 | .pointer = aaci_pcm_pointer, | 713 | .pointer = aaci_pcm_pointer, |
720 | .mmap = aaci_pcm_mmap, | ||
721 | }; | 714 | }; |
722 | 715 | ||
723 | static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream, | 716 | static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream, |
@@ -845,7 +838,6 @@ static struct snd_pcm_ops aaci_capture_ops = { | |||
845 | .prepare = aaci_pcm_capture_prepare, | 838 | .prepare = aaci_pcm_capture_prepare, |
846 | .trigger = aaci_pcm_capture_trigger, | 839 | .trigger = aaci_pcm_capture_trigger, |
847 | .pointer = aaci_pcm_pointer, | 840 | .pointer = aaci_pcm_pointer, |
848 | .mmap = aaci_pcm_mmap, | ||
849 | }; | 841 | }; |
850 | 842 | ||
851 | /* | 843 | /* |
@@ -1035,6 +1027,8 @@ static int __devinit aaci_init_pcm(struct aaci *aaci) | |||
1035 | 1027 | ||
1036 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); | 1028 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); |
1037 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); | 1029 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); |
1030 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, | ||
1031 | NULL, 0, 64 * 104); | ||
1038 | } | 1032 | } |
1039 | 1033 | ||
1040 | return ret; | 1034 | 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/control.c b/sound/core/control.c index b586019faf3f..268ab7471224 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -75,7 +75,7 @@ static int snd_ctl_open(struct inode *inode, struct file *file) | |||
75 | ctl->card = card; | 75 | ctl->card = card; |
76 | ctl->prefer_pcm_subdevice = -1; | 76 | ctl->prefer_pcm_subdevice = -1; |
77 | ctl->prefer_rawmidi_subdevice = -1; | 77 | ctl->prefer_rawmidi_subdevice = -1; |
78 | ctl->pid = current->pid; | 78 | ctl->pid = get_pid(task_pid(current)); |
79 | file->private_data = ctl; | 79 | file->private_data = ctl; |
80 | write_lock_irqsave(&card->ctl_files_rwlock, flags); | 80 | write_lock_irqsave(&card->ctl_files_rwlock, flags); |
81 | list_add_tail(&ctl->list, &card->ctl_files); | 81 | list_add_tail(&ctl->list, &card->ctl_files); |
@@ -125,6 +125,7 @@ static int snd_ctl_release(struct inode *inode, struct file *file) | |||
125 | control->vd[idx].owner = NULL; | 125 | control->vd[idx].owner = NULL; |
126 | up_write(&card->controls_rwsem); | 126 | up_write(&card->controls_rwsem); |
127 | snd_ctl_empty_read_queue(ctl); | 127 | snd_ctl_empty_read_queue(ctl); |
128 | put_pid(ctl->pid); | ||
128 | kfree(ctl); | 129 | kfree(ctl); |
129 | module_put(card->module); | 130 | module_put(card->module); |
130 | snd_card_file_remove(card, file); | 131 | snd_card_file_remove(card, file); |
@@ -672,7 +673,7 @@ static int snd_ctl_elem_info(struct snd_ctl_file *ctl, | |||
672 | info->access |= SNDRV_CTL_ELEM_ACCESS_LOCK; | 673 | info->access |= SNDRV_CTL_ELEM_ACCESS_LOCK; |
673 | if (vd->owner == ctl) | 674 | if (vd->owner == ctl) |
674 | info->access |= SNDRV_CTL_ELEM_ACCESS_OWNER; | 675 | info->access |= SNDRV_CTL_ELEM_ACCESS_OWNER; |
675 | info->owner = vd->owner_pid; | 676 | info->owner = pid_vnr(vd->owner->pid); |
676 | } else { | 677 | } else { |
677 | info->owner = -1; | 678 | info->owner = -1; |
678 | } | 679 | } |
@@ -827,7 +828,6 @@ static int snd_ctl_elem_lock(struct snd_ctl_file *file, | |||
827 | result = -EBUSY; | 828 | result = -EBUSY; |
828 | else { | 829 | else { |
829 | vd->owner = file; | 830 | vd->owner = file; |
830 | vd->owner_pid = current->pid; | ||
831 | result = 0; | 831 | result = 0; |
832 | } | 832 | } |
833 | } | 833 | } |
@@ -858,7 +858,6 @@ static int snd_ctl_elem_unlock(struct snd_ctl_file *file, | |||
858 | result = -EPERM; | 858 | result = -EPERM; |
859 | else { | 859 | else { |
860 | vd->owner = NULL; | 860 | vd->owner = NULL; |
861 | vd->owner_pid = 0; | ||
862 | result = 0; | 861 | result = 0; |
863 | } | 862 | } |
864 | } | 863 | } |
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 772423889eb3..54e2eb56e4c2 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c | |||
@@ -1251,7 +1251,9 @@ static void snd_mixer_oss_build(struct snd_mixer_oss *mixer) | |||
1251 | { SOUND_MIXER_SYNTH, "FM", 0 }, /* fallback */ | 1251 | { SOUND_MIXER_SYNTH, "FM", 0 }, /* fallback */ |
1252 | { SOUND_MIXER_SYNTH, "Music", 0 }, /* fallback */ | 1252 | { SOUND_MIXER_SYNTH, "Music", 0 }, /* fallback */ |
1253 | { SOUND_MIXER_PCM, "PCM", 0 }, | 1253 | { SOUND_MIXER_PCM, "PCM", 0 }, |
1254 | { SOUND_MIXER_SPEAKER, "PC Speaker", 0 }, | 1254 | { SOUND_MIXER_SPEAKER, "Beep", 0 }, |
1255 | { SOUND_MIXER_SPEAKER, "PC Speaker", 0 }, /* fallback */ | ||
1256 | { SOUND_MIXER_SPEAKER, "Speaker", 0 }, /* fallback */ | ||
1255 | { SOUND_MIXER_LINE, "Line", 0 }, | 1257 | { SOUND_MIXER_LINE, "Line", 0 }, |
1256 | { SOUND_MIXER_MIC, "Mic", 0 }, | 1258 | { SOUND_MIXER_MIC, "Mic", 0 }, |
1257 | { SOUND_MIXER_CD, "CD", 0 }, | 1259 | { SOUND_MIXER_CD, "CD", 0 }, |
diff --git a/sound/core/pcm.c b/sound/core/pcm.c index c69c60b2a48a..6884ae031f6f 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c | |||
@@ -435,6 +435,7 @@ static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry, | |||
435 | return; | 435 | return; |
436 | } | 436 | } |
437 | snd_iprintf(buffer, "state: %s\n", snd_pcm_state_name(status.state)); | 437 | snd_iprintf(buffer, "state: %s\n", snd_pcm_state_name(status.state)); |
438 | snd_iprintf(buffer, "owner_pid : %d\n", pid_vnr(substream->pid)); | ||
438 | snd_iprintf(buffer, "trigger_time: %ld.%09ld\n", | 439 | snd_iprintf(buffer, "trigger_time: %ld.%09ld\n", |
439 | status.trigger_tstamp.tv_sec, status.trigger_tstamp.tv_nsec); | 440 | status.trigger_tstamp.tv_sec, status.trigger_tstamp.tv_nsec); |
440 | snd_iprintf(buffer, "tstamp : %ld.%09ld\n", | 441 | snd_iprintf(buffer, "tstamp : %ld.%09ld\n", |
@@ -809,7 +810,7 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, | |||
809 | card = pcm->card; | 810 | card = pcm->card; |
810 | read_lock(&card->ctl_files_rwlock); | 811 | read_lock(&card->ctl_files_rwlock); |
811 | list_for_each_entry(kctl, &card->ctl_files, list) { | 812 | list_for_each_entry(kctl, &card->ctl_files, list) { |
812 | if (kctl->pid == current->pid) { | 813 | if (kctl->pid == task_pid(current)) { |
813 | prefer_subdevice = kctl->prefer_pcm_subdevice; | 814 | prefer_subdevice = kctl->prefer_pcm_subdevice; |
814 | if (prefer_subdevice != -1) | 815 | if (prefer_subdevice != -1) |
815 | break; | 816 | break; |
@@ -900,6 +901,7 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, | |||
900 | substream->private_data = pcm->private_data; | 901 | substream->private_data = pcm->private_data; |
901 | substream->ref_count = 1; | 902 | substream->ref_count = 1; |
902 | substream->f_flags = file->f_flags; | 903 | substream->f_flags = file->f_flags; |
904 | substream->pid = get_pid(task_pid(current)); | ||
903 | pstr->substream_opened++; | 905 | pstr->substream_opened++; |
904 | *rsubstream = substream; | 906 | *rsubstream = substream; |
905 | return 0; | 907 | return 0; |
@@ -921,6 +923,8 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream) | |||
921 | kfree(runtime->hw_constraints.rules); | 923 | kfree(runtime->hw_constraints.rules); |
922 | kfree(runtime); | 924 | kfree(runtime); |
923 | substream->runtime = NULL; | 925 | substream->runtime = NULL; |
926 | put_pid(substream->pid); | ||
927 | substream->pid = NULL; | ||
924 | substream->pstr->substream_opened--; | 928 | substream->pstr->substream_opened--; |
925 | } | 929 | } |
926 | 930 | ||
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/core/rawmidi.c b/sound/core/rawmidi.c index 70d6f25ba526..2f766123b158 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c | |||
@@ -242,8 +242,6 @@ static int assign_substream(struct snd_rawmidi *rmidi, int subdevice, | |||
242 | return -ENXIO; | 242 | return -ENXIO; |
243 | if (subdevice >= 0 && subdevice >= s->substream_count) | 243 | if (subdevice >= 0 && subdevice >= s->substream_count) |
244 | return -ENODEV; | 244 | return -ENODEV; |
245 | if (s->substream_opened >= s->substream_count) | ||
246 | return -EAGAIN; | ||
247 | 245 | ||
248 | list_for_each_entry(substream, &s->substreams, list) { | 246 | list_for_each_entry(substream, &s->substreams, list) { |
249 | if (substream->opened) { | 247 | if (substream->opened) { |
@@ -280,9 +278,10 @@ static int open_substream(struct snd_rawmidi *rmidi, | |||
280 | substream->active_sensing = 0; | 278 | substream->active_sensing = 0; |
281 | if (mode & SNDRV_RAWMIDI_LFLG_APPEND) | 279 | if (mode & SNDRV_RAWMIDI_LFLG_APPEND) |
282 | substream->append = 1; | 280 | substream->append = 1; |
281 | substream->pid = get_pid(task_pid(current)); | ||
282 | rmidi->streams[substream->stream].substream_opened++; | ||
283 | } | 283 | } |
284 | substream->use_count++; | 284 | substream->use_count++; |
285 | rmidi->streams[substream->stream].substream_opened++; | ||
286 | return 0; | 285 | return 0; |
287 | } | 286 | } |
288 | 287 | ||
@@ -413,7 +412,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file) | |||
413 | subdevice = -1; | 412 | subdevice = -1; |
414 | read_lock(&card->ctl_files_rwlock); | 413 | read_lock(&card->ctl_files_rwlock); |
415 | list_for_each_entry(kctl, &card->ctl_files, list) { | 414 | list_for_each_entry(kctl, &card->ctl_files, list) { |
416 | if (kctl->pid == current->pid) { | 415 | if (kctl->pid == task_pid(current)) { |
417 | subdevice = kctl->prefer_rawmidi_subdevice; | 416 | subdevice = kctl->prefer_rawmidi_subdevice; |
418 | if (subdevice != -1) | 417 | if (subdevice != -1) |
419 | break; | 418 | break; |
@@ -466,7 +465,6 @@ static void close_substream(struct snd_rawmidi *rmidi, | |||
466 | struct snd_rawmidi_substream *substream, | 465 | struct snd_rawmidi_substream *substream, |
467 | int cleanup) | 466 | int cleanup) |
468 | { | 467 | { |
469 | rmidi->streams[substream->stream].substream_opened--; | ||
470 | if (--substream->use_count) | 468 | if (--substream->use_count) |
471 | return; | 469 | return; |
472 | 470 | ||
@@ -491,6 +489,9 @@ static void close_substream(struct snd_rawmidi *rmidi, | |||
491 | snd_rawmidi_runtime_free(substream); | 489 | snd_rawmidi_runtime_free(substream); |
492 | substream->opened = 0; | 490 | substream->opened = 0; |
493 | substream->append = 0; | 491 | substream->append = 0; |
492 | put_pid(substream->pid); | ||
493 | substream->pid = NULL; | ||
494 | rmidi->streams[substream->stream].substream_opened--; | ||
494 | } | 495 | } |
495 | 496 | ||
496 | static void rawmidi_release_priv(struct snd_rawmidi_file *rfile) | 497 | static void rawmidi_release_priv(struct snd_rawmidi_file *rfile) |
@@ -1338,6 +1339,9 @@ static void snd_rawmidi_proc_info_read(struct snd_info_entry *entry, | |||
1338 | substream->number, | 1339 | substream->number, |
1339 | (unsigned long) substream->bytes); | 1340 | (unsigned long) substream->bytes); |
1340 | if (substream->opened) { | 1341 | if (substream->opened) { |
1342 | snd_iprintf(buffer, | ||
1343 | " Owner PID : %d\n", | ||
1344 | pid_vnr(substream->pid)); | ||
1341 | runtime = substream->runtime; | 1345 | runtime = substream->runtime; |
1342 | snd_iprintf(buffer, | 1346 | snd_iprintf(buffer, |
1343 | " Mode : %s\n" | 1347 | " Mode : %s\n" |
@@ -1359,6 +1363,9 @@ static void snd_rawmidi_proc_info_read(struct snd_info_entry *entry, | |||
1359 | substream->number, | 1363 | substream->number, |
1360 | (unsigned long) substream->bytes); | 1364 | (unsigned long) substream->bytes); |
1361 | if (substream->opened) { | 1365 | if (substream->opened) { |
1366 | snd_iprintf(buffer, | ||
1367 | " Owner PID : %d\n", | ||
1368 | pid_vnr(substream->pid)); | ||
1362 | runtime = substream->runtime; | 1369 | runtime = substream->runtime; |
1363 | snd_iprintf(buffer, | 1370 | snd_iprintf(buffer, |
1364 | " Buffer size : %lu\n" | 1371 | " Buffer size : %lu\n" |
diff --git a/sound/drivers/pcsp/pcsp_mixer.c b/sound/drivers/pcsp/pcsp_mixer.c index 02e05552632b..6f633f4f3b96 100644 --- a/sound/drivers/pcsp/pcsp_mixer.c +++ b/sound/drivers/pcsp/pcsp_mixer.c | |||
@@ -125,7 +125,7 @@ static struct snd_kcontrol_new __devinitdata snd_pcsp_controls_pcm[] = { | |||
125 | }; | 125 | }; |
126 | 126 | ||
127 | static struct snd_kcontrol_new __devinitdata snd_pcsp_controls_spkr[] = { | 127 | static struct snd_kcontrol_new __devinitdata snd_pcsp_controls_spkr[] = { |
128 | PCSP_MIXER_CONTROL(pcspkr, "PC Speaker Playback Switch"), | 128 | PCSP_MIXER_CONTROL(pcspkr, "Beep Playback Switch"), |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static int __devinit snd_pcsp_ctls_add(struct snd_pcsp *chip, | 131 | static int __devinit snd_pcsp_ctls_add(struct snd_pcsp *chip, |
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index 02f79d252718..8246aae32ab4 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -237,7 +237,7 @@ WSS_DOUBLE("Wavetable Capture Volume", 0, | |||
237 | CMI8330_WAVGAIN, CMI8330_WAVGAIN, 4, 0, 15, 0), | 237 | CMI8330_WAVGAIN, CMI8330_WAVGAIN, 4, 0, 15, 0), |
238 | WSS_SINGLE("3D Control - Switch", 0, | 238 | WSS_SINGLE("3D Control - Switch", 0, |
239 | CMI8330_RMUX3D, 5, 1, 1), | 239 | CMI8330_RMUX3D, 5, 1, 1), |
240 | WSS_SINGLE("PC Speaker Playback Volume", 0, | 240 | WSS_SINGLE("Beep Playback Volume", 0, |
241 | CMI8330_OUTPUTVOL, 3, 3, 0), | 241 | CMI8330_OUTPUTVOL, 3, 3, 0), |
242 | WSS_DOUBLE("FM Playback Switch", 0, | 242 | WSS_DOUBLE("FM Playback Switch", 0, |
243 | CS4231_AUX2_LEFT_INPUT, CS4231_AUX2_RIGHT_INPUT, 7, 7, 1, 1), | 243 | CS4231_AUX2_LEFT_INPUT, CS4231_AUX2_RIGHT_INPUT, 7, 7, 1, 1), |
@@ -262,7 +262,7 @@ SB_DOUBLE("SB Line Playback Switch", SB_DSP4_OUTPUT_SW, SB_DSP4_OUTPUT_SW, 4, 3, | |||
262 | SB_DOUBLE("SB Line Playback Volume", SB_DSP4_LINE_DEV, (SB_DSP4_LINE_DEV + 1), 3, 3, 31), | 262 | SB_DOUBLE("SB Line Playback Volume", SB_DSP4_LINE_DEV, (SB_DSP4_LINE_DEV + 1), 3, 3, 31), |
263 | SB_SINGLE("SB Mic Playback Switch", SB_DSP4_OUTPUT_SW, 0, 1), | 263 | SB_SINGLE("SB Mic Playback Switch", SB_DSP4_OUTPUT_SW, 0, 1), |
264 | SB_SINGLE("SB Mic Playback Volume", SB_DSP4_MIC_DEV, 3, 31), | 264 | SB_SINGLE("SB Mic Playback Volume", SB_DSP4_MIC_DEV, 3, 31), |
265 | SB_SINGLE("SB PC Speaker Volume", SB_DSP4_SPEAKER_DEV, 6, 3), | 265 | SB_SINGLE("SB Beep Volume", SB_DSP4_SPEAKER_DEV, 6, 3), |
266 | SB_DOUBLE("SB Capture Volume", SB_DSP4_IGAIN_DEV, (SB_DSP4_IGAIN_DEV + 1), 6, 6, 3), | 266 | SB_DOUBLE("SB Capture Volume", SB_DSP4_IGAIN_DEV, (SB_DSP4_IGAIN_DEV + 1), 6, 6, 3), |
267 | SB_DOUBLE("SB Playback Volume", SB_DSP4_OGAIN_DEV, (SB_DSP4_OGAIN_DEV + 1), 6, 6, 3), | 267 | SB_DOUBLE("SB Playback Volume", SB_DSP4_OGAIN_DEV, (SB_DSP4_OGAIN_DEV + 1), 6, 6, 3), |
268 | SB_SINGLE("SB Mic Auto Gain", SB_DSP4_MIC_AGC, 0, 1), | 268 | SB_SINGLE("SB Mic Auto Gain", SB_DSP4_MIC_AGC, 0, 1), |
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 4c6e14f87f2d..c76bb00c9d15 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c | |||
@@ -982,7 +982,7 @@ ES1688_DOUBLE("CD Playback Volume", 0, ES1688_CD_DEV, ES1688_CD_DEV, 4, 0, 15, 0 | |||
982 | ES1688_DOUBLE("FM Playback Volume", 0, ES1688_FM_DEV, ES1688_FM_DEV, 4, 0, 15, 0), | 982 | ES1688_DOUBLE("FM Playback Volume", 0, ES1688_FM_DEV, ES1688_FM_DEV, 4, 0, 15, 0), |
983 | ES1688_DOUBLE("Mic Playback Volume", 0, ES1688_MIC_DEV, ES1688_MIC_DEV, 4, 0, 15, 0), | 983 | ES1688_DOUBLE("Mic Playback Volume", 0, ES1688_MIC_DEV, ES1688_MIC_DEV, 4, 0, 15, 0), |
984 | ES1688_DOUBLE("Aux Playback Volume", 0, ES1688_AUX_DEV, ES1688_AUX_DEV, 4, 0, 15, 0), | 984 | ES1688_DOUBLE("Aux Playback Volume", 0, ES1688_AUX_DEV, ES1688_AUX_DEV, 4, 0, 15, 0), |
985 | ES1688_SINGLE("PC Speaker Playback Volume", 0, ES1688_SPEAKER_DEV, 0, 7, 0), | 985 | ES1688_SINGLE("Beep Playback Volume", 0, ES1688_SPEAKER_DEV, 0, 7, 0), |
986 | ES1688_DOUBLE("Capture Volume", 0, ES1688_RECLEV_DEV, ES1688_RECLEV_DEV, 4, 0, 15, 0), | 986 | ES1688_DOUBLE("Capture Volume", 0, ES1688_RECLEV_DEV, ES1688_RECLEV_DEV, 4, 0, 15, 0), |
987 | ES1688_SINGLE("Capture Switch", 0, ES1688_REC_DEV, 4, 1, 1), | 987 | ES1688_SINGLE("Capture Switch", 0, ES1688_REC_DEV, 4, 1, 1), |
988 | { | 988 | { |
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 06e871e66c97..9a43baae7250 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c | |||
@@ -1302,7 +1302,7 @@ ES18XX_DOUBLE("Aux Capture Volume", 0, 0x6c, 0x6c, 4, 0, 15, 0) | |||
1302 | * The chipset specific mixer controls | 1302 | * The chipset specific mixer controls |
1303 | */ | 1303 | */ |
1304 | static struct snd_kcontrol_new snd_es18xx_opt_speaker = | 1304 | static struct snd_kcontrol_new snd_es18xx_opt_speaker = |
1305 | ES18XX_SINGLE("PC Speaker Playback Volume", 0, 0x3c, 0, 7, 0); | 1305 | ES18XX_SINGLE("Beep Playback Volume", 0, 0x3c, 0, 7, 0); |
1306 | 1306 | ||
1307 | static struct snd_kcontrol_new snd_es18xx_opt_1869[] = { | 1307 | static struct snd_kcontrol_new snd_es18xx_opt_1869[] = { |
1308 | ES18XX_SINGLE("Capture Switch", 0, 0x1c, 4, 1, 1), | 1308 | ES18XX_SINGLE("Capture Switch", 0, 0x1c, 4, 1, 1), |
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c index 475220bbcc96..318ff0c823e7 100644 --- a/sound/isa/sb/sb_mixer.c +++ b/sound/isa/sb/sb_mixer.c | |||
@@ -631,7 +631,7 @@ static struct sbmix_elem snd_sb16_ctl_mic_play_switch = | |||
631 | static struct sbmix_elem snd_sb16_ctl_mic_play_vol = | 631 | static struct sbmix_elem snd_sb16_ctl_mic_play_vol = |
632 | SB_SINGLE("Mic Playback Volume", SB_DSP4_MIC_DEV, 3, 31); | 632 | SB_SINGLE("Mic Playback Volume", SB_DSP4_MIC_DEV, 3, 31); |
633 | static struct sbmix_elem snd_sb16_ctl_pc_speaker_vol = | 633 | static struct sbmix_elem snd_sb16_ctl_pc_speaker_vol = |
634 | SB_SINGLE("PC Speaker Volume", SB_DSP4_SPEAKER_DEV, 6, 3); | 634 | SB_SINGLE("Beep Volume", SB_DSP4_SPEAKER_DEV, 6, 3); |
635 | static struct sbmix_elem snd_sb16_ctl_capture_vol = | 635 | static struct sbmix_elem snd_sb16_ctl_capture_vol = |
636 | SB_DOUBLE("Capture Volume", SB_DSP4_IGAIN_DEV, (SB_DSP4_IGAIN_DEV + 1), 6, 6, 3); | 636 | SB_DOUBLE("Capture Volume", SB_DSP4_IGAIN_DEV, (SB_DSP4_IGAIN_DEV + 1), 6, 6, 3); |
637 | static struct sbmix_elem snd_sb16_ctl_play_vol = | 637 | static struct sbmix_elem snd_sb16_ctl_play_vol = |
@@ -689,7 +689,7 @@ static struct sbmix_elem snd_dt019x_ctl_cd_play_vol = | |||
689 | static struct sbmix_elem snd_dt019x_ctl_mic_play_vol = | 689 | static struct sbmix_elem snd_dt019x_ctl_mic_play_vol = |
690 | SB_SINGLE("Mic Playback Volume", SB_DT019X_MIC_DEV, 4, 7); | 690 | SB_SINGLE("Mic Playback Volume", SB_DT019X_MIC_DEV, 4, 7); |
691 | static struct sbmix_elem snd_dt019x_ctl_pc_speaker_vol = | 691 | static struct sbmix_elem snd_dt019x_ctl_pc_speaker_vol = |
692 | SB_SINGLE("PC Speaker Volume", SB_DT019X_SPKR_DEV, 0, 7); | 692 | SB_SINGLE("Beep Volume", SB_DT019X_SPKR_DEV, 0, 7); |
693 | static struct sbmix_elem snd_dt019x_ctl_line_play_vol = | 693 | static struct sbmix_elem snd_dt019x_ctl_line_play_vol = |
694 | SB_DOUBLE("Line Playback Volume", SB_DT019X_LINE_DEV, SB_DT019X_LINE_DEV, 4,0, 15); | 694 | SB_DOUBLE("Line Playback Volume", SB_DT019X_LINE_DEV, SB_DT019X_LINE_DEV, 4,0, 15); |
695 | static struct sbmix_elem snd_dt019x_ctl_pcm_play_switch = | 695 | static struct sbmix_elem snd_dt019x_ctl_pcm_play_switch = |
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/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 78288dbfc17a..20cb60afb200 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -603,8 +603,8 @@ AC97_SINGLE("Tone Control - Treble", AC97_MASTER_TONE, 0, 15, 1) | |||
603 | }; | 603 | }; |
604 | 604 | ||
605 | static const struct snd_kcontrol_new snd_ac97_controls_pc_beep[2] = { | 605 | static const struct snd_kcontrol_new snd_ac97_controls_pc_beep[2] = { |
606 | AC97_SINGLE("PC Speaker Playback Switch", AC97_PC_BEEP, 15, 1, 1), | 606 | AC97_SINGLE("Beep Playback Switch", AC97_PC_BEEP, 15, 1, 1), |
607 | AC97_SINGLE("PC Speaker Playback Volume", AC97_PC_BEEP, 1, 15, 1) | 607 | AC97_SINGLE("Beep Playback Volume", AC97_PC_BEEP, 1, 15, 1) |
608 | }; | 608 | }; |
609 | 609 | ||
610 | static const struct snd_kcontrol_new snd_ac97_controls_mic_boost = | 610 | static const struct snd_kcontrol_new snd_ac97_controls_mic_boost = |
@@ -1393,7 +1393,7 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) | |||
1393 | } | 1393 | } |
1394 | } | 1394 | } |
1395 | 1395 | ||
1396 | /* build PC Speaker controls */ | 1396 | /* build Beep controls */ |
1397 | if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && | 1397 | if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && |
1398 | ((ac97->flags & AC97_HAS_PC_BEEP) || | 1398 | ((ac97->flags & AC97_HAS_PC_BEEP) || |
1399 | snd_ac97_try_volume_mix(ac97, AC97_PC_BEEP))) { | 1399 | snd_ac97_try_volume_mix(ac97, AC97_PC_BEEP))) { |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 7337abdbe4e3..139cf3b2b9d7 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -800,12 +800,12 @@ AC97_SINGLE("Mono Switch", AC97_MASTER_TONE, 7, 1, 1), | |||
800 | AC97_SINGLE("Mono ZC Switch", AC97_MASTER_TONE, 6, 1, 0), | 800 | AC97_SINGLE("Mono ZC Switch", AC97_MASTER_TONE, 6, 1, 0), |
801 | AC97_SINGLE("Mono Volume", AC97_MASTER_TONE, 0, 31, 1), | 801 | AC97_SINGLE("Mono Volume", AC97_MASTER_TONE, 0, 31, 1), |
802 | 802 | ||
803 | AC97_SINGLE("PC Beep to Headphone Switch", AC97_AUX, 15, 1, 1), | 803 | AC97_SINGLE("Beep to Headphone Switch", AC97_AUX, 15, 1, 1), |
804 | AC97_SINGLE("PC Beep to Headphone Volume", AC97_AUX, 12, 7, 1), | 804 | AC97_SINGLE("Beep to Headphone Volume", AC97_AUX, 12, 7, 1), |
805 | AC97_SINGLE("PC Beep to Master Switch", AC97_AUX, 11, 1, 1), | 805 | AC97_SINGLE("Beep to Master Switch", AC97_AUX, 11, 1, 1), |
806 | AC97_SINGLE("PC Beep to Master Volume", AC97_AUX, 8, 7, 1), | 806 | AC97_SINGLE("Beep to Master Volume", AC97_AUX, 8, 7, 1), |
807 | AC97_SINGLE("PC Beep to Mono Switch", AC97_AUX, 7, 1, 1), | 807 | AC97_SINGLE("Beep to Mono Switch", AC97_AUX, 7, 1, 1), |
808 | AC97_SINGLE("PC Beep to Mono Volume", AC97_AUX, 4, 7, 1), | 808 | AC97_SINGLE("Beep to Mono Volume", AC97_AUX, 4, 7, 1), |
809 | 809 | ||
810 | AC97_SINGLE("Voice to Headphone Switch", AC97_PCM, 15, 1, 1), | 810 | AC97_SINGLE("Voice to Headphone Switch", AC97_PCM, 15, 1, 1), |
811 | AC97_SINGLE("Voice to Headphone Volume", AC97_PCM, 12, 7, 1), | 811 | AC97_SINGLE("Voice to Headphone Volume", AC97_PCM, 12, 7, 1), |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 8451a0169f32..69867ace7860 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -830,8 +830,8 @@ static struct snd_kcontrol_new snd_azf3328_mixer_controls[] __devinitdata = { | |||
830 | AZF3328_MIXER_SWITCH("Mic Boost (+20dB)", IDX_MIXER_MIC, 6, 0), | 830 | AZF3328_MIXER_SWITCH("Mic Boost (+20dB)", IDX_MIXER_MIC, 6, 0), |
831 | AZF3328_MIXER_SWITCH("Line Playback Switch", IDX_MIXER_LINEIN, 15, 1), | 831 | AZF3328_MIXER_SWITCH("Line Playback Switch", IDX_MIXER_LINEIN, 15, 1), |
832 | AZF3328_MIXER_VOL_STEREO("Line Playback Volume", IDX_MIXER_LINEIN, 0x1f, 1), | 832 | AZF3328_MIXER_VOL_STEREO("Line Playback Volume", IDX_MIXER_LINEIN, 0x1f, 1), |
833 | AZF3328_MIXER_SWITCH("PC Speaker Playback Switch", IDX_MIXER_PCBEEP, 15, 1), | 833 | AZF3328_MIXER_SWITCH("Beep Playback Switch", IDX_MIXER_PCBEEP, 15, 1), |
834 | AZF3328_MIXER_VOL_SPECIAL("PC Speaker Playback Volume", IDX_MIXER_PCBEEP, 0x0f, 1, 1), | 834 | AZF3328_MIXER_VOL_SPECIAL("Beep Playback Volume", IDX_MIXER_PCBEEP, 0x0f, 1, 1), |
835 | AZF3328_MIXER_SWITCH("Video Playback Switch", IDX_MIXER_VIDEO, 15, 1), | 835 | AZF3328_MIXER_SWITCH("Video Playback Switch", IDX_MIXER_VIDEO, 15, 1), |
836 | AZF3328_MIXER_VOL_STEREO("Video Playback Volume", IDX_MIXER_VIDEO, 0x1f, 1), | 836 | AZF3328_MIXER_VOL_STEREO("Video Playback Volume", IDX_MIXER_VIDEO, 0x1f, 1), |
837 | AZF3328_MIXER_SWITCH("Aux Playback Switch", IDX_MIXER_AUX, 15, 1), | 837 | AZF3328_MIXER_SWITCH("Aux Playback Switch", IDX_MIXER_AUX, 15, 1), |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index c8c6f437f5b3..8f443a9d61ec 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -792,8 +792,8 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu) | |||
792 | "Phone Playback Volume", | 792 | "Phone Playback Volume", |
793 | "Video Playback Switch", | 793 | "Video Playback Switch", |
794 | "Video Playback Volume", | 794 | "Video Playback Volume", |
795 | "PC Speaker Playback Switch", | 795 | "Beep Playback Switch", |
796 | "PC Speaker Playback Volume", | 796 | "Beep Playback Volume", |
797 | "Mono Output Select", | 797 | "Mono Output Select", |
798 | "Capture Source", | 798 | "Capture Source", |
799 | "Capture Switch", | 799 | "Capture Switch", |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index ddcd4a9fd7e6..a312bae08f52 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2302,7 +2302,7 @@ static struct snd_kcontrol_new snd_cmipci_mixers[] __devinitdata = { | |||
2302 | CMIPCI_SB_VOL_MONO("Mic Playback Volume", SB_DSP4_MIC_DEV, 3, 31), | 2302 | CMIPCI_SB_VOL_MONO("Mic Playback Volume", SB_DSP4_MIC_DEV, 3, 31), |
2303 | CMIPCI_SB_SW_MONO("Mic Playback Switch", 0), | 2303 | CMIPCI_SB_SW_MONO("Mic Playback Switch", 0), |
2304 | CMIPCI_DOUBLE("Mic Capture Switch", SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, 0, 0, 1, 0, 0), | 2304 | CMIPCI_DOUBLE("Mic Capture Switch", SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, 0, 0, 1, 0, 0), |
2305 | CMIPCI_SB_VOL_MONO("PC Speaker Playback Volume", SB_DSP4_SPEAKER_DEV, 6, 3), | 2305 | CMIPCI_SB_VOL_MONO("Beep Playback Volume", SB_DSP4_SPEAKER_DEV, 6, 3), |
2306 | CMIPCI_MIXER_VOL_STEREO("Aux Playback Volume", CM_REG_AUX_VOL, 4, 0, 15), | 2306 | CMIPCI_MIXER_VOL_STEREO("Aux Playback Volume", CM_REG_AUX_VOL, 4, 0, 15), |
2307 | CMIPCI_MIXER_SW_STEREO("Aux Playback Switch", CM_REG_MIXER2, CM_VAUXLM_SHIFT, CM_VAUXRM_SHIFT, 0), | 2307 | CMIPCI_MIXER_SW_STEREO("Aux Playback Switch", CM_REG_MIXER2, CM_VAUXLM_SHIFT, CM_VAUXRM_SHIFT, 0), |
2308 | CMIPCI_MIXER_SW_STEREO("Aux Capture Switch", CM_REG_MIXER2, CM_RAUXLEN_SHIFT, CM_RAUXREN_SHIFT, 0), | 2308 | CMIPCI_MIXER_SW_STEREO("Aux Capture Switch", CM_REG_MIXER2, CM_RAUXLEN_SHIFT, CM_RAUXREN_SHIFT, 0), |
@@ -2310,7 +2310,7 @@ static struct snd_kcontrol_new snd_cmipci_mixers[] __devinitdata = { | |||
2310 | CMIPCI_MIXER_VOL_MONO("Mic Capture Volume", CM_REG_MIXER2, CM_VADMIC_SHIFT, 7), | 2310 | CMIPCI_MIXER_VOL_MONO("Mic Capture Volume", CM_REG_MIXER2, CM_VADMIC_SHIFT, 7), |
2311 | CMIPCI_SB_VOL_MONO("Phone Playback Volume", CM_REG_EXTENT_IND, 5, 7), | 2311 | CMIPCI_SB_VOL_MONO("Phone Playback Volume", CM_REG_EXTENT_IND, 5, 7), |
2312 | CMIPCI_DOUBLE("Phone Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 4, 4, 1, 0, 0), | 2312 | CMIPCI_DOUBLE("Phone Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 4, 4, 1, 0, 0), |
2313 | CMIPCI_DOUBLE("PC Speaker Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 3, 3, 1, 0, 0), | 2313 | CMIPCI_DOUBLE("Beep Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 3, 3, 1, 0, 0), |
2314 | CMIPCI_DOUBLE("Mic Boost Capture Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 0, 0, 1, 0, 0), | 2314 | CMIPCI_DOUBLE("Mic Boost Capture Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 0, 0, 1, 0, 0), |
2315 | }; | 2315 | }; |
2316 | 2316 | ||
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index b0fb6c917c38..05afe06e353a 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c | |||
@@ -1818,8 +1818,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, | |||
1818 | "Master Playback Switch", "Master Capture Switch", | 1818 | "Master Playback Switch", "Master Capture Switch", |
1819 | "Master Playback Volume", "Master Capture Volume", | 1819 | "Master Playback Volume", "Master Capture Volume", |
1820 | "Wave Master Playback Volume", "Master Playback Volume", | 1820 | "Wave Master Playback Volume", "Master Playback Volume", |
1821 | "PC Speaker Playback Switch", "PC Speaker Capture Switch", | 1821 | "Beep Playback Switch", "Beep Capture Switch", |
1822 | "PC Speaker Playback Volume", "PC Speaker Capture Volume", | 1822 | "Beep Playback Volume", "Beep Capture Volume", |
1823 | "Phone Playback Switch", "Phone Capture Switch", | 1823 | "Phone Playback Switch", "Phone Capture Switch", |
1824 | "Phone Playback Volume", "Phone Capture Volume", | 1824 | "Phone Playback Volume", "Phone Capture Volume", |
1825 | "Mic Playback Switch", "Mic Capture Switch", | 1825 | "Mic Playback Switch", "Mic Capture Switch", |
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index 820318ee62c1..fb83e1ffa5cb 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -1387,7 +1387,7 @@ ES1938_DOUBLE_TLV("Aux Playback Volume", 0, 0x3a, 0x3a, 4, 0, 15, 0, | |||
1387 | db_scale_line), | 1387 | db_scale_line), |
1388 | ES1938_DOUBLE_TLV("Capture Volume", 0, 0xb4, 0xb4, 4, 0, 15, 0, | 1388 | ES1938_DOUBLE_TLV("Capture Volume", 0, 0xb4, 0xb4, 4, 0, 15, 0, |
1389 | db_scale_capture), | 1389 | db_scale_capture), |
1390 | ES1938_SINGLE("PC Speaker Volume", 0, 0x3c, 0, 7, 0), | 1390 | ES1938_SINGLE("Beep Volume", 0, 0x3c, 0, 7, 0), |
1391 | ES1938_SINGLE("Record Monitor", 0, 0xa8, 3, 1, 0), | 1391 | ES1938_SINGLE("Record Monitor", 0, 0xa8, 3, 1, 0), |
1392 | ES1938_SINGLE("Capture Switch", 0, 0x1c, 4, 1, 1), | 1392 | ES1938_SINGLE("Capture Switch", 0, 0x1c, 4, 1, 1), |
1393 | { | 1393 | { |
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c index 780e1a72114a..85c81feb10cf 100644 --- a/sound/pci/hda/patch_cmedia.c +++ b/sound/pci/hda/patch_cmedia.c | |||
@@ -197,8 +197,8 @@ static struct snd_kcontrol_new cmi9880_basic_mixer[] = { | |||
197 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0, HDA_INPUT), | 197 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0, HDA_INPUT), |
198 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0, HDA_INPUT), | 198 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0, HDA_INPUT), |
199 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0, HDA_INPUT), | 199 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0, HDA_INPUT), |
200 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x23, 0, HDA_OUTPUT), | 200 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x23, 0, HDA_OUTPUT), |
201 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x23, 0, HDA_OUTPUT), | 201 | HDA_CODEC_MUTE("Beep Playback Switch", 0x23, 0, HDA_OUTPUT), |
202 | { } /* end */ | 202 | { } /* end */ |
203 | }; | 203 | }; |
204 | 204 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 70583719282b..24b07c9b6a8e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -7336,8 +7336,8 @@ static struct snd_kcontrol_new alc882_macpro_mixer[] = { | |||
7336 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), | 7336 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), |
7337 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), | 7337 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), |
7338 | /* FIXME: this looks suspicious... | 7338 | /* FIXME: this looks suspicious... |
7339 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x02, HDA_INPUT), | 7339 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x02, HDA_INPUT), |
7340 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x02, HDA_INPUT), | 7340 | HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x02, HDA_INPUT), |
7341 | */ | 7341 | */ |
7342 | { } /* end */ | 7342 | { } /* end */ |
7343 | }; | 7343 | }; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 86de305fc9f2..ec25262e59e7 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -3226,7 +3226,7 @@ static int stac92xx_auto_create_beep_ctls(struct hda_codec *codec, | |||
3226 | /* check for mute support for the the amp */ | 3226 | /* check for mute support for the the amp */ |
3227 | if ((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT) { | 3227 | if ((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT) { |
3228 | err = stac92xx_add_control(spec, STAC_CTL_WIDGET_MUTE, | 3228 | err = stac92xx_add_control(spec, STAC_CTL_WIDGET_MUTE, |
3229 | "PC Beep Playback Switch", | 3229 | "Beep Playback Switch", |
3230 | HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT)); | 3230 | HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT)); |
3231 | if (err < 0) | 3231 | if (err < 0) |
3232 | return err; | 3232 | return err; |
@@ -3235,7 +3235,7 @@ static int stac92xx_auto_create_beep_ctls(struct hda_codec *codec, | |||
3235 | /* check to see if there is volume support for the amp */ | 3235 | /* check to see if there is volume support for the amp */ |
3236 | if ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) { | 3236 | if ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) { |
3237 | err = stac92xx_add_control(spec, STAC_CTL_WIDGET_VOL, | 3237 | err = stac92xx_add_control(spec, STAC_CTL_WIDGET_VOL, |
3238 | "PC Beep Playback Volume", | 3238 | "Beep Playback Volume", |
3239 | HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT)); | 3239 | HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT)); |
3240 | if (err < 0) | 3240 | if (err < 0) |
3241 | return err; | 3241 | return err; |
@@ -3276,7 +3276,7 @@ static struct snd_kcontrol_new stac92xx_dig_beep_ctrl = { | |||
3276 | static int stac92xx_beep_switch_ctl(struct hda_codec *codec) | 3276 | static int stac92xx_beep_switch_ctl(struct hda_codec *codec) |
3277 | { | 3277 | { |
3278 | return stac92xx_add_control_temp(codec->spec, &stac92xx_dig_beep_ctrl, | 3278 | return stac92xx_add_control_temp(codec->spec, &stac92xx_dig_beep_ctrl, |
3279 | 0, "PC Beep Playback Switch", 0); | 3279 | 0, "Beep Playback Switch", 0); |
3280 | } | 3280 | } |
3281 | #endif | 3281 | #endif |
3282 | 3282 | ||
diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c index 2cc0eda4f20e..2e156467b814 100644 --- a/sound/ppc/awacs.c +++ b/sound/ppc/awacs.c | |||
@@ -479,7 +479,7 @@ static int snd_pmac_awacs_put_master_amp(struct snd_kcontrol *kcontrol, | |||
479 | 479 | ||
480 | static struct snd_kcontrol_new snd_pmac_awacs_amp_vol[] __devinitdata = { | 480 | static struct snd_kcontrol_new snd_pmac_awacs_amp_vol[] __devinitdata = { |
481 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 481 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
482 | .name = "PC Speaker Playback Volume", | 482 | .name = "Speaker Playback Volume", |
483 | .info = snd_pmac_awacs_info_volume_amp, | 483 | .info = snd_pmac_awacs_info_volume_amp, |
484 | .get = snd_pmac_awacs_get_volume_amp, | 484 | .get = snd_pmac_awacs_get_volume_amp, |
485 | .put = snd_pmac_awacs_put_volume_amp, | 485 | .put = snd_pmac_awacs_put_volume_amp, |
@@ -525,7 +525,7 @@ static struct snd_kcontrol_new snd_pmac_awacs_amp_hp_sw __devinitdata = { | |||
525 | 525 | ||
526 | static struct snd_kcontrol_new snd_pmac_awacs_amp_spk_sw __devinitdata = { | 526 | static struct snd_kcontrol_new snd_pmac_awacs_amp_spk_sw __devinitdata = { |
527 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 527 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
528 | .name = "PC Speaker Playback Switch", | 528 | .name = "Speaker Playback Switch", |
529 | .info = snd_pmac_boolean_stereo_info, | 529 | .info = snd_pmac_boolean_stereo_info, |
530 | .get = snd_pmac_awacs_get_switch_amp, | 530 | .get = snd_pmac_awacs_get_switch_amp, |
531 | .put = snd_pmac_awacs_put_switch_amp, | 531 | .put = snd_pmac_awacs_put_switch_amp, |
@@ -696,17 +696,17 @@ static struct snd_kcontrol_new snd_pmac_screamer_mic_boost_imac[] __devinitdata | |||
696 | }; | 696 | }; |
697 | 697 | ||
698 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_vol[] __devinitdata = { | 698 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_vol[] __devinitdata = { |
699 | AWACS_VOLUME("PC Speaker Playback Volume", 4, 6, 1), | 699 | AWACS_VOLUME("Speaker Playback Volume", 4, 6, 1), |
700 | }; | 700 | }; |
701 | 701 | ||
702 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw __devinitdata = | 702 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw __devinitdata = |
703 | AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_SPKMUTE, 1); | 703 | AWACS_SWITCH("Speaker Playback Switch", 1, SHIFT_SPKMUTE, 1); |
704 | 704 | ||
705 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac1 __devinitdata = | 705 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac1 __devinitdata = |
706 | AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_PAROUT1, 1); | 706 | AWACS_SWITCH("Speaker Playback Switch", 1, SHIFT_PAROUT1, 1); |
707 | 707 | ||
708 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac2 __devinitdata = | 708 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac2 __devinitdata = |
709 | AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_PAROUT1, 0); | 709 | AWACS_SWITCH("Speaker Playback Switch", 1, SHIFT_PAROUT1, 0); |
710 | 710 | ||
711 | 711 | ||
712 | /* | 712 | /* |
diff --git a/sound/ppc/burgundy.c b/sound/ppc/burgundy.c index 16ed240e423c..0accfe49735b 100644 --- a/sound/ppc/burgundy.c +++ b/sound/ppc/burgundy.c | |||
@@ -505,7 +505,7 @@ static struct snd_kcontrol_new snd_pmac_burgundy_mixers_imac[] __devinitdata = { | |||
505 | MASK_ADDR_BURGUNDY_GAINLINE, 1, 0), | 505 | MASK_ADDR_BURGUNDY_GAINLINE, 1, 0), |
506 | BURGUNDY_VOLUME_B("Mic Gain Capture Volume", 0, | 506 | BURGUNDY_VOLUME_B("Mic Gain Capture Volume", 0, |
507 | MASK_ADDR_BURGUNDY_GAINMIC, 1, 0), | 507 | MASK_ADDR_BURGUNDY_GAINMIC, 1, 0), |
508 | BURGUNDY_VOLUME_B("PC Speaker Playback Volume", 0, | 508 | BURGUNDY_VOLUME_B("Speaker Playback Volume", 0, |
509 | MASK_ADDR_BURGUNDY_ATTENSPEAKER, 1, 1), | 509 | MASK_ADDR_BURGUNDY_ATTENSPEAKER, 1, 1), |
510 | BURGUNDY_VOLUME_B("Line out Playback Volume", 0, | 510 | BURGUNDY_VOLUME_B("Line out Playback Volume", 0, |
511 | MASK_ADDR_BURGUNDY_ATTENLINEOUT, 1, 1), | 511 | MASK_ADDR_BURGUNDY_ATTENLINEOUT, 1, 1), |
@@ -527,7 +527,7 @@ static struct snd_kcontrol_new snd_pmac_burgundy_mixers_pmac[] __devinitdata = { | |||
527 | MASK_ADDR_BURGUNDY_VOLMIC, 16), | 527 | MASK_ADDR_BURGUNDY_VOLMIC, 16), |
528 | BURGUNDY_VOLUME_B("Line in Gain Capture Volume", 0, | 528 | BURGUNDY_VOLUME_B("Line in Gain Capture Volume", 0, |
529 | MASK_ADDR_BURGUNDY_GAINMIC, 1, 0), | 529 | MASK_ADDR_BURGUNDY_GAINMIC, 1, 0), |
530 | BURGUNDY_VOLUME_B("PC Speaker Playback Volume", 0, | 530 | BURGUNDY_VOLUME_B("Speaker Playback Volume", 0, |
531 | MASK_ADDR_BURGUNDY_ATTENMONO, 0, 1), | 531 | MASK_ADDR_BURGUNDY_ATTENMONO, 0, 1), |
532 | BURGUNDY_VOLUME_B("Line out Playback Volume", 0, | 532 | BURGUNDY_VOLUME_B("Line out Playback Volume", 0, |
533 | MASK_ADDR_BURGUNDY_ATTENSPEAKER, 1, 1), | 533 | MASK_ADDR_BURGUNDY_ATTENSPEAKER, 1, 1), |
@@ -549,11 +549,11 @@ BURGUNDY_SWITCH_B("Master Playback Switch", 0, | |||
549 | BURGUNDY_OUTPUT_INTERN | 549 | BURGUNDY_OUTPUT_INTERN |
550 | | BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1); | 550 | | BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1); |
551 | static struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_imac __devinitdata = | 551 | static struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_imac __devinitdata = |
552 | BURGUNDY_SWITCH_B("PC Speaker Playback Switch", 0, | 552 | BURGUNDY_SWITCH_B("Speaker Playback Switch", 0, |
553 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, | 553 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
554 | BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1); | 554 | BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1); |
555 | static struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_pmac __devinitdata = | 555 | static struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_pmac __devinitdata = |
556 | BURGUNDY_SWITCH_B("PC Speaker Playback Switch", 0, | 556 | BURGUNDY_SWITCH_B("Speaker Playback Switch", 0, |
557 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, | 557 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
558 | BURGUNDY_OUTPUT_INTERN, 0, 0); | 558 | BURGUNDY_OUTPUT_INTERN, 0, 0); |
559 | static struct snd_kcontrol_new snd_pmac_burgundy_line_sw_imac __devinitdata = | 559 | static struct snd_kcontrol_new snd_pmac_burgundy_line_sw_imac __devinitdata = |
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index 08e584d1453a..789f44f4ac78 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c | |||
@@ -905,7 +905,7 @@ static struct snd_kcontrol_new tumbler_hp_sw __devinitdata = { | |||
905 | }; | 905 | }; |
906 | static struct snd_kcontrol_new tumbler_speaker_sw __devinitdata = { | 906 | static struct snd_kcontrol_new tumbler_speaker_sw __devinitdata = { |
907 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 907 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
908 | .name = "PC Speaker Playback Switch", | 908 | .name = "Speaker Playback Switch", |
909 | .info = snd_pmac_boolean_mono_info, | 909 | .info = snd_pmac_boolean_mono_info, |
910 | .get = tumbler_get_mute_switch, | 910 | .get = tumbler_get_mute_switch, |
911 | .put = tumbler_put_mute_switch, | 911 | .put = tumbler_put_mute_switch, |
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index abed37acf787..60e360b10468 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
@@ -165,9 +165,9 @@ SOC_SINGLE("Mono Playback Switch", AC97_MASTER_TONE, 7, 1, 1), | |||
165 | SOC_SINGLE("Mono Playback ZC Switch", AC97_MASTER_TONE, 6, 1, 0), | 165 | SOC_SINGLE("Mono Playback ZC Switch", AC97_MASTER_TONE, 6, 1, 0), |
166 | SOC_SINGLE("Mono Playback Volume", AC97_MASTER_TONE, 0, 31, 1), | 166 | SOC_SINGLE("Mono Playback Volume", AC97_MASTER_TONE, 0, 31, 1), |
167 | 167 | ||
168 | SOC_SINGLE("PC Beep Playback Headphone Volume", AC97_AUX, 12, 7, 1), | 168 | SOC_SINGLE("Beep Playback Headphone Volume", AC97_AUX, 12, 7, 1), |
169 | SOC_SINGLE("PC Beep Playback Speaker Volume", AC97_AUX, 8, 7, 1), | 169 | SOC_SINGLE("Beep Playback Speaker Volume", AC97_AUX, 8, 7, 1), |
170 | SOC_SINGLE("PC Beep Playback Mono Volume", AC97_AUX, 4, 7, 1), | 170 | SOC_SINGLE("Beep Playback Mono Volume", AC97_AUX, 4, 7, 1), |
171 | 171 | ||
172 | SOC_SINGLE("Voice Playback Headphone Volume", AC97_PCM, 12, 7, 1), | 172 | SOC_SINGLE("Voice Playback Headphone Volume", AC97_PCM, 12, 7, 1), |
173 | SOC_SINGLE("Voice Playback Master Volume", AC97_PCM, 8, 7, 1), | 173 | SOC_SINGLE("Voice Playback Master Volume", AC97_PCM, 8, 7, 1), |
@@ -266,7 +266,7 @@ static int mixer_event(struct snd_soc_dapm_widget *w, | |||
266 | 266 | ||
267 | /* Left Headphone Mixers */ | 267 | /* Left Headphone Mixers */ |
268 | static const struct snd_kcontrol_new wm9713_hpl_mixer_controls[] = { | 268 | static const struct snd_kcontrol_new wm9713_hpl_mixer_controls[] = { |
269 | SOC_DAPM_SINGLE("PC Beep Playback Switch", HPL_MIXER, 5, 1, 0), | 269 | SOC_DAPM_SINGLE("Beep Playback Switch", HPL_MIXER, 5, 1, 0), |
270 | SOC_DAPM_SINGLE("Voice Playback Switch", HPL_MIXER, 4, 1, 0), | 270 | SOC_DAPM_SINGLE("Voice Playback Switch", HPL_MIXER, 4, 1, 0), |
271 | SOC_DAPM_SINGLE("Aux Playback Switch", HPL_MIXER, 3, 1, 0), | 271 | SOC_DAPM_SINGLE("Aux Playback Switch", HPL_MIXER, 3, 1, 0), |
272 | SOC_DAPM_SINGLE("PCM Playback Switch", HPL_MIXER, 2, 1, 0), | 272 | SOC_DAPM_SINGLE("PCM Playback Switch", HPL_MIXER, 2, 1, 0), |
@@ -276,7 +276,7 @@ SOC_DAPM_SINGLE("Bypass Playback Switch", HPL_MIXER, 0, 1, 0), | |||
276 | 276 | ||
277 | /* Right Headphone Mixers */ | 277 | /* Right Headphone Mixers */ |
278 | static const struct snd_kcontrol_new wm9713_hpr_mixer_controls[] = { | 278 | static const struct snd_kcontrol_new wm9713_hpr_mixer_controls[] = { |
279 | SOC_DAPM_SINGLE("PC Beep Playback Switch", HPR_MIXER, 5, 1, 0), | 279 | SOC_DAPM_SINGLE("Beep Playback Switch", HPR_MIXER, 5, 1, 0), |
280 | SOC_DAPM_SINGLE("Voice Playback Switch", HPR_MIXER, 4, 1, 0), | 280 | SOC_DAPM_SINGLE("Voice Playback Switch", HPR_MIXER, 4, 1, 0), |
281 | SOC_DAPM_SINGLE("Aux Playback Switch", HPR_MIXER, 3, 1, 0), | 281 | SOC_DAPM_SINGLE("Aux Playback Switch", HPR_MIXER, 3, 1, 0), |
282 | SOC_DAPM_SINGLE("PCM Playback Switch", HPR_MIXER, 2, 1, 0), | 282 | SOC_DAPM_SINGLE("PCM Playback Switch", HPR_MIXER, 2, 1, 0), |
@@ -294,7 +294,7 @@ SOC_DAPM_ENUM("Route", wm9713_enum[0]); | |||
294 | 294 | ||
295 | /* Speaker Mixer */ | 295 | /* Speaker Mixer */ |
296 | static const struct snd_kcontrol_new wm9713_speaker_mixer_controls[] = { | 296 | static const struct snd_kcontrol_new wm9713_speaker_mixer_controls[] = { |
297 | SOC_DAPM_SINGLE("PC Beep Playback Switch", AC97_AUX, 11, 1, 1), | 297 | SOC_DAPM_SINGLE("Beep Playback Switch", AC97_AUX, 11, 1, 1), |
298 | SOC_DAPM_SINGLE("Voice Playback Switch", AC97_PCM, 11, 1, 1), | 298 | SOC_DAPM_SINGLE("Voice Playback Switch", AC97_PCM, 11, 1, 1), |
299 | SOC_DAPM_SINGLE("Aux Playback Switch", AC97_REC_SEL, 11, 1, 1), | 299 | SOC_DAPM_SINGLE("Aux Playback Switch", AC97_REC_SEL, 11, 1, 1), |
300 | SOC_DAPM_SINGLE("PCM Playback Switch", AC97_PHONE, 14, 1, 1), | 300 | SOC_DAPM_SINGLE("PCM Playback Switch", AC97_PHONE, 14, 1, 1), |
@@ -304,7 +304,7 @@ SOC_DAPM_SINGLE("Bypass Playback Switch", AC97_PC_BEEP, 14, 1, 1), | |||
304 | 304 | ||
305 | /* Mono Mixer */ | 305 | /* Mono Mixer */ |
306 | static const struct snd_kcontrol_new wm9713_mono_mixer_controls[] = { | 306 | static const struct snd_kcontrol_new wm9713_mono_mixer_controls[] = { |
307 | SOC_DAPM_SINGLE("PC Beep Playback Switch", AC97_AUX, 7, 1, 1), | 307 | SOC_DAPM_SINGLE("Beep Playback Switch", AC97_AUX, 7, 1, 1), |
308 | SOC_DAPM_SINGLE("Voice Playback Switch", AC97_PCM, 7, 1, 1), | 308 | SOC_DAPM_SINGLE("Voice Playback Switch", AC97_PCM, 7, 1, 1), |
309 | SOC_DAPM_SINGLE("Aux Playback Switch", AC97_REC_SEL, 7, 1, 1), | 309 | SOC_DAPM_SINGLE("Aux Playback Switch", AC97_REC_SEL, 7, 1, 1), |
310 | SOC_DAPM_SINGLE("PCM Playback Switch", AC97_PHONE, 13, 1, 1), | 310 | SOC_DAPM_SINGLE("PCM Playback Switch", AC97_PHONE, 13, 1, 1), |
@@ -463,7 +463,7 @@ SND_SOC_DAPM_VMID("VMID"), | |||
463 | 463 | ||
464 | static const struct snd_soc_dapm_route audio_map[] = { | 464 | static const struct snd_soc_dapm_route audio_map[] = { |
465 | /* left HP mixer */ | 465 | /* left HP mixer */ |
466 | {"Left HP Mixer", "PC Beep Playback Switch", "PCBEEP"}, | 466 | {"Left HP Mixer", "Beep Playback Switch", "PCBEEP"}, |
467 | {"Left HP Mixer", "Voice Playback Switch", "Voice DAC"}, | 467 | {"Left HP Mixer", "Voice Playback Switch", "Voice DAC"}, |
468 | {"Left HP Mixer", "Aux Playback Switch", "Aux DAC"}, | 468 | {"Left HP Mixer", "Aux Playback Switch", "Aux DAC"}, |
469 | {"Left HP Mixer", "Bypass Playback Switch", "Left Line In"}, | 469 | {"Left HP Mixer", "Bypass Playback Switch", "Left Line In"}, |
@@ -472,7 +472,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
472 | {"Left HP Mixer", NULL, "Capture Headphone Mux"}, | 472 | {"Left HP Mixer", NULL, "Capture Headphone Mux"}, |
473 | 473 | ||
474 | /* right HP mixer */ | 474 | /* right HP mixer */ |
475 | {"Right HP Mixer", "PC Beep Playback Switch", "PCBEEP"}, | 475 | {"Right HP Mixer", "Beep Playback Switch", "PCBEEP"}, |
476 | {"Right HP Mixer", "Voice Playback Switch", "Voice DAC"}, | 476 | {"Right HP Mixer", "Voice Playback Switch", "Voice DAC"}, |
477 | {"Right HP Mixer", "Aux Playback Switch", "Aux DAC"}, | 477 | {"Right HP Mixer", "Aux Playback Switch", "Aux DAC"}, |
478 | {"Right HP Mixer", "Bypass Playback Switch", "Right Line In"}, | 478 | {"Right HP Mixer", "Bypass Playback Switch", "Right Line In"}, |
@@ -491,7 +491,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
491 | {"Capture Mixer", NULL, "Right Capture Source"}, | 491 | {"Capture Mixer", NULL, "Right Capture Source"}, |
492 | 492 | ||
493 | /* speaker mixer */ | 493 | /* speaker mixer */ |
494 | {"Speaker Mixer", "PC Beep Playback Switch", "PCBEEP"}, | 494 | {"Speaker Mixer", "Beep Playback Switch", "PCBEEP"}, |
495 | {"Speaker Mixer", "Voice Playback Switch", "Voice DAC"}, | 495 | {"Speaker Mixer", "Voice Playback Switch", "Voice DAC"}, |
496 | {"Speaker Mixer", "Aux Playback Switch", "Aux DAC"}, | 496 | {"Speaker Mixer", "Aux Playback Switch", "Aux DAC"}, |
497 | {"Speaker Mixer", "Bypass Playback Switch", "Line Mixer"}, | 497 | {"Speaker Mixer", "Bypass Playback Switch", "Line Mixer"}, |
@@ -499,7 +499,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
499 | {"Speaker Mixer", "MonoIn Playback Switch", "Mono In"}, | 499 | {"Speaker Mixer", "MonoIn Playback Switch", "Mono In"}, |
500 | 500 | ||
501 | /* mono mixer */ | 501 | /* mono mixer */ |
502 | {"Mono Mixer", "PC Beep Playback Switch", "PCBEEP"}, | 502 | {"Mono Mixer", "Beep Playback Switch", "PCBEEP"}, |
503 | {"Mono Mixer", "Voice Playback Switch", "Voice DAC"}, | 503 | {"Mono Mixer", "Voice Playback Switch", "Voice DAC"}, |
504 | {"Mono Mixer", "Aux Playback Switch", "Aux DAC"}, | 504 | {"Mono Mixer", "Aux Playback Switch", "Aux DAC"}, |
505 | {"Mono Mixer", "Bypass Playback Switch", "Line Mixer"}, | 505 | {"Mono Mixer", "Bypass Playback Switch", "Line Mixer"}, |