From: Takashi Iwai <tiwai@suse.de>
To: Matthew Ranostay <mranostay@embeddedalley.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] hda: 92HD7XXX power management support
Date: Wed, 09 Jan 2008 18:02:16 +0100 [thread overview]
Message-ID: <s5hejcr3pbb.wl%tiwai@suse.de> (raw)
In-Reply-To: <4784F91C.9000504@embeddedalley.com>
At Wed, 09 Jan 2008 11:41:00 -0500,
Matthew Ranostay wrote:
>
> @@ -714,6 +728,8 @@ static struct snd_kcontrol_new stac92hd7
>
> HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT),
> HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT),
> +
> + HDA_CODEC_MUTE_MONO("Mono Switch", 0x14, 0x1, 0, HDA_INPUT),
> { } /* end */
> };
>
> @@ -728,6 +744,8 @@ static struct snd_kcontrol_new stac92hd7
> HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x1d, 0x0, HDA_OUTPUT),
> HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x1d, 0x0, HDA_OUTPUT),
> HDA_CODEC_VOLUME_IDX("Capture Mux Volume", 0x1, 0x1b, 0x0, HDA_OUTPUT),
> +
> + HDA_CODEC_MUTE_MONO("Mono Switch", 0x14, 0x1, 0, HDA_INPUT),
> { } /* end */
> };
These have been already applied to HG tree. Please update your repo
(maybe better from hg.alsa-project.org).
> @@ -2651,11 +2669,26 @@ static void enable_pin_detect(struct hda
> static void enable_pin_detect(struct hda_codec *codec, hda_nid_t nid,
> unsigned int event)
> {
> + int pinctl = snd_hda_codec_read(codec, nid, 0,
> + AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
> + if (pinctl & AC_PINCTL_IN_EN)
> + return;
> +
Hm, what about the multi-directional pins (such as line-in/surround
shared pin)? Maybe it's not for 92HDxxx codecs, but...
> @@ -2696,6 +2729,14 @@ static int stac92xx_init(struct hda_code
> for (i = 0; i < spec->num_dmics; i++)
> stac92xx_auto_set_pinctl(codec, spec->dmic_nids[i],
> AC_PINCTL_IN_EN);
> + if (spec->num_pwrs > 0) {
This if is unnecessary.
> @@ -3076,6 +3144,9 @@ again:
> spec->gpio_mask = spec->gpio_data = 0x000001;
> stac92xx_enable_gpio_mask(codec);
>
> + spec->num_pwrs = 8;
Better to use ARRAY_SIZE().
> + spec->pwr_nids = stac92hd73xx_pwr_nids;
> +
> err = stac92xx_parse_auto_config(codec, 0x22, 0x24);
>
> if (!err) {
> @@ -3157,6 +3228,9 @@ again:
> spec->num_adcs = ARRAY_SIZE(stac92hd71bxx_adc_nids);
> spec->num_dmics = STAC92HD71BXX_NUM_DMICS;
> spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids);
> +
> + spec->num_pwrs = 3;
Ditto.
Thanks,
Takashi
next prev parent reply other threads:[~2008-01-09 17:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 16:41 [PATCH] hda: 92HD7XXX power management support Matthew Ranostay
2008-01-09 17:02 ` Takashi Iwai [this message]
2008-01-10 15:33 ` Matthew Ranostay
2008-01-10 15:42 ` Takashi Iwai
2008-01-10 15:53 ` Matthew Ranostay
2008-01-10 15:58 ` 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=s5hejcr3pbb.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=mranostay@embeddedalley.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.