All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Chris Pockele <chris.pockele.f1@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: patch to support Samsung NC10 mini notebook
Date: Mon, 11 May 2009 10:38:42 +0200	[thread overview]
Message-ID: <s5hws8oaval.wl%tiwai@suse.de> (raw)
In-Reply-To: <2b491faa0905101221p6ba903d9kc5be3cc4869f4926@mail.gmail.com>

At Sun, 10 May 2009 21:21:33 +0200,
Chris Pockele wrote:
> 
> Hello,
> 
> The attached file is a patch to support the sound hardware in the
> Samsung NC10 mini notebook.
> The Samsung NC10 is and Intel Atom-based notebook with Realtek ALC272
> HDA codecs.
> Sound is supported partly in Linux depending on ALSA version, but
> there were always some issues (wrong mixer behaviour, PC beep always
> muted, ...). This patch tries to solve most of these issues.
> I updated the patch so it would work using the alsa-driver-20090509
> snapshot from ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/
> (originally developed from alsa-driver-20090416 snapshot).

Thanks for the patch!
After a brief look, the changes look good.  But there are some issues
to be fixed.  See some comments below.

> Fixes:
>  - mute internal speaker / microphone when plugging in external
> headphone / microphone
>  - stereo capture from external microphone
>  - separate volume controls for headphone and internal speakers +
> "Master" for both
>  - "PC Beep" mixer control
>  - "Mic boost" and "External mic boost" controls
>  - ...
> 
> A few issues remaining:
>  - Recording PCM output does not work yet. It works on the version of
> Windows that comes with the NC10.
>  - When choosing recording source "Internal Mic" while an external
> microphone is plugged in, the internal microphone will be used instead
> of the external one, as it should. However, when plugging in the
> external microphone after choosing the recording source setting, it
> WILL override the internal microphone.

First off, please give a text as a change log together with your
sign-off so that the patch can be merged to the upstream.


> diff -ru alsa-driver/alsa-kernel/pci/hda/patch_realtek.c alsa-driver-20090509-MOD/alsa-kernel/pci/hda/patch_realtek.c
> --- alsa-driver/alsa-kernel/pci/hda/patch_realtek.c	2009-05-09 00:05:02.000000000 +0200
> +++ alsa-driver-20090509-MOD/alsa-kernel/pci/hda/patch_realtek.c	2009-05-10 13:07:22.000000000 +0200
> @@ -190,6 +190,7 @@
>  	ALC663_ASUS_MODE6,
>  	ALC272_DELL,
>  	ALC272_DELL_ZM1,
> +	ALC272_SAMSUNG_NC10,	/*20090509 Samsung NC10 support - chris.pockele.f1@gmail.com*/

This kind of comment isn't needed because we track all changes via GIT.

> +#ifndef CONFIG_SND_DEBUG
> +static struct hda_input_mux alc272_nc10_capture_source = {
> +	.num_items = 2,
> +	.items = {
> +		{ "Autoselect Mic", 0x0 },
> +		{ "Internal Mic", 0x1 },
> +	},
> +};
> +#else
> +static struct hda_input_mux alc272_nc10_capture_source = {

CONFIG_SND_DEBUG is set on some distros as default, so the driver
shouldn't change the fundamental behavior by that option.
If you'd like to keep the test code, just comment out with some other
ifdef.   Even an ifdef 0 with a comment would be OK.


> +static struct snd_kcontrol_new alc272_nc10_mixer[] = {
> +	/* Master Playback automatically created from Speaker and Headphone */
> +	HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
> +	HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
> +	HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT),
> +	HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT),
> +
> +	HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
> +	HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
> +	HDA_CODEC_VOLUME("Ext Mic Boost Playback Volume", 0x18, 0, HDA_INPUT),

The mic boost is for both playback and capture.  Thus, simply name it as
"... Mic Boost".

> +	HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
> +	HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
> +	HDA_CODEC_VOLUME("Int Mic Boost Playback Volume", 0x19, 0, HDA_INPUT),

Ditto.

> +};
> +
>  #ifdef CONFIG_SND_HDA_POWER_SAVE
>  #define alc662_loopbacks	alc880_loopbacks
>  #endif
> @@ -16184,6 +16234,9 @@
>  	[ALC663_ASUS_MODE4] = "asus-mode4",
>  	[ALC663_ASUS_MODE5] = "asus-mode5",
>  	[ALC663_ASUS_MODE6] = "asus-mode6",
> +	[ALC272_DELL] = "dell272",
> +	[ALC272_DELL_ZM1] = "dell-zm1",

These models have been already added pretty recently.
Please rebase your patch with the latest snapshot.


> +	[ALC272_SAMSUNG_NC10] = "samsung-nc10",

Also, don't forget to update
Documentation/sound/alsa/HD-Audio-Models.txt, too.


Could you fix the issues above and repost?

thanks,

Takashi

  reply	other threads:[~2009-05-11  8:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-10 19:21 patch to support Samsung NC10 mini notebook Chris Pockele
2009-05-11  8:38 ` Takashi Iwai [this message]
2009-05-11 20:25   ` Chris Pockele
2009-05-12  6:13     ` Takashi Iwai
2009-05-13  7:01       ` 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=s5hws8oaval.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=chris.pockele.f1@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.