diff mbox series

[Artful,linux-oem] ALSA: hda/realtek - New codec support for ALC257

Message ID 1513650087-3971-2-git-send-email-hui.wang@canonical.com
State Accepted
Headers show
Series [Artful,linux-oem] ALSA: hda/realtek - New codec support for ALC257 | expand

Commit Message

Hui Wang Dec. 19, 2017, 2:21 a.m. UTC
From: Kailang Yang <kailang@realtek.com>

BugLink: https://bugs.launchpad.net/bugs/1738911

Add new support for ALC257 codec.

[ It's supposed to be almost equivalent with other ALC25x variants,
  just adding another type and id -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit f429e7e494afaded76e62c6f98211a635aa03098)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 sound/pci/hda/patch_realtek.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Aaron Ma Dec. 19, 2017, 4:16 a.m. UTC | #1
On 12/19/2017 10:21 AM, Hui Wang wrote:
> From: Kailang Yang <kailang@realtek.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1738911
> 
> Add new support for ALC257 codec.
> 
> [ It's supposed to be almost equivalent with other ALC25x variants,
>   just adding another type and id -- tiwai ]
> 
> Signed-off-by: Kailang Yang <kailang@realtek.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (cherry picked from commit f429e7e494afaded76e62c6f98211a635aa03098)
> Signed-off-by: Hui Wang <hui.wang@canonical.com>

Clean cherry-pick.

Acked-by: Aaron Ma <aaron.ma@canonical.com>

> ---
>  sound/pci/hda/patch_realtek.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 3b07373..9ce42a1 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -330,6 +330,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
>  	case 0x10ec0236:
>  	case 0x10ec0255:
>  	case 0x10ec0256:
> +	case 0x10ec0257:
>  	case 0x10ec0282:
>  	case 0x10ec0283:
>  	case 0x10ec0286:
> @@ -2746,6 +2747,7 @@ enum {
>  	ALC269_TYPE_ALC298,
>  	ALC269_TYPE_ALC255,
>  	ALC269_TYPE_ALC256,
> +	ALC269_TYPE_ALC257,
>  	ALC269_TYPE_ALC215,
>  	ALC269_TYPE_ALC225,
>  	ALC269_TYPE_ALC294,
> @@ -2779,6 +2781,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
>  	case ALC269_TYPE_ALC298:
>  	case ALC269_TYPE_ALC255:
>  	case ALC269_TYPE_ALC256:
> +	case ALC269_TYPE_ALC257:
>  	case ALC269_TYPE_ALC215:
>  	case ALC269_TYPE_ALC225:
>  	case ALC269_TYPE_ALC294:
> @@ -6832,6 +6835,10 @@ static int patch_alc269(struct hda_codec *codec)
>  		spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
>  		alc_update_coef_idx(codec, 0x36, 1 << 13, 1 << 5); /* Switch pcbeep path to Line in path*/
>  		break;
> +	case 0x10ec0257:
> +		spec->codec_variant = ALC269_TYPE_ALC257;
> +		spec->gen.mixer_nid = 0;
> +		break;
>  	case 0x10ec0215:
>  	case 0x10ec0285:
>  	case 0x10ec0289:
> @@ -7879,6 +7886,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
>  	HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
>  	HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
>  	HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
> +	HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
>  	HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
>  	HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262),
>  	HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268),
>
Aaron Ma Dec. 19, 2017, 4:18 a.m. UTC | #2
Add ACK tag in subject.

On 12/19/2017 12:16 PM, Aaron Ma wrote:
> On 12/19/2017 10:21 AM, Hui Wang wrote:
>> From: Kailang Yang <kailang@realtek.com>
>>
>> BugLink: https://bugs.launchpad.net/bugs/1738911
>>
>> Add new support for ALC257 codec.
>>
>> [ It's supposed to be almost equivalent with other ALC25x variants,
>>   just adding another type and id -- tiwai ]
>>
>> Signed-off-by: Kailang Yang <kailang@realtek.com>
>> Cc: <stable@vger.kernel.org>
>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>> (cherry picked from commit f429e7e494afaded76e62c6f98211a635aa03098)
>> Signed-off-by: Hui Wang <hui.wang@canonical.com>
> 
> Clean cherry-pick.
> 
> Acked-by: Aaron Ma <aaron.ma@canonical.com>
> 
>> ---
>>  sound/pci/hda/patch_realtek.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
>> index 3b07373..9ce42a1 100644
>> --- a/sound/pci/hda/patch_realtek.c
>> +++ b/sound/pci/hda/patch_realtek.c
>> @@ -330,6 +330,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
>>  	case 0x10ec0236:
>>  	case 0x10ec0255:
>>  	case 0x10ec0256:
>> +	case 0x10ec0257:
>>  	case 0x10ec0282:
>>  	case 0x10ec0283:
>>  	case 0x10ec0286:
>> @@ -2746,6 +2747,7 @@ enum {
>>  	ALC269_TYPE_ALC298,
>>  	ALC269_TYPE_ALC255,
>>  	ALC269_TYPE_ALC256,
>> +	ALC269_TYPE_ALC257,
>>  	ALC269_TYPE_ALC215,
>>  	ALC269_TYPE_ALC225,
>>  	ALC269_TYPE_ALC294,
>> @@ -2779,6 +2781,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
>>  	case ALC269_TYPE_ALC298:
>>  	case ALC269_TYPE_ALC255:
>>  	case ALC269_TYPE_ALC256:
>> +	case ALC269_TYPE_ALC257:
>>  	case ALC269_TYPE_ALC215:
>>  	case ALC269_TYPE_ALC225:
>>  	case ALC269_TYPE_ALC294:
>> @@ -6832,6 +6835,10 @@ static int patch_alc269(struct hda_codec *codec)
>>  		spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
>>  		alc_update_coef_idx(codec, 0x36, 1 << 13, 1 << 5); /* Switch pcbeep path to Line in path*/
>>  		break;
>> +	case 0x10ec0257:
>> +		spec->codec_variant = ALC269_TYPE_ALC257;
>> +		spec->gen.mixer_nid = 0;
>> +		break;
>>  	case 0x10ec0215:
>>  	case 0x10ec0285:
>>  	case 0x10ec0289:
>> @@ -7879,6 +7886,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
>>  	HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
>>  	HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
>>  	HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
>> +	HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
>>  	HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
>>  	HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262),
>>  	HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268),
>>
>
Shrirang Bagul Dec. 19, 2017, 4:19 a.m. UTC | #3
On Tue, 2017-12-19 at 10:21 +0800, Hui Wang wrote:
> From: Kailang Yang <kailang@realtek.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1738911
> 
> Add new support for ALC257 codec.
> 
> [ It's supposed to be almost equivalent with other ALC25x variants,
>   just adding another type and id -- tiwai ]
> 
> Signed-off-by: Kailang Yang <kailang@realtek.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (cherry picked from commit f429e7e494afaded76e62c6f98211a635aa03098)
> Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Shrirang Bagul <shrirang.bagul@canonical.com>
> ---
>  sound/pci/hda/patch_realtek.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
Hui Wang Dec. 19, 2017, 4:41 a.m. UTC | #4
Forgot to CC Timo.

On 2017年12月19日 10:21, Hui Wang wrote:
> From: Kailang Yang <kailang@realtek.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1738911
>
> Add new support for ALC257 codec.
>
> [ It's supposed to be almost equivalent with other ALC25x variants,
>    just adding another type and id -- tiwai ]
>
> Signed-off-by: Kailang Yang <kailang@realtek.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (cherry picked from commit f429e7e494afaded76e62c6f98211a635aa03098)
> Signed-off-by: Hui Wang <hui.wang@canonical.com>
> ---
>   sound/pci/hda/patch_realtek.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 3b07373..9ce42a1 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -330,6 +330,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
>   	case 0x10ec0236:
>   	case 0x10ec0255:
>   	case 0x10ec0256:
> +	case 0x10ec0257:
>   	case 0x10ec0282:
>   	case 0x10ec0283:
>   	case 0x10ec0286:
> @@ -2746,6 +2747,7 @@ enum {
>   	ALC269_TYPE_ALC298,
>   	ALC269_TYPE_ALC255,
>   	ALC269_TYPE_ALC256,
> +	ALC269_TYPE_ALC257,
>   	ALC269_TYPE_ALC215,
>   	ALC269_TYPE_ALC225,
>   	ALC269_TYPE_ALC294,
> @@ -2779,6 +2781,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
>   	case ALC269_TYPE_ALC298:
>   	case ALC269_TYPE_ALC255:
>   	case ALC269_TYPE_ALC256:
> +	case ALC269_TYPE_ALC257:
>   	case ALC269_TYPE_ALC215:
>   	case ALC269_TYPE_ALC225:
>   	case ALC269_TYPE_ALC294:
> @@ -6832,6 +6835,10 @@ static int patch_alc269(struct hda_codec *codec)
>   		spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
>   		alc_update_coef_idx(codec, 0x36, 1 << 13, 1 << 5); /* Switch pcbeep path to Line in path*/
>   		break;
> +	case 0x10ec0257:
> +		spec->codec_variant = ALC269_TYPE_ALC257;
> +		spec->gen.mixer_nid = 0;
> +		break;
>   	case 0x10ec0215:
>   	case 0x10ec0285:
>   	case 0x10ec0289:
> @@ -7879,6 +7886,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
>   	HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
>   	HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
>   	HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
> +	HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
>   	HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
>   	HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262),
>   	HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268),
diff mbox series

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3b07373..9ce42a1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -330,6 +330,7 @@  static void alc_fill_eapd_coef(struct hda_codec *codec)
 	case 0x10ec0236:
 	case 0x10ec0255:
 	case 0x10ec0256:
+	case 0x10ec0257:
 	case 0x10ec0282:
 	case 0x10ec0283:
 	case 0x10ec0286:
@@ -2746,6 +2747,7 @@  enum {
 	ALC269_TYPE_ALC298,
 	ALC269_TYPE_ALC255,
 	ALC269_TYPE_ALC256,
+	ALC269_TYPE_ALC257,
 	ALC269_TYPE_ALC215,
 	ALC269_TYPE_ALC225,
 	ALC269_TYPE_ALC294,
@@ -2779,6 +2781,7 @@  static int alc269_parse_auto_config(struct hda_codec *codec)
 	case ALC269_TYPE_ALC298:
 	case ALC269_TYPE_ALC255:
 	case ALC269_TYPE_ALC256:
+	case ALC269_TYPE_ALC257:
 	case ALC269_TYPE_ALC215:
 	case ALC269_TYPE_ALC225:
 	case ALC269_TYPE_ALC294:
@@ -6832,6 +6835,10 @@  static int patch_alc269(struct hda_codec *codec)
 		spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
 		alc_update_coef_idx(codec, 0x36, 1 << 13, 1 << 5); /* Switch pcbeep path to Line in path*/
 		break;
+	case 0x10ec0257:
+		spec->codec_variant = ALC269_TYPE_ALC257;
+		spec->gen.mixer_nid = 0;
+		break;
 	case 0x10ec0215:
 	case 0x10ec0285:
 	case 0x10ec0289:
@@ -7879,6 +7886,7 @@  static const struct hda_device_id snd_hda_id_realtek[] = {
 	HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
 	HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
 	HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
+	HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
 	HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
 	HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262),
 	HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268),