diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-02-18 07:03:13 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:12 -0400 |
commit | e922b0028fad87de0d262f9fa51f98595d2df258 (patch) | |
tree | 60798c8c6c8494edd20577d3adf85fba8bfbacd4 | |
parent | 4235a31784f59c9be5ff71534743c055091f9735 (diff) |
[ALSA] Move vmaster code to sound core
Move the codes for virtual master controls to sound core part so that
not only hda-intel drivers can use it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/sound/control.h | 7 | ||||
-rw-r--r-- | sound/core/Kconfig | 4 | ||||
-rw-r--r-- | sound/core/Makefile | 1 | ||||
-rw-r--r-- | sound/core/vmaster.c (renamed from sound/pci/hda/vmaster.c) | 4 | ||||
-rw-r--r-- | sound/pci/Kconfig | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 7 |
6 files changed, 17 insertions, 7 deletions
diff --git a/include/sound/control.h b/include/sound/control.h index e79baa63912f..3dc1291f52db 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -169,4 +169,11 @@ int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, | |||
169 | int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, | 169 | int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, |
170 | struct snd_ctl_elem_info *uinfo); | 170 | struct snd_ctl_elem_info *uinfo); |
171 | 171 | ||
172 | /* | ||
173 | * virtual master control | ||
174 | */ | ||
175 | struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, | ||
176 | const unsigned int *tlv); | ||
177 | int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave); | ||
178 | |||
172 | #endif /* __SOUND_CONTROL_H */ | 179 | #endif /* __SOUND_CONTROL_H */ |
diff --git a/sound/core/Kconfig b/sound/core/Kconfig index 829ca38b595e..a8d71c6c8e75 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig | |||
@@ -181,3 +181,7 @@ config SND_PCM_XRUN_DEBUG | |||
181 | It is usually not required, but if you have trouble with | 181 | It is usually not required, but if you have trouble with |
182 | sound clicking when system is loaded, it may help to determine | 182 | sound clicking when system is loaded, it may help to determine |
183 | the process or driver which causes the scheduling gaps. | 183 | the process or driver which causes the scheduling gaps. |
184 | |||
185 | config SND_VMASTER | ||
186 | bool | ||
187 | depends on SND | ||
diff --git a/sound/core/Makefile b/sound/core/Makefile index 267039a97bd5..da8e685eef9c 100644 --- a/sound/core/Makefile +++ b/sound/core/Makefile | |||
@@ -6,6 +6,7 @@ | |||
6 | snd-y := sound.o init.o memory.o info.o control.o misc.o device.o | 6 | snd-y := sound.o init.o memory.o info.o control.o misc.o device.o |
7 | snd-$(CONFIG_ISA_DMA_API) += isadma.o | 7 | snd-$(CONFIG_ISA_DMA_API) += isadma.o |
8 | snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o info_oss.o | 8 | snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o info_oss.o |
9 | snd-$(CONFIG_SND_VMASTER) += vmaster.o | ||
9 | 10 | ||
10 | snd-pcm-objs := pcm.o pcm_native.o pcm_lib.o pcm_timer.o pcm_misc.o \ | 11 | snd-pcm-objs := pcm.o pcm_native.o pcm_lib.o pcm_timer.o pcm_misc.o \ |
11 | pcm_memory.o | 12 | pcm_memory.o |
diff --git a/sound/pci/hda/vmaster.c b/sound/core/vmaster.c index 2da49d20a1fc..7cfd8b8fb4e7 100644 --- a/sound/pci/hda/vmaster.c +++ b/sound/core/vmaster.c | |||
@@ -253,6 +253,8 @@ int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) | |||
253 | return 0; | 253 | return 0; |
254 | } | 254 | } |
255 | 255 | ||
256 | EXPORT_SYMBOL(snd_ctl_add_slave); | ||
257 | |||
256 | /* | 258 | /* |
257 | * ctl callbacks for master controls | 259 | * ctl callbacks for master controls |
258 | */ | 260 | */ |
@@ -362,3 +364,5 @@ struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, | |||
362 | } | 364 | } |
363 | return kctl; | 365 | return kctl; |
364 | } | 366 | } |
367 | |||
368 | EXPORT_SYMBOL(snd_ctl_make_virtual_master); | ||
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 812085d521f1..48296d97bf33 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig | |||
@@ -517,6 +517,7 @@ config SND_HDA_INTEL | |||
517 | tristate "Intel HD Audio" | 517 | tristate "Intel HD Audio" |
518 | depends on SND | 518 | depends on SND |
519 | select SND_PCM | 519 | select SND_PCM |
520 | select SND_VMASTER | ||
520 | help | 521 | help |
521 | Say Y here to include support for Intel "High Definition | 522 | Say Y here to include support for Intel "High Definition |
522 | Audio" (Azalia) motherboard devices. | 523 | Audio" (Azalia) motherboard devices. |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index ce2ad42a8a8a..5c9e578f7f2d 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -418,11 +418,4 @@ int snd_hda_check_amp_list_power(struct hda_codec *codec, | |||
418 | hda_nid_t nid); | 418 | hda_nid_t nid); |
419 | #endif /* CONFIG_SND_HDA_POWER_SAVE */ | 419 | #endif /* CONFIG_SND_HDA_POWER_SAVE */ |
420 | 420 | ||
421 | /* | ||
422 | * virtual master control | ||
423 | */ | ||
424 | struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, | ||
425 | const unsigned int *tlv); | ||
426 | int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave); | ||
427 | |||
428 | #endif /* __SOUND_HDA_LOCAL_H */ | 421 | #endif /* __SOUND_HDA_LOCAL_H */ |