[JAUNTY] SRU: #332506 ALSA: hda - Split ALC268 acer model.

Tim Gardner tim.gardner at canonical.com
Wed May 13 15:56:43 UTC 2009


Manoj Iyer wrote:
> SRU JUSTIFICATION:
> 
> IMPACT: digital mics in alsa driver HDA intel (Realtek ALC268 Codec) not 
> supported.
> FIX: Created a new model, acer-dmic (Realtek ALC268 Codec)
> TEST: The kernel in http://people.ubuntu.com/~manjo/lp332506-jaunty/ was 
> tested by originator and verified to work.
> 
> 
> The following changes since commit 
> a2a9589ca6f4a181c2abe7e93ac566ee41ec2754:
>    Stefan Bader (1):
>          UBUNTU: Update commit templates to use BugLink instead of Bug
> 
> are available in the git repository at:
> 
>    git://kernel.ubuntu.com/manjo/ubuntu-jaunty.git lp332506
> 
> Takashi Iwai (1):
>        ALSA: hda - Split ALC268 acer model
> 
>   Documentation/sound/alsa/ALSA-Configuration.txt |    1 +
>   sound/pci/hda/patch_realtek.c                   |   44 
> +++++++++++++++++++++++
>   2 files changed, 45 insertions(+), 0 deletions(-)
> From 72f0c67b89043a0e17bf66e1631891c1b3d47aa0 Mon Sep 17 00:00:00 2001
> From: Takashi Iwai <tiwai at suse.de>
> Date: Wed, 5 Nov 2008 14:57:20 +0100
> Subject: [PATCH] ALSA: hda - Split ALC268 acer model
> 
> BUG: 332506
> BUGLINK: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/332506
> 
> There are actually two variants of ALC268 Acer implementation, one
> with an analog built-in mic (pin 0x19) and another with a digital
> mic (pin 0x12).  Created a new model, acer-dmic, for the latter case
> now.
> 
> So far, all known models are assigned to be analog-mic, according to
> the BIOS setup.  If this doesn't match with the actual case, one needs
> to try model=acer-dmic, and fix the entry to point ALC268_ACER_DMIC
> if it works.
> 
> Signed-off-by: Takashi Iwai <tiwai at suse.de>
> (cherry picked from commit c238b4f4038e0e49bb241640610584a088b268b1)
> 
> Signed-off-by: Manoj Iyer <manoj.iyer at canonical.com>
> ---
>   Documentation/sound/alsa/ALSA-Configuration.txt |    1 +
>   sound/pci/hda/patch_realtek.c                   |   44 +++++++++++++++++++++++
>   2 files changed, 45 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
> index adb4ca4..d07dd0b 100644
> --- a/Documentation/sound/alsa/ALSA-Configuration.txt
> +++ b/Documentation/sound/alsa/ALSA-Configuration.txt
> @@ -844,6 +844,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
>   	  3stack	3-stack model
>   	  toshiba	Toshiba A205
>   	  acer		Acer laptops
> +	  acer-dmic	Acer laptops with digital-mic
>   	  acer-aspire	Acer Aspire One
>   	  dell		Dell OEM laptops (Vostro 1200)
>   	  zepto		Zepto laptops
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index a4422e5..7f18e88 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -114,6 +114,7 @@ enum {
>   	ALC268_3ST,
>   	ALC268_TOSHIBA,
>   	ALC268_ACER,
> +	ALC268_ACER_DMIC,
>   	ALC268_ACER_ASPIRE_ONE,
>   	ALC268_DELL,
>   	ALC268_ZEPTO,
> @@ -10975,6 +10976,22 @@ static struct snd_kcontrol_new alc268_acer_mixer[] = {
>   	{ }
>   };
> 
> +static struct snd_kcontrol_new alc268_acer_dmic_mixer[] = {
> +	/* output mixer control */
> +	HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
> +	{
> +		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
> +		.name = "Master Playback Switch",
> +		.info = snd_hda_mixer_amp_switch_info,
> +		.get = snd_hda_mixer_amp_switch_get,
> +		.put = alc268_acer_master_sw_put,
> +		.private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
> +	},
> +	HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
> +	HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT),
> +	{ }
> +};
> +
>   static struct hda_verb alc268_acer_aspire_one_verbs[] = {
>   	{0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
>   	{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
> @@ -11307,6 +11324,15 @@ static struct hda_input_mux alc268_acer_capture_source = {
>   	.num_items = 3,
>   	.items = {
>   		{ "Mic", 0x0 },
> +		{ "Internal Mic", 0x1 },
> +		{ "Line", 0x2 },
> +	},
> +};
> +
> +static struct hda_input_mux alc268_acer_dmic_capture_source = {
> +	.num_items = 3,
> +	.items = {
> +		{ "Mic", 0x0 },
>   		{ "Internal Mic", 0x6 },
>   		{ "Line", 0x2 },
>   	},
> @@ -11587,6 +11613,7 @@ static const char *alc268_models[ALC268_MODEL_LAST] = {
>   	[ALC268_3ST]		= "3stack",
>   	[ALC268_TOSHIBA]	= "toshiba",
>   	[ALC268_ACER]		= "acer",
> +	[ALC268_ACER_DMIC]	= "acer-dmic",
>   	[ALC268_ACER_ASPIRE_ONE]	= "acer-aspire",
>   	[ALC268_DELL]		= "dell",
>   	[ALC268_ZEPTO]		= "zepto",
> @@ -11683,6 +11710,23 @@ static struct alc_config_preset alc268_presets[] = {
>   		.unsol_event = alc268_acer_unsol_event,
>   		.init_hook = alc268_acer_init_hook,
>   	},
> +	[ALC268_ACER_DMIC] = {
> +		.mixers = { alc268_acer_dmic_mixer, alc268_capture_alt_mixer,
> +			    alc268_beep_mixer },
> +		.init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
> +				alc268_acer_verbs },
> +		.num_dacs = ARRAY_SIZE(alc268_dac_nids),
> +		.dac_nids = alc268_dac_nids,
> +		.num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt),
> +		.adc_nids = alc268_adc_nids_alt,
> +		.capsrc_nids = alc268_capsrc_nids,
> +		.hp_nid = 0x02,
> +		.num_channel_mode = ARRAY_SIZE(alc268_modes),
> +		.channel_mode = alc268_modes,
> +		.input_mux = &alc268_acer_dmic_capture_source,
> +		.unsol_event = alc268_acer_unsol_event,
> +		.init_hook = alc268_acer_init_hook,
> +	},
>   	[ALC268_ACER_ASPIRE_ONE] = {
>   		.mixers = { alc268_acer_aspire_one_mixer,
>   				alc268_capture_alt_mixer },

ACK

-- 
Tim Gardner tim.gardner at canonical.com




More information about the kernel-team mailing list