}
EXPORT_SYMBOL_HDA(snd_hda_gen_spec_init);
-static struct snd_kcontrol_new *
-add_kctl(struct hda_gen_spec *spec, const char *name,
- const struct snd_kcontrol_new *temp)
+struct snd_kcontrol_new *
+snd_hda_gen_add_kctl(struct hda_gen_spec *spec, const char *name,
+ const struct snd_kcontrol_new *temp)
{
struct snd_kcontrol_new *knew = snd_array_new(&spec->kctls);
if (!knew)
return NULL;
return knew;
}
+EXPORT_SYMBOL_HDA(snd_hda_gen_add_kctl);
static void free_kctls(struct hda_gen_spec *spec)
{
{
struct snd_kcontrol_new *knew;
- knew = add_kctl(spec, name, &control_templates[type]);
+ knew = snd_hda_gen_add_kctl(spec, name, &control_templates[type]);
if (!knew)
return -ENOMEM;
knew->index = cidx;
struct hda_gen_spec *spec = codec->spec;
if (spec->multi_ios > 0) {
- if (!add_kctl(spec, NULL, &channel_mode_enum))
+ if (!snd_hda_gen_add_kctl(spec, NULL, &channel_mode_enum))
return -ENOMEM;
}
return 0;
struct snd_kcontrol_new *knew;
if (vol_ctl) {
- knew = add_kctl(spec, NULL, &cap_vol_temp);
+ knew = snd_hda_gen_add_kctl(spec, NULL, &cap_vol_temp);
if (!knew)
return -ENOMEM;
knew->index = idx;
knew->subdevice = HDA_SUBDEV_AMP_FLAG;
}
if (sw_ctl) {
- knew = add_kctl(spec, NULL, &cap_sw_temp);
+ knew = snd_hda_gen_add_kctl(spec, NULL, &cap_sw_temp);
if (!knew)
return -ENOMEM;
knew->index = idx;
if (!spec->auto_mic && imux->num_items > 1) {
struct snd_kcontrol_new *knew;
- knew = add_kctl(spec, NULL, &cap_src_temp);
+ knew = snd_hda_gen_add_kctl(spec, NULL, &cap_src_temp);
if (!knew)
return -ENOMEM;
knew->count = nums;
{
struct hda_gen_spec *spec = codec->spec;
- if (!add_kctl(spec, NULL, &automute_mode_enum))
+ if (!snd_hda_gen_add_kctl(spec, NULL, &automute_mode_enum))
return -ENOMEM;
return 0;
}
void snd_hda_activate_path(struct hda_codec *codec, struct nid_path *path,
bool enable, bool add_aamix);
+struct snd_kcontrol_new *
+snd_hda_gen_add_kctl(struct hda_gen_spec *spec, const char *name,
+ const struct snd_kcontrol_new *temp);
+
int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
const hda_nid_t *ignore_nids);
int snd_hda_gen_build_controls(struct hda_codec *codec);