From 398d5da61ab284b864967d1d569b103aa871ad4f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 19 Dec 2012 14:38:33 +0100 Subject: [PATCH] --- yaml --- r: 353043 b: refs/heads/master c: 12c93df60ccf926f8798723f97f9f45175fce85b h: refs/heads/master i: 353041: 41b3c875fbb21d1d0f427b1687b8213fc24be168 353039: c8acbb868c5fb5aebd819328603bce2bc6626669 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_generic.c | 19 ++++++++++--------- trunk/sound/pci/hda/hda_generic.h | 4 ++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index f90afb69b385..705d1d40c76c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 731dc3019c7b9fa7a787f9b0a74e94638eee3fe1 +refs/heads/master: 12c93df60ccf926f8798723f97f9f45175fce85b diff --git a/trunk/sound/pci/hda/hda_generic.c b/trunk/sound/pci/hda/hda_generic.c index 31c5677e6210..49e968c8140b 100644 --- a/trunk/sound/pci/hda/hda_generic.c +++ b/trunk/sound/pci/hda/hda_generic.c @@ -43,9 +43,9 @@ int snd_hda_gen_spec_init(struct hda_gen_spec *spec) } 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) @@ -59,6 +59,7 @@ add_kctl(struct hda_gen_spec *spec, const char *name, return NULL; return knew; } +EXPORT_SYMBOL_HDA(snd_hda_gen_add_kctl); static void free_kctls(struct hda_gen_spec *spec) { @@ -548,7 +549,7 @@ static int add_control(struct hda_gen_spec *spec, int type, const char *name, { 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; @@ -1527,7 +1528,7 @@ static int create_multi_channel_mode(struct hda_codec *codec) 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; @@ -2086,7 +2087,7 @@ static int create_bind_cap_vol_ctl(struct hda_codec *codec, int idx, 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; @@ -2094,7 +2095,7 @@ static int create_bind_cap_vol_ctl(struct hda_codec *codec, int 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; @@ -2171,7 +2172,7 @@ static int create_capture_mixers(struct hda_codec *codec) 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; @@ -2592,7 +2593,7 @@ static int add_automute_mode_enum(struct hda_codec *codec) { 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; } diff --git a/trunk/sound/pci/hda/hda_generic.h b/trunk/sound/pci/hda/hda_generic.h index 9c00bd5863e5..d71e86de9060 100644 --- a/trunk/sound/pci/hda/hda_generic.h +++ b/trunk/sound/pci/hda/hda_generic.h @@ -192,6 +192,10 @@ snd_hda_add_new_path(struct hda_codec *codec, hda_nid_t from_nid, 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);