mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]Add VT1613 AC97 codec support
@ 2015-03-06 15:59 Maciej S. Szmigiero
  2015-03-06 16:03 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Maciej S. Szmigiero @ 2015-03-06 15:59 UTC (permalink / raw)
  To: alsa-devel; +Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai

Patch to add an VT1613 AC97 codec support.

This codec has additional DC offset removal control,
headphone output and no video input.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>

diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 5ee2f17..5bca1a3 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -177,6 +177,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
 { 0x54524123, 0xffffffff, "TR28602",		NULL,		NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)]
 { 0x54584e03, 0xffffffff, "TLV320AIC27",	NULL,		NULL },
 { 0x54584e20, 0xffffffff, "TLC320AD9xC",	NULL,		NULL },
+{ 0x56494120, 0xfffffff0, "VIA1613",		patch_vt1613,	NULL },
 { 0x56494161, 0xffffffff, "VIA1612A",		NULL,		NULL }, // modified ICE1232 with S/PDIF
 { 0x56494170, 0xffffffff, "VIA1617A",		patch_vt1617a,	NULL }, // modified VT1616 with S/PDIF
 { 0x56494182, 0xffffffff, "VIA1618",		patch_vt1618,   NULL },
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index ceaac1c..eca2210 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -3352,6 +3352,39 @@ static int patch_cm9780(struct snd_ac97 *ac97)
 }
 
 /*
+ * VIA VT1613 codec
+ */
+static const struct snd_kcontrol_new snd_ac97_controls_vt1613[] = {
+AC97_SINGLE("DC Offset removal", 0x5a, 10, 1, 0),
+};
+
+static int patch_vt1613_specific(struct snd_ac97 *ac97)
+{
+	int err;
+
+	err = patch_build_controls(ac97, &snd_ac97_controls_vt1613[0],
+				ARRAY_SIZE(snd_ac97_controls_vt1613));
+	if (err)
+		return err;
+
+	return 0;
+};
+
+static const struct snd_ac97_build_ops patch_vt1613_ops = {
+	.build_specific	= patch_vt1613_specific
+};
+
+static int patch_vt1613(struct snd_ac97 *ac97)
+{
+	ac97->build_ops = &patch_vt1613_ops;
+
+	ac97->flags |= AC97_HAS_NO_VIDEO;
+	ac97->caps |= AC97_BC_HEADPHONE;
+
+	return 0;
+}
+
+/*
  * VIA VT1616 codec
  */
 static const struct snd_kcontrol_new snd_ac97_controls_vt1616[] = {


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]Add VT1613 AC97 codec support
  2015-03-06 15:59 [PATCH]Add VT1613 AC97 codec support Maciej S. Szmigiero
@ 2015-03-06 16:03 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2015-03-06 16:03 UTC (permalink / raw)
  To: Maciej S. Szmigiero; +Cc: alsa-devel, linux-kernel, Jaroslav Kysela

At Fri, 06 Mar 2015 16:59:00 +0100,
Maciej S. Szmigiero wrote:
> 
> Patch to add an VT1613 AC97 codec support.
> 
> This codec has additional DC offset removal control,
> headphone output and no video input.
> 
> Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>

Applied, thanks.


Takashi

> 
> diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
> index 5ee2f17..5bca1a3 100644
> --- a/sound/pci/ac97/ac97_codec.c
> +++ b/sound/pci/ac97/ac97_codec.c
> @@ -177,6 +177,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
>  { 0x54524123, 0xffffffff, "TR28602",		NULL,		NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)]
>  { 0x54584e03, 0xffffffff, "TLV320AIC27",	NULL,		NULL },
>  { 0x54584e20, 0xffffffff, "TLC320AD9xC",	NULL,		NULL },
> +{ 0x56494120, 0xfffffff0, "VIA1613",		patch_vt1613,	NULL },
>  { 0x56494161, 0xffffffff, "VIA1612A",		NULL,		NULL }, // modified ICE1232 with S/PDIF
>  { 0x56494170, 0xffffffff, "VIA1617A",		patch_vt1617a,	NULL }, // modified VT1616 with S/PDIF
>  { 0x56494182, 0xffffffff, "VIA1618",		patch_vt1618,   NULL },
> diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
> index ceaac1c..eca2210 100644
> --- a/sound/pci/ac97/ac97_patch.c
> +++ b/sound/pci/ac97/ac97_patch.c
> @@ -3352,6 +3352,39 @@ static int patch_cm9780(struct snd_ac97 *ac97)
>  }
>  
>  /*
> + * VIA VT1613 codec
> + */
> +static const struct snd_kcontrol_new snd_ac97_controls_vt1613[] = {
> +AC97_SINGLE("DC Offset removal", 0x5a, 10, 1, 0),
> +};
> +
> +static int patch_vt1613_specific(struct snd_ac97 *ac97)
> +{
> +	int err;
> +
> +	err = patch_build_controls(ac97, &snd_ac97_controls_vt1613[0],
> +				ARRAY_SIZE(snd_ac97_controls_vt1613));
> +	if (err)
> +		return err;
> +
> +	return 0;
> +};
> +
> +static const struct snd_ac97_build_ops patch_vt1613_ops = {
> +	.build_specific	= patch_vt1613_specific
> +};
> +
> +static int patch_vt1613(struct snd_ac97 *ac97)
> +{
> +	ac97->build_ops = &patch_vt1613_ops;
> +
> +	ac97->flags |= AC97_HAS_NO_VIDEO;
> +	ac97->caps |= AC97_BC_HEADPHONE;
> +
> +	return 0;
> +}
> +
> +/*
>   * VIA VT1616 codec
>   */
>  static const struct snd_kcontrol_new snd_ac97_controls_vt1616[] = {
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-06 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-06 15:59 [PATCH]Add VT1613 AC97 codec support Maciej S. Szmigiero
2015-03-06 16:03 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®