]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ALSA: hda/realtek - Support headset mode for ALC298
authorKailang Yang <kailang@realtek.com>
Tue, 12 May 2015 09:11:10 +0000 (17:11 +0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 12 May 2015 11:15:38 +0000 (13:15 +0200)
Support headset mode for ALC298 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c

index e2afd53cc14c7356b84d80e3c2aaed30d3c8ab49..f47ce2273f0878b9ccd0d43c9769b9f475e5680e 100644 (file)
@@ -3583,6 +3583,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
                break;
        case 0x10ec0286:
        case 0x10ec0288:
+       case 0x10ec0298:
                alc_process_coef_fw(codec, coef0288);
                break;
        case 0x10ec0292:
@@ -3657,6 +3658,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
                break;
        case 0x10ec0286:
        case 0x10ec0288:
+       case 0x10ec0298:
                alc_update_coef_idx(codec, 0x4f, 0x000c, 0);
                snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
                alc_process_coef_fw(codec, coef0288);
@@ -3736,6 +3738,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
                break;
        case 0x10ec0286:
        case 0x10ec0288:
+       case 0x10ec0298:
                alc_process_coef_fw(codec, coef0288);
                break;
                break;
@@ -3801,6 +3804,9 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
        case 0x10ec0283:
                alc_process_coef_fw(codec, coef0233);
                break;
+       case 0x10ec0298:
+               alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020);/* Headset output enable */
+               /* ALC298 jack type setting is the same with ALC286/ALC288 */
        case 0x10ec0286:
        case 0x10ec0288:
                alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400);
@@ -3869,6 +3875,9 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
        case 0x10ec0283:
                alc_process_coef_fw(codec, coef0233);
                break;
+       case 0x10ec0298:
+               alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);/* Headset output enable */
+               /* ALC298 jack type setting is the same with ALC286/ALC288 */
        case 0x10ec0286:
        case 0x10ec0288:
                alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400);
@@ -3931,6 +3940,9 @@ static void alc_determine_headset_type(struct hda_codec *codec)
                val = alc_read_coef_idx(codec, 0x46);
                is_ctia = (val & 0x0070) == 0x0070;
                break;
+       case 0x10ec0298:
+               alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); /* Headset output enable */
+               /* ALC298 check jack type is the same with ALC286/ALC288 */
        case 0x10ec0286:
        case 0x10ec0288:
                alc_process_coef_fw(codec, coef0288);