Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270390
b: refs/heads/master
c: 20ca0c3
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Oct 17, 2011
1 parent ff838f2 commit 3cbae57
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 636030e90ed85a895061060ceb70873d22269420
refs/heads/master: 20ca0c350d4dd901277089bfcf7ce8652addd1d0
36 changes: 22 additions & 14 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -4950,7 +4950,7 @@ static int alc269_fill_coef(struct hda_codec *codec)
static int patch_alc269(struct hda_codec *codec)
{
struct alc_spec *spec;
int err;
int err = 0;

spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL)
Expand All @@ -4969,30 +4969,34 @@ static int patch_alc269(struct hda_codec *codec)
if ((coef & 0x00f0) == 0x0010) {
if (codec->bus->pci->subsystem_vendor == 0x1025 &&
spec->cdefine.platform_type == 1) {
alc_codec_rename(codec, "ALC271X");
err = alc_codec_rename(codec, "ALC271X");
} else if ((coef & 0xf000) == 0x2000) {
alc_codec_rename(codec, "ALC259");
err = alc_codec_rename(codec, "ALC259");
} else if ((coef & 0xf000) == 0x3000) {
alc_codec_rename(codec, "ALC258");
err = alc_codec_rename(codec, "ALC258");
} else if ((coef & 0xfff0) == 0x3010) {
alc_codec_rename(codec, "ALC277");
err = alc_codec_rename(codec, "ALC277");
} else {
alc_codec_rename(codec, "ALC269VB");
err = alc_codec_rename(codec, "ALC269VB");
}
spec->codec_variant = ALC269_TYPE_ALC269VB;
} else if ((coef & 0x00f0) == 0x0020) {
if (coef == 0xa023)
alc_codec_rename(codec, "ALC259");
err = alc_codec_rename(codec, "ALC259");
else if (coef == 0x6023)
alc_codec_rename(codec, "ALC281X");
err = alc_codec_rename(codec, "ALC281X");
else if (codec->bus->pci->subsystem_vendor == 0x17aa &&
codec->bus->pci->subsystem_device == 0x21f3)
alc_codec_rename(codec, "ALC3202");
err = alc_codec_rename(codec, "ALC3202");
else
alc_codec_rename(codec, "ALC269VC");
err = alc_codec_rename(codec, "ALC269VC");
spec->codec_variant = ALC269_TYPE_ALC269VC;
} else
alc_fix_pll_init(codec, 0x20, 0x04, 15);
if (err < 0) {
alc_free(codec);
return err;
}
alc269_fill_coef(codec);
}

Expand Down Expand Up @@ -5576,7 +5580,7 @@ static const struct alc_model_fixup alc662_fixup_models[] = {
static int patch_alc662(struct hda_codec *codec)
{
struct alc_spec *spec;
int err;
int err = 0;
int coef;

spec = kzalloc(sizeof(*spec), GFP_KERNEL);
Expand All @@ -5596,13 +5600,17 @@ static int patch_alc662(struct hda_codec *codec)

coef = alc_read_coef_idx(codec, 0);
if (coef == 0x8020 || coef == 0x8011)
alc_codec_rename(codec, "ALC661");
err = alc_codec_rename(codec, "ALC661");
else if (coef & (1 << 14) &&
codec->bus->pci->subsystem_vendor == 0x1025 &&
spec->cdefine.platform_type == 1)
alc_codec_rename(codec, "ALC272X");
err = alc_codec_rename(codec, "ALC272X");
else if (coef == 0x4011)
alc_codec_rename(codec, "ALC656");
err = alc_codec_rename(codec, "ALC656");
if (err < 0) {
alc_free(codec);
return err;
}

alc_pick_fixup(codec, alc662_fixup_models,
alc662_fixup_tbl, alc662_fixups);
Expand Down

0 comments on commit 3cbae57

Please sign in to comment.