summaryrefslogtreecommitdiffstats
path: root/drivers/staging/intel_sst/intelmid_v2_control.c
Commit message (Collapse)AuthorAgeFilesLines
* sst: report correct jack eventLu Guanqun2011-07-081-1/+1
| | | | | | | | | | | | | | | | | | | The status of jack event is compared bitwise: [in sound/core/jack.c:snd_jack_report()] for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) { int testbit = 1 << i; if (jack->type & testbit) input_report_switch(jack->input_dev, jack_switch_types[i], status & testbit); } So in order to report the correct events, 3 should be passed instead of 1. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'staging-next' of ↵Linus Torvalds2011-05-231-35/+184
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (970 commits) staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_ staging:iio: Trivial kconfig reorganization and uniformity improvements. staging:iio:documenation partial update. staging:iio: use pollfunc allocation helpers in remaining drivers. staging:iio:max1363 misc cleanups and use of for_each_bit_set to simplify event code spitting out. staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev. staging:iio:meter:ade7758: Use private data space from iio_allocate_device staging:iio:accel:lis3l02dq make write_reg_8 take value not a pointer to value. staging:iio: ring core cleanups + check if read_last available in lis3l02dq staging:iio:core cleanup: squash tiny wrappers and use dev_set_name to handle creation of event interface name. staging:iio: poll func allocation clean up. staging:iio:ad7780 trivial unused header cleanup. staging:iio:adc: AD7780: Use private data space from iio_allocate_device + trivial fixes staging:iio:adc:AD7780: Convert to new channel registration method staging:iio:adc: AD7606: Drop dev_data in favour of iio_priv() staging:iio:adc: AD7606: Consitently use indio_dev staging:iio: Rip out helper for software rings. staging:iio:adc:AD7298: Use private data space from iio_allocate_device staging:iio: rationalization of different buffer implementation hooks. staging:iio:imu:adis16400 avoid allocating rx, tx, and state separately from iio_dev. ... Fix up trivial conflicts in - drivers/staging/intel_sst/intelmid.c: patches applied in both branches - drivers/staging/rt2860/common/cmm_data_{pci,usb}.c: removed vs spelling - drivers/staging/usbip/vhci_sysfs.c: trivial header file inclusion
| * intel_sst: fix output noises when it's not in playbackLu Guanqun2011-05-101-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | When the corresponding output device is not in playback, we can hear a little noises. Fix it by powering on the device only when it's in playback. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Reviewed-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: internal speaker needs setting a GPIO lineLu Guanqun2011-05-101-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | On Moorestown platform, internal speaker's power line is connected to a GPIO line, so we need to enable or disable it properly. Reviewed-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Jeff Cheng <jeff_cheng@wistron.com> Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Wang Xingchao <xingchao.wang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: add Master VolumeLu Guanqun2011-05-101-10/+38
| | | | | | | | | | | | | | | | | | | | With this patch, Master Volume will control AUDIOLVOL(0x10c) and AUDIORVOL(0x10d); while PCM Volume will control HPLVOL(0x123) and HPRVOL(0x124). Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: set default output and input deviceLu Guanqun2011-05-101-0/+2
| | | | | | | | | | | | Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: intelmid_v2_control: correct jack event typeAndy CH Lin2011-05-101-1/+1
| | | | | | | | | | | | | | | | | | Correct event type of audio jack while receiving long press event. Signed-off-by: Andy CH Lin <andy_ch_lin@wistron.com> Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: move jack detection related configs to init timeLu Guanqun2011-05-101-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old policy will not enable MIC2BIAS on Moorstown platform by default, it's only enabled when the user selects HS_MIC as input source. Therefore when user selects DMIC and then inserts the jack, no interrupt will be generated to notify the driver about the jack insertion event and to take action to auto mute the speaker. The new policy will enable this bit by default, then no matter what the output device is, an interrupt will be generated. This behaviour is more likely what a user expects. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Reviewed-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: Headphone Automute supportxingchao2011-05-101-0/+15
| | | | | | | | | | | | | | | | | | When detected a Jack event, Audio sound routes between internal speaker and headphone/headset automatically. Signed-off-by: xingchao <xingchao.wang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: Enable recording via DMICLu Guanqun2011-05-101-4/+4
| | | | | | | | | | | | | | | | We may need to make some of this board specific eventually Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: Enable recording via HS_MICLu Guanqun2011-05-101-1/+4
| | | | | | | | | | | | | | | | We may need to make some of this board specific eventually. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: Set de-bounce timeLu Guanqun2011-05-101-1/+5
| | | | | | | | | | | | | | | | | | | | In order to make jack detection behave properly, we have to set the de-bounce time, otherwise, some weird events happens: e.g. no plug-out event seen. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: rework jack implementationRamesh Babu K V2011-05-101-6/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the below issues w.r.t jack implementation a) The current jack implementation in driver is implemented in intelmid.c. It has moved to vendor files for better managebility b) Cleaned up jack reporting per upstream comments c) Implemented jack for msic, added code to read adc and deduce jack type based on mic bias d) Support detection of american headset Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com> [Corrections] Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: Line out supportDharageswari R2011-05-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | This patch adds the support for lineout. The lineout input can be selected as any input channel by using a new alsa mixer kcontrol. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * intel_sst: MSIC codec power optimisationVinod Koul2011-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | This patch adds power optimization for the msic codec and ensure codec is completely powered off when codec is idle. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging: intel_sst: intelmid needs delay.hRandy Dunlap2011-04-251-0/+1
|/ | | | | | | | | | | | | | | intel_sst drivers need to #include <linux/delay.h> so that they build cleanly: drivers/staging/intel_sst/intelmid_v1_control.c:188: error: implicit declaration of function 'msleep' drivers/staging/intel_sst/intelmid_v2_control.c:172: error: implicit declaration of function 'msleep' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Harsha Priya <priya.harsha@intel.com> Cc: KP Jeeja <jeeja.kp@intel.com> Cc: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/trivial: fix typos concerning "initiali[zs]e"Uwe Kleine-König2011-02-181-2/+2
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: sst: Fix for dmic capture on v2 pmicHarsha Priya2011-02-021-1/+4
| | | | | | | | | | currently capture through dmic captures only silence This patch configurs the dmic registers to capture properly Signed-off-by: Harsha Priya <priya.harsha@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* sst: remove rest of aava bits and aava related codeVinod Koul2010-11-171-1/+1
| | | | | | | | This removes the remaining bit of aava dependent and related bits from driver Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: intel_sst: Use pr_fmt, fix misspellingsJoe Perches2010-11-091-46/+48
| | | | | | | | | | | | | | Remove leading "sst: " from format strings. Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Prefix is changed from "sst: " to "snd_intel_sst: " Add missing newlines Trim trailing spaces after newlines Fix several different misspellings Signed-off-by: Joe Perches <joe@perches.com> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: sst: Intel SST audio driverVinod Koul2010-10-051-0/+1001
This is the Intel SST audio driver. As compared to the previous versions it has all the printks and other stuff noted cleaned up and more hardware support. The Aava support is disabled in this patch (is_aava resolves to 0) because the Aava board detection logic is not yet upstream. The driver itself is a combination of a traditional ALSA driver and a hardware assisted offload driver which can play audio while the processor is asleep but which can't do all the more interactive stuff. In the general case most software would use the ALSA interface, but the other interface is needed for certain classes of use such as music playback on highly power consumption sensitive devices. This is going to staging primarily because it depends upon the staging memrar driver. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Harsha Priya <priya.harsha@intel.com> [Merged together and tweaked for -next] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud