[Meego-kernel] [PATCH 4/4] sst: power on/off internal speaker on demand
Lu, Guanqun
guanqun.lu at intel.com
Thu Mar 24 05:15:45 PDT 2011
> -----Original Message-----
> From: Alan Cox [mailto:alan at linux.intel.com]
> Sent: Thursday, March 24, 2011 6:08 PM
> To: Lu, Guanqun
> Cc: meego-kernel at lists.meego.com; arjan at linux.intel.com; Wu, Fengguang;
> Tang, Feng; Fu, Michael; Wang, Xingchao; Koul, Vinod; Kp, Jeeja
> Subject: Re: [PATCH 4/4] sst: power on/off internal speaker on demand
>
> On Thu, 24 Mar 2011 15:53:47 +0800
> Lu Guanqun <guanqun.lu at intel.com> wrote:
>
> > Sometimes setting mute alone can't shut up the internal speakers,
> > better to power off/on it on demand
>
> Randomly poking unallocated gpio lines isn't acceptable and the patch
> doesn't apply anyway.
Hi Alan,
This patch doesn't apply to your tree cleanly because there are some lines add by Arjan's patch tree.
Should this patch better go to Arjan's patch tree?
>
> Allocate the GPIO lines properly, set their direction, use a define for
> the name (or look it up if it has a proper name) and deallocate them
> when/if the device is unloaded.
>
>
> >
> > CC: "Koul, Vinod" <vinod.koul at intel.com>
> > CC: "Kp, Jeeja" <jeeja.kp at intel.com>
> > Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
> > Signed-off-by: Wang Xingchao <xingchao.wang at intel.com>
> > ---
> > drivers/staging/intel_sst/intelmid_v2_control.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/staging/intel_sst/intelmid_v2_control.c
> > b/drivers/staging/intel_sst/intelmid_v2_control.c index
> > 61a9dab..a63c566 100644 ---
> > a/drivers/staging/intel_sst/intelmid_v2_control.c +++
> > b/drivers/staging/intel_sst/intelmid_v2_control.c @@ -532,6 +532,8 @@
> > static int nc_set_selected_output_dev(u8 value) switch (value) {
> > case STEREO_HEADPHONE:
> > retval = sst_sc_reg_access(sc_access_HP, PMIC_WRITE,
> > 2);
> > + /* power off the internal speaker */
> > + gpio_set_value(64+16+2, 0);
> > break;
> > /* There is a mismatch between Playback Sources and the
> > enumerated values of output sources.
> > * This mismatch causes ALSA upper to send Item 1 for
> > Internal Speaker, but the expected enumeration is 2! @@ -540,6 +542,8
> > @@ static int nc_set_selected_output_dev(u8 value) case
> MONO_EARPIECE:
> > case INTERNAL_SPKR:
> > retval = sst_sc_reg_access(sc_access_IS, PMIC_WRITE,
> > 2);
> > + /* power on the internal speaker */
> > + gpio_set_value(64+16+2, 1);
> > break;
> > default:
> > pr_err("sst: rcvd illegal request: %d\n", value);
More information about the MeeGo-kernel
mailing list