]> err.no Git - linux-2.6/commitdiff
[ALSA] Move vmaster code to sound core
authorTakashi Iwai <tiwai@suse.de>
Mon, 18 Feb 2008 12:03:13 +0000 (13:03 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:00:12 +0000 (12:00 +0200)
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>
include/sound/control.h
sound/core/Kconfig
sound/core/Makefile
sound/core/vmaster.c [moved from sound/pci/hda/vmaster.c with 99% similarity]
sound/pci/Kconfig
sound/pci/hda/hda_local.h

index e79baa63912f018ad2e600b5e9db893427dede9b..3dc1291f52db78e8f525801f1b79204180e91dbf 100644 (file)
@@ -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 */
index 829ca38b595e82d63eabb932506fb126eff723bf..a8d71c6c8e7593f1619733bc7c9635bf118d43ca 100644 (file)
@@ -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
index 267039a97bd51e1beca02ba63de7cb70305e87f3..da8e685eef9c38b1af620acb1c25d403223fd0aa 100644 (file)
@@ -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
similarity index 99%
rename from sound/pci/hda/vmaster.c
rename to sound/core/vmaster.c
index 2da49d20a1fc65c9acb8ee2b845b9a7d332b282e..7cfd8b8fb4e73c1ffc33a0bc676c03afd9d4ac74 100644 (file)
@@ -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);
index 812085d521f12405867dd4c70096b49b8ef79212..48296d97bf33dc95ae992c8e891709cf36e72fef 100644 (file)
@@ -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.
index ce2ad42a8a8ac933fe3a0ad5d3f3ec061f1b50f6..5c9e578f7f2dd89b745d87594711ed3bec01ec3b 100644 (file)
@@ -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 */