ALSA: hda/realtek - Use alc_codec_rename()
Replaced with alc_codec_rename() in all possible places. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Родитель
801f49d3b8
Коммит
84db9150b6
|
@ -5678,10 +5678,10 @@ static int patch_alc888(struct hda_codec *codec)
|
||||||
if ((coef & 0x00f0) == 0x0030) {
|
if ((coef & 0x00f0) == 0x0030) {
|
||||||
kfree(codec->chip_name);
|
kfree(codec->chip_name);
|
||||||
if (codec->vendor_id == 0x10ec0887)
|
if (codec->vendor_id == 0x10ec0887)
|
||||||
codec->chip_name = kstrdup("ALC887-VD", GFP_KERNEL);
|
err = alc_codec_rename(codec, "ALC887-VD");
|
||||||
else
|
else
|
||||||
codec->chip_name = kstrdup("ALC888-VD", GFP_KERNEL);
|
err = alc_codec_rename(codec, "ALC888-VD");
|
||||||
if (!codec->chip_name) {
|
if (err < 0) {
|
||||||
alc_free(codec);
|
alc_free(codec);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
@ -5691,9 +5691,8 @@ static int patch_alc888(struct hda_codec *codec)
|
||||||
/* For ALC888S-VC */
|
/* For ALC888S-VC */
|
||||||
if (codec->vendor_id == 0x10ec0888) {
|
if (codec->vendor_id == 0x10ec0888) {
|
||||||
if ((coef & 0xf0f0) == 0x3020) {
|
if ((coef & 0xf0f0) == 0x3020) {
|
||||||
kfree(codec->chip_name);
|
err = alc_codec_rename(codec, "ALC886");
|
||||||
codec->chip_name = kstrdup("ALC886", GFP_KERNEL);
|
if (err < 0) {
|
||||||
if (!codec->chip_name) {
|
|
||||||
alc_free(codec);
|
alc_free(codec);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
@ -5705,8 +5704,10 @@ static int patch_alc888(struct hda_codec *codec)
|
||||||
static int patch_alc899(struct hda_codec *codec)
|
static int patch_alc899(struct hda_codec *codec)
|
||||||
{
|
{
|
||||||
if ((alc_read_coef_idx(codec, 0) & 0x2000) != 0x2000) {
|
if ((alc_read_coef_idx(codec, 0) & 0x2000) != 0x2000) {
|
||||||
kfree(codec->chip_name);
|
if (alc_codec_rename(codec, "ALC898") < 0) {
|
||||||
codec->chip_name = kstrdup("ALC898", GFP_KERNEL);
|
alc_free(codec);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return patch_alc882(codec);
|
return patch_alc882(codec);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче