From: Takashi Iwai Subject: Re: [PATCH] hda: Advanced power management for codecs. Date: Mon, 07 Jan 2008 18:34:29 +0100 Message-ID: References: <478256D8.1050007@embeddedalley.com> <47826205.9060002@embeddedalley.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 5E8012494A for ; Mon, 7 Jan 2008 18:34:29 +0100 (CET) In-Reply-To: <47826205.9060002@embeddedalley.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Matthew Ranostay Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 07 Jan 2008 12:31:49 -0500, Matthew Ranostay wrote: > > >> @@ -2830,7 +2883,12 @@ static void stac92xx_hp_detect(struct hd > >> for (i = 0; i < cfg->speaker_outs; i++) > >> stac92xx_set_pinctl(codec, cfg->speaker_pins[i], > >> AC_PINCTL_OUT_EN); > >> - } > >> + for (i = 0; i < cfg->hp_outs; i++) > >> + pwr_state |= 1 << (cfg->hp_pins[i] - 0xa); > >> + } > >> + > >> + /* power down unused ports */ > >> + snd_hda_codec_write(codec, codec->afg, 0, 0x7ec, pwr_state); > >> > > > > Is this verb available on every STAC codec? I took a look at some > > specs but they don't show this verb at all. > > > Ah no this a new one for recent codecs, probably need to some sort of > check for this. Or is it equivalent to power down each unused pin widget? If so, we can do it somehow better in the common code. Takashi