Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/5] ALSA: hda - Rearrange INPUT_PIN_ATTR_*
Date: Fri, 30 Nov 2012 00:54:27 +0100	[thread overview]
Message-ID: <50B7F5B3.1030206@canonical.com> (raw)
In-Reply-To: <1354202489-12769-2-git-send-email-tiwai@suse.de>

On 11/29/2012 04:21 PM, Takashi Iwai wrote:
> Put INPUT_PIN_ATTR_FRONT after INPUT_PIN_ATTR_REAR, and define
> INPUT_PIN_ATTR_LAST to point to the last element.
>
> This is a preliminary work for cleaning up Realtek auto-mic parser.

What practical effect does switching "Rear Mic" and "Front Mic" actually 
have?



>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>   sound/pci/hda/hda_auto_parser.c | 2 +-
>   sound/pci/hda/hda_auto_parser.h | 3 ++-
>   sound/pci/hda/patch_via.c       | 2 +-
>   3 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
> index 4ec6dc8..90d5b39 100644
> --- a/sound/pci/hda/hda_auto_parser.c
> +++ b/sound/pci/hda/hda_auto_parser.c
> @@ -375,7 +375,7 @@ static const char *hda_get_input_pin_label(struct hda_codec *codec,
>   {
>   	unsigned int def_conf;
>   	static const char * const mic_names[] = {
> -		"Internal Mic", "Dock Mic", "Mic", "Front Mic", "Rear Mic",
> +		"Internal Mic", "Dock Mic", "Mic", "Rear Mic", "Front Mic"
>   	};
>   	int attr;
>
> diff --git a/sound/pci/hda/hda_auto_parser.h b/sound/pci/hda/hda_auto_parser.h
> index 632ad0a..b7d7103 100644
> --- a/sound/pci/hda/hda_auto_parser.h
> +++ b/sound/pci/hda/hda_auto_parser.h
> @@ -51,8 +51,9 @@ enum {
>   	INPUT_PIN_ATTR_INT,	/* internal mic/line-in */
>   	INPUT_PIN_ATTR_DOCK,	/* docking mic/line-in */
>   	INPUT_PIN_ATTR_NORMAL,	/* mic/line-in jack */
> -	INPUT_PIN_ATTR_FRONT,	/* mic/line-in jack in front */
>   	INPUT_PIN_ATTR_REAR,	/* mic/line-in jack in rear */
> +	INPUT_PIN_ATTR_FRONT,	/* mic/line-in jack in front */
> +	INPUT_PIN_ATTR_LAST = INPUT_PIN_ATTR_FRONT,
>   };
>
>   int snd_hda_get_input_pin_attr(unsigned int def_conf);
> diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
> index 274644f..9f04f33 100644
> --- a/sound/pci/hda/patch_via.c
> +++ b/sound/pci/hda/patch_via.c
> @@ -1894,7 +1894,7 @@ static void mangle_smart51(struct hda_codec *codec)
>   	int i, j, nums, attr;
>   	int pins[AUTO_CFG_MAX_INS];
>
> -	for (attr = INPUT_PIN_ATTR_REAR; attr >= INPUT_PIN_ATTR_NORMAL; attr--) {
> +	for (attr = INPUT_PIN_ATTR_LAST; attr >= INPUT_PIN_ATTR_NORMAL; attr--) {
>   		nums = 0;
>   		for (i = 0; i < cfg->num_inputs; i++) {
>   			unsigned int def;
>



-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

  reply	other threads:[~2012-11-29 23:54 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 15:21 [PATCH 0/5] Realtek auto-mic enhancements / cleanups Takashi Iwai
2012-11-29 15:21 ` [PATCH 1/5] ALSA: hda - Rearrange INPUT_PIN_ATTR_* Takashi Iwai
2012-11-29 23:54   ` David Henningsson [this message]
2012-11-30  7:03     ` Takashi Iwai
2012-11-30  7:31       ` David Henningsson
2012-11-29 15:21 ` [PATCH 2/5] ALSA: hda - More generic auto-mic switching for Realtek codecs Takashi Iwai
2012-11-30  0:11   ` David Henningsson
2012-11-30  7:17     ` Takashi Iwai
2012-11-30  7:54       ` David Henningsson
2012-12-02  1:55   ` Raymond Yau
2012-12-03  8:52     ` Takashi Iwai
2012-12-03 10:55       ` Takashi Iwai
2012-11-29 15:21 ` [PATCH 3/5] ALSA: hda - Use standard sort function in hda_auto_parser.c Takashi Iwai
2012-11-29 15:21 ` [PATCH 4/5] ALSA: hda - Implement shared front mic/hp jack for HP Z220 Takashi Iwai
2012-11-30  0:33   ` David Henningsson
2012-11-30  7:57     ` Takashi Iwai
2012-11-30  8:46       ` David Henningsson
2012-11-30  9:39         ` Takashi Iwai
2012-11-30 10:12           ` Takashi Iwai
2012-12-03 13:43           ` David Henningsson
2012-12-03 14:07             ` Takashi Iwai
2012-12-03 14:47               ` David Henningsson
2012-12-03 15:04                 ` Takashi Iwai
2012-12-04 13:11                   ` David Henningsson
2012-12-04 13:45                     ` Takashi Iwai
2012-12-04  2:48         ` Raymond Yau
2012-11-30  7:21   ` Raymond Yau
2012-11-30  7:59     ` Takashi Iwai
2012-12-05  8:20       ` Raymond Yau
2012-12-05  8:27         ` Takashi Iwai
2012-11-29 15:21 ` [PATCH 5/5] ALSA: hda - Refactor alc_kcontrol_new() usages Takashi Iwai
2012-11-30  8:15 ` [PATCH 0/5] More patches for Relatek auto-mic things Takashi Iwai
2012-11-30  8:15   ` [PATCH 1/5] ALSA: hda - Create Capture Source enum even for auto-mic mode Takashi Iwai
2012-11-30  8:16   ` [PATCH 2/5] ALSA: hda - Add Auto-Mic Mode enum to Realtek codecs Takashi Iwai
2012-11-30  8:16   ` [PATCH 3/5] ALSA: hda - Disable auto-mic as default for non-laptop machines Takashi Iwai
2012-11-30  8:16   ` [PATCH 4/5] ALSA: hda - Pass errors properly in alc_auto_check_switches() Takashi Iwai
2012-11-30  8:16   ` [PATCH 5/5] ALSA: hda - Activate Capture Source selection only when auto_mic=0 Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B7F5B3.1030206@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox