diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-02-16 06:59:55 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-02-16 06:59:55 -0500 |
commit | c3c2c9e7ff3e38bd9ff5b721b6ae8634fce42802 (patch) | |
tree | 312fe94754dbd44828baf80f27ae72b46567b679 /sound/pci/hda/patch_realtek.c | |
parent | c29b3f6dd7798964d77199af4925be72a3a48349 (diff) |
ALSA: hda/realtek - Remove leftover static quirks for ALC260
Now we can clean up all static quirks for ALC260.
Also many codes in alc_quirks.c can be ripped off since they have been
used only by ALC260 static quirks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0d81eeb563c7..3ea42069b8ee 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4308,14 +4308,10 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = { | |||
4308 | 4308 | ||
4309 | /* | 4309 | /* |
4310 | */ | 4310 | */ |
4311 | #ifdef CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS | ||
4312 | #include "alc260_quirks.c" | ||
4313 | #endif | ||
4314 | |||
4315 | static int patch_alc260(struct hda_codec *codec) | 4311 | static int patch_alc260(struct hda_codec *codec) |
4316 | { | 4312 | { |
4317 | struct alc_spec *spec; | 4313 | struct alc_spec *spec; |
4318 | int err, board_config; | 4314 | int err; |
4319 | 4315 | ||
4320 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 4316 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
4321 | if (spec == NULL) | 4317 | if (spec == NULL) |
@@ -4325,38 +4321,13 @@ static int patch_alc260(struct hda_codec *codec) | |||
4325 | 4321 | ||
4326 | spec->mixer_nid = 0x07; | 4322 | spec->mixer_nid = 0x07; |
4327 | 4323 | ||
4328 | board_config = alc_board_config(codec, ALC260_MODEL_LAST, | 4324 | alc_pick_fixup(codec, NULL, alc260_fixup_tbl, alc260_fixups); |
4329 | alc260_models, alc260_cfg_tbl); | 4325 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); |
4330 | if (board_config < 0) { | ||
4331 | snd_printd(KERN_INFO "hda_codec: %s: BIOS auto-probing.\n", | ||
4332 | codec->chip_name); | ||
4333 | board_config = ALC_MODEL_AUTO; | ||
4334 | } | ||
4335 | |||
4336 | if (board_config == ALC_MODEL_AUTO) { | ||
4337 | alc_pick_fixup(codec, NULL, alc260_fixup_tbl, alc260_fixups); | ||
4338 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | ||
4339 | } | ||
4340 | |||
4341 | if (board_config == ALC_MODEL_AUTO) { | ||
4342 | /* automatic parse from the BIOS config */ | ||
4343 | err = alc260_parse_auto_config(codec); | ||
4344 | if (err < 0) | ||
4345 | goto error; | ||
4346 | #ifdef CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS | ||
4347 | else if (!err) { | ||
4348 | printk(KERN_INFO | ||
4349 | "hda_codec: Cannot set up configuration " | ||
4350 | "from BIOS. Using base mode...\n"); | ||
4351 | board_config = ALC260_BASIC; | ||
4352 | } | ||
4353 | #endif | ||
4354 | } | ||
4355 | 4326 | ||
4356 | if (board_config != ALC_MODEL_AUTO) { | 4327 | /* automatic parse from the BIOS config */ |
4357 | setup_preset(codec, &alc260_presets[board_config]); | 4328 | err = alc260_parse_auto_config(codec); |
4358 | spec->vmaster_nid = 0x08; | 4329 | if (err < 0) |
4359 | } | 4330 | goto error; |
4360 | 4331 | ||
4361 | if (!spec->no_analog && !spec->adc_nids) { | 4332 | if (!spec->no_analog && !spec->adc_nids) { |
4362 | alc_auto_fill_adc_caps(codec); | 4333 | alc_auto_fill_adc_caps(codec); |
@@ -4377,10 +4348,7 @@ static int patch_alc260(struct hda_codec *codec) | |||
4377 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PROBE); | 4348 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PROBE); |
4378 | 4349 | ||
4379 | codec->patch_ops = alc_patch_ops; | 4350 | codec->patch_ops = alc_patch_ops; |
4380 | if (board_config == ALC_MODEL_AUTO) | 4351 | spec->init_hook = alc_auto_init_std; |
4381 | spec->init_hook = alc_auto_init_std; | ||
4382 | else | ||
4383 | codec->patch_ops.build_controls = __alc_build_controls; | ||
4384 | spec->shutup = alc_eapd_shutup; | 4352 | spec->shutup = alc_eapd_shutup; |
4385 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 4353 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
4386 | if (!spec->loopback.amplist) | 4354 | if (!spec->loopback.amplist) |