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. 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
