Commit e922b002 authored by Takashi Iwai's avatar Takashi Iwai

[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: default avatarTakashi Iwai <tiwai@suse.de>
parent 4235a317
...@@ -169,4 +169,11 @@ int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, ...@@ -169,4 +169,11 @@ int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol,
int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo); 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 */ #endif /* __SOUND_CONTROL_H */
...@@ -181,3 +181,7 @@ config SND_PCM_XRUN_DEBUG ...@@ -181,3 +181,7 @@ config SND_PCM_XRUN_DEBUG
It is usually not required, but if you have trouble with It is usually not required, but if you have trouble with
sound clicking when system is loaded, it may help to determine sound clicking when system is loaded, it may help to determine
the process or driver which causes the scheduling gaps. the process or driver which causes the scheduling gaps.
config SND_VMASTER
bool
depends on SND
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
snd-y := sound.o init.o memory.o info.o control.o misc.o device.o 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_ISA_DMA_API) += isadma.o
snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o info_oss.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 \ snd-pcm-objs := pcm.o pcm_native.o pcm_lib.o pcm_timer.o pcm_misc.o \
pcm_memory.o pcm_memory.o
......
...@@ -253,6 +253,8 @@ int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) ...@@ -253,6 +253,8 @@ int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
return 0; return 0;
} }
EXPORT_SYMBOL(snd_ctl_add_slave);
/* /*
* ctl callbacks for master controls * ctl callbacks for master controls
*/ */
...@@ -362,3 +364,5 @@ struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, ...@@ -362,3 +364,5 @@ struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
} }
return kctl; return kctl;
} }
EXPORT_SYMBOL(snd_ctl_make_virtual_master);
...@@ -517,6 +517,7 @@ config SND_HDA_INTEL ...@@ -517,6 +517,7 @@ config SND_HDA_INTEL
tristate "Intel HD Audio" tristate "Intel HD Audio"
depends on SND depends on SND
select SND_PCM select SND_PCM
select SND_VMASTER
help help
Say Y here to include support for Intel "High Definition Say Y here to include support for Intel "High Definition
Audio" (Azalia) motherboard devices. Audio" (Azalia) motherboard devices.
......
...@@ -418,11 +418,4 @@ int snd_hda_check_amp_list_power(struct hda_codec *codec, ...@@ -418,11 +418,4 @@ int snd_hda_check_amp_list_power(struct hda_codec *codec,
hda_nid_t nid); hda_nid_t nid);
#endif /* CONFIG_SND_HDA_POWER_SAVE */ #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 */ #endif /* __SOUND_HDA_LOCAL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment