* [PATCH] ALSA: HDA: Fix naming of input jacks for IDT parser
@ 2011-10-03 14:45 David Henningsson
2011-10-03 15:27 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: David Henningsson @ 2011-10-03 14:45 UTC (permalink / raw)
To: Takashi Iwai, ALSA Development Mailing List
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
Actually, it's just Sigmatel that wants to make things its own way,
making life harder for us in userspace. Make the driver more uniform by
removing this code.
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
[-- Attachment #2: 0001-ALSA-HDA-Fix-naming-of-input-jacks-for-IDT-parser.patch --]
[-- Type: text/x-patch, Size: 1574 bytes --]
>From c883421ded828cec42ab90e55b36811593f2012e Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Mon, 3 Oct 2011 16:25:42 +0200
Subject: [PATCH] ALSA: HDA: Fix naming of input jacks for IDT parser
The Sigmatel/IDT parser should have the same naming convention
for input jacks as the other codecs have.
BugLink: http://bugs.launchpad.net/bugs/859704
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
sound/pci/hda/patch_sigmatel.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 987e3cf..dd977b6 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4130,22 +4130,14 @@ static int stac92xx_add_jack(struct hda_codec *codec,
#ifdef CONFIG_SND_HDA_INPUT_JACK
int def_conf = snd_hda_codec_get_pincfg(codec, nid);
int connectivity = get_defcfg_connect(def_conf);
- char name[32];
- int err;
if (connectivity && connectivity != AC_JACK_PORT_FIXED)
return 0;
- snprintf(name, sizeof(name), "%s at %s %s Jack",
- snd_hda_get_jack_type(def_conf),
- snd_hda_get_jack_connectivity(def_conf),
- snd_hda_get_jack_location(def_conf));
-
- err = snd_hda_input_jack_add(codec, nid, type, name);
- if (err < 0)
- return err;
-#endif /* CONFIG_SND_HDA_INPUT_JACK */
+ return snd_hda_input_jack_add(codec, nid, type, NULL);
+#else
return 0;
+#endif /* CONFIG_SND_HDA_INPUT_JACK */
}
static int stac_add_event(struct sigmatel_spec *spec, hda_nid_t nid,
--
1.7.5.4
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: HDA: Fix naming of input jacks for IDT parser
2011-10-03 14:45 [PATCH] ALSA: HDA: Fix naming of input jacks for IDT parser David Henningsson
@ 2011-10-03 15:27 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2011-10-03 15:27 UTC (permalink / raw)
To: David Henningsson; +Cc: ALSA Development Mailing List
At Mon, 03 Oct 2011 16:45:00 +0200,
David Henningsson wrote:
>
> Actually, it's just Sigmatel that wants to make things its own way,
> making life harder for us in userspace. Make the driver more uniform by
> removing this code.
Thanks, applied.
Takashi
>
> --
> David Henningsson, Canonical Ltd.
> http://launchpad.net/~diwic
> [2 0001-ALSA-HDA-Fix-naming-of-input-jacks-for-IDT-parser.patch <text/x-patch (7bit)>]
> >From c883421ded828cec42ab90e55b36811593f2012e Mon Sep 17 00:00:00 2001
> From: David Henningsson <david.henningsson@canonical.com>
> Date: Mon, 3 Oct 2011 16:25:42 +0200
> Subject: [PATCH] ALSA: HDA: Fix naming of input jacks for IDT parser
>
> The Sigmatel/IDT parser should have the same naming convention
> for input jacks as the other codecs have.
>
> BugLink: http://bugs.launchpad.net/bugs/859704
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
> ---
> sound/pci/hda/patch_sigmatel.c | 14 +++-----------
> 1 files changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
> index 987e3cf..dd977b6 100644
> --- a/sound/pci/hda/patch_sigmatel.c
> +++ b/sound/pci/hda/patch_sigmatel.c
> @@ -4130,22 +4130,14 @@ static int stac92xx_add_jack(struct hda_codec *codec,
> #ifdef CONFIG_SND_HDA_INPUT_JACK
> int def_conf = snd_hda_codec_get_pincfg(codec, nid);
> int connectivity = get_defcfg_connect(def_conf);
> - char name[32];
> - int err;
>
> if (connectivity && connectivity != AC_JACK_PORT_FIXED)
> return 0;
>
> - snprintf(name, sizeof(name), "%s at %s %s Jack",
> - snd_hda_get_jack_type(def_conf),
> - snd_hda_get_jack_connectivity(def_conf),
> - snd_hda_get_jack_location(def_conf));
> -
> - err = snd_hda_input_jack_add(codec, nid, type, name);
> - if (err < 0)
> - return err;
> -#endif /* CONFIG_SND_HDA_INPUT_JACK */
> + return snd_hda_input_jack_add(codec, nid, type, NULL);
> +#else
> return 0;
> +#endif /* CONFIG_SND_HDA_INPUT_JACK */
> }
>
> static int stac_add_event(struct sigmatel_spec *spec, hda_nid_t nid,
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-03 15:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 14:45 [PATCH] ALSA: HDA: Fix naming of input jacks for IDT parser David Henningsson
2011-10-03 15:27 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).