ALSA: hda - Move fixup code into struct hda_codec

Since the fixup code is used commonly, it's worth to move it to the
common place, struct hda_codec, instead of keeping in hda_gen_spec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2012-12-18 18:12:44 +01:00
parent 81fede89ed
commit c9ce6b260b
9 changed files with 86 additions and 122 deletions

View File

@@ -67,8 +67,6 @@ struct imux_info {
};
struct conexant_spec {
struct hda_gen_spec gen;
const struct snd_kcontrol_new *mixers[5];
int num_mixers;
hda_nid_t vmaster_nid;
@@ -451,7 +449,6 @@ static int conexant_init(struct hda_codec *codec)
static void conexant_free(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
snd_hda_gen_free(&spec->gen);
snd_hda_detach_beep_device(codec);
kfree(spec);
}
@@ -4033,7 +4030,7 @@ static void cx_auto_init_digital(struct hda_codec *codec)
static int cx_auto_init(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
snd_hda_gen_apply_verbs(codec);
snd_hda_apply_verbs(codec);
cx_auto_init_output(codec);
cx_auto_init_input(codec);
cx_auto_init_digital(codec);
@@ -4533,7 +4530,6 @@ static int patch_conexant_auto(struct hda_codec *codec)
if (!spec)
return -ENOMEM;
codec->spec = spec;
snd_hda_gen_init(&spec->gen);
switch (codec->vendor_id) {
case 0x14f15045: