aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-02-18 13:03:13 +0100
committerTakashi Iwai <tiwai@suse.de>2008-04-24 12:00:12 +0200
commite922b0028fad87de0d262f9fa51f98595d2df258 (patch)
tree60798c8c6c8494edd20577d3adf85fba8bfbacd4
parent4235a31784f59c9be5ff71534743c055091f9735 (diff)
downloadkernel_samsung_smdk4412-e922b0028fad87de0d262f9fa51f98595d2df258.zip
kernel_samsung_smdk4412-e922b0028fad87de0d262f9fa51f98595d2df258.tar.gz
kernel_samsung_smdk4412-e922b0028fad87de0d262f9fa51f98595d2df258.tar.bz2
[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.h7
-rw-r--r--sound/core/Kconfig4
-rw-r--r--sound/core/Makefile1
-rw-r--r--sound/core/vmaster.c (renamed from sound/pci/hda/vmaster.c)4
-rw-r--r--sound/pci/Kconfig1
-rw-r--r--sound/pci/hda/hda_local.h7
6 files changed, 17 insertions, 7 deletions
diff --git a/include/sound/control.h b/include/sound/control.h
index e79baa6..3dc1291 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,
int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo);
+/*
+ * virtual master control
+ */
+struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
+ const unsigned int *tlv);
+int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave);
+
#endif /* __SOUND_CONTROL_H */
diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index 829ca38..a8d71c6 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -181,3 +181,7 @@ config SND_PCM_XRUN_DEBUG
It is usually not required, but if you have trouble with
sound clicking when system is loaded, it may help to determine
the process or driver which causes the scheduling gaps.
+
+config SND_VMASTER
+ bool
+ depends on SND
diff --git a/sound/core/Makefile b/sound/core/Makefile
index 267039a..da8e685 100644
--- a/sound/core/Makefile
+++ b/sound/core/Makefile
@@ -6,6 +6,7 @@
snd-y := sound.o init.o memory.o info.o control.o misc.o device.o
snd-$(CONFIG_ISA_DMA_API) += isadma.o
snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o info_oss.o
+snd-$(CONFIG_SND_VMASTER) += vmaster.o
snd-pcm-objs := pcm.o pcm_native.o pcm_lib.o pcm_timer.o pcm_misc.o \
pcm_memory.o
diff --git a/sound/pci/hda/vmaster.c b/sound/core/vmaster.c
index 2da49d2..7cfd8b8 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)
return 0;
}
+EXPORT_SYMBOL(snd_ctl_add_slave);
+
/*
* ctl callbacks for master controls
*/
@@ -362,3 +364,5 @@ struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
}
return kctl;
}
+
+EXPORT_SYMBOL(snd_ctl_make_virtual_master);
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index 812085d..48296d9 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -517,6 +517,7 @@ config SND_HDA_INTEL
tristate "Intel HD Audio"
depends on SND
select SND_PCM
+ select SND_VMASTER
help
Say Y here to include support for Intel "High Definition
Audio" (Azalia) motherboard devices.
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index ce2ad42..5c9e578 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,
hda_nid_t nid);
#endif /* CONFIG_SND_HDA_POWER_SAVE */
-/*
- * virtual master control
- */
-struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
- const unsigned int *tlv);
-int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave);
-
#endif /* __SOUND_HDA_LOCAL_H */