> -----Original Message----- > From: Alan Cox [mailto:[email protected]] > Sent: Thursday, March 24, 2011 6:08 PM > To: Lu, Guanqun > Cc: [email protected]; [email protected]; 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 <[email protected]> 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" <[email protected]> > > CC: "Kp, Jeeja" <[email protected]> > > Signed-off-by: Lu Guanqun <[email protected]> > > Signed-off-by: Wang Xingchao <[email protected]> > > --- > > 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); _______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
