From: Li Bo Subject: Re: [PATCH 8/31] HDA patch_via.c: Change VT1708S & VT1702 hp mode controls Date: Wed, 7 Oct 2009 14:01:51 +0800 Message-ID: <16685ee0910062301w1f372f88r24d17e78491bfbbb@mail.gmail.com> References: <16685ee0910050725u67cdf3b5g8dcd20275bcf773f@mail.gmail.com> <16685ee0910052144r444996bdqee29f374207cd7@mail.gmail.com> <16685ee0910060855i1e6dc4c5mf2ec443e71745b7@mail.gmail.com> <16685ee0910061042u68bb6822p12a37f942ec5bafa@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-bw0-f225.google.com (mail-bw0-f225.google.com [209.85.218.225]) by alsa0.perex.cz (Postfix) with ESMTP id CA9D31037F8 for ; Wed, 7 Oct 2009 08:01:51 +0200 (CEST) Received: by bwz25 with SMTP id 25so14164585bwz.32 for ; Tue, 06 Oct 2009 23:01:51 -0700 (PDT) In-Reply-To: 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: Takashi Iwai Cc: LoganLi@viatech.com.cn, alsa-devel@alsa-project.org, HaraldWelte@viatech.com, lydiawang@viatech.com.cn List-Id: alsa-devel@alsa-project.org On Wed, Oct 7, 2009 at 2:03 AM, Takashi Iwai wrote: > At Wed, 7 Oct 2009 01:42:50 +0800, > Li Bo wrote: >> >> On Tue, Oct 6, 2009 at 11:55 PM, Li Bo wrote: >> > On Tue, Oct 6, 2009 at 1:47 PM, Takashi Iwai wrote: >> >> At Tue, 6 Oct 2009 12:44:28 +0800, >> >> Li Bo wrote: >> >>> >> >>> Hi, Takashi >> >>> =A0 When independent hp switches from >> >>> =A0 =A0 =A0 =A0 =A0 on -> off: hp volume/switch is deactivated >> >>> =A0 =A0 =A0 =A0 =A0 off -> hp volume switch =A0is activated >> >>> =A0 These 2 actions are one-shot setup, so we put "need reboot" to r= emind user >> >>> =A0 that hp volume/switch update will only take effect after reboot. >> >> >> >> First off, you don't have to "reboot" at all :) >> >> >> > >> > I also want to kick that "reboot" off:) >> > >> >> And, the activation/deactivation can be done on the fly, so it's no >> >> more "one-shot" action (if implemented properly). >> >> >> >> >> >> Takashi >> >> >> > >> > You mean just act/deact on via_independent_hp_put? I'll try and update= this, >> > thank you! >> > >> Sorry I don't know how to activate/deactivate on the fly. I toggle acces= s' >> SNDRV_CTL_ELEM_ACCESS_INACTIVE bit in via_independent_hp_put, but >> in alsamixer it cannot reflect the change unless restart it. Please >> give some help. > > You simply need to notify the control elements you changed via > snd_ctl_notify(). > Then the mixer app will update the status as well. > > > Takashi > I add snd_ctl_notify after access update, but test with results that: - alsamixer (v1.0.21) will gray/de-grayed the control only after restart the application - gnome-volume-control will just ignore the access bit and display the control as usual. Maybe we have to backward to snd_ctl_remove implementation.