aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
Commit message (Collapse)AuthorAgeFilesLines
...
* ASoC: Provide debug log of accessory status on WM8958Mark Brown2016-04-301-0/+2
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Enhance default WM8958 microphone detectionMark Brown2016-04-302-11/+111
| | | | | | | | Actively manage the detection rate for microphones with WM8958, providing improved power consumption and maximising the benefit from the hardware debounce. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Put WM8958 and WM1811 MICBIAS into bypass mode when no audioMark Brown2016-04-301-1/+39
| | | | | | | When we don't have any active audio we can put the microphone biases into bypass mode to save power at the expense of performance. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Ensure SYSCLK is enabled for WM8958 accessory detectionMark Brown2016-04-301-0/+3
| | | | | | | | Ensure SYSCLK is enabled while running accessory detection on WM8958. It is always required so there is no sense in requiring machine drivers to individually do this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Supply dcs_codes for newer WM1811 revisionsMark Brown2016-04-301-0/+2
| | | | | | Based on initial data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Ensure we get an impedence reported for WM8958 jack detectMark Brown2016-04-301-11/+26
| | | | | | | | | Occasionally we may see an accessory reported before we have a stable impedance for the accessory. If this happens then reread the status in order to ensure that the handler can take the appropriate action for the status change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Don't use wm8994->control_data when requesting IRQsMark Brown2016-04-301-2/+2
| | | | | | | | The field is no longer initialised so this will crash if running on wm8958. Reported-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Update WM1811 DCS codes for latest evaluation resultsMark Brown2016-04-301-2/+2
| | | | | | | | Evaluation of larger quantities of material has provided new DCS codes values to be applied for WM1811. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Remove impossible case from wm8994_hw_paramsAxel Lin2016-04-301-10/+0
| | | | | | | | We set hw_params callback for wm8994_aif3_dai_ops to wm8994_aif3_hw_params. Thus no need to check wm8994-aif3 in wm8994_hw_params. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Slightly optimize configure_clockAxel Lin2016-04-301-7/+4
| | | | | | | | | | snd_soc_update_bits() will only write new register value if the old value is different from the new value. In additional, snd_soc_update_bits() returns 0 for no change. No need to read WM8994_CLOCKING_1 register before calling snd_soc_update_bits(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add WM1811 supportMark Brown2016-04-301-5/+78
| | | | | | | | The WM1811 is mostly register compatible with the WM8994 and WM8958, providing a high performance audio hub CODEC in a small form factor suitable for ultra compact system designs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix backport of WM8994 thermal warningMark Brown2016-04-301-2/+2
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ASoC: Implement WM8994 thermal warning and shutdown interrupt supportMark Brown2016-04-301-0/+26
| | | | | | | ALSA doesn't really have good mechanisms for dealing with these so we just log them - the hardware already has automatic shutdown support. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add WM8958 noise gate supportMark Brown2016-04-302-6/+44
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Disable pulls on WM8994 AIF2 when starting itMark Brown2016-04-301-0/+16
| | | | | | | | | | Pull control is availalbe for WM8994 AIF2, generally disabled as part of the GPIO configuration in order to save power after system startup. As on newer devices in the series there is no GPIO functionality on these pins this will happen less naturally so have the driver disable the pulls as the AIF is probed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Disable WM8994 VMID for digital only pathsMark Brown2016-04-302-56/+129
| | | | | | | | | | | On WM8994 class devices only the analogue portions of the CODEC require VMID so when running digital only paths we can leave VMID disabled. On some earlier devices the FLL uses VMID so we don't use DAPM reference counting alone, we maintain an internal reference count which is also enabled and disabled by the FLL startup. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Handle failed WM8994 FLL lock waitsMark Brown2016-04-301-0/+3
| | | | | | | | Try the completion before we start the FLL so that if an interrupt was delayed long enough for us to miss it we don't wait for the completion it signalled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Log WM8994 FIFO errors from the interruptMark Brown2016-04-301-0/+14
| | | | | | | We should spot them anyway on state changes but logging them gives us better time information about when the misconfiguration happened. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Don't warn on low WM8994/58 AIFnCLKsMark Brown2016-04-301-4/+0
| | | | | | We can have valid but very low clocks in accessory detection modes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Use WM8994 FLL lock interruptMark Brown2016-04-302-1/+42
| | | | | | | If we have interrupts then wait for the FLL lock interrupt rather than using dead reckoning when waiting for the FLL to start. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Hook up DC servo completion IRQ for WM8994 and WM8958Mark Brown2016-04-301-0/+11
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Conditionalize the enable of WM8994 ADC TDM modeMark Brown2016-04-301-4/+12
| | | | | | | Future devices will not benefit from this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Add missing break in WM8994 probeMark Brown2016-04-301-0/+1
| | | | | | | | This error would have no effect on current silicon revisions, the fall through case has the same behaviour. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: wm_hubs: Enable line out VMID buffer for single ended line outputsMark Brown2016-04-301-0/+2
| | | | | | | | For optimal performance the single ended line outputs require that the line output VMID buffer be enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* ASoC: Disable thermal shutdown when not using speakers in wm_hubsMark Brown2016-04-301-0/+3
| | | | | | | | | | The thermal shutdown support in wm_hubs devices is tied to the speaker drivers (which are the only high power subsystems within the device). Ensure minimal current usage when the thermal shutdown support is not required by disabling the circuit when the speaker drivers are powered down. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add VMID widget for wm_hubs devicesMark Brown2016-04-303-0/+23
| | | | | | | | | Currently this does not actually do anything, it is being introduced in order to facilitate additional power optimisations for current generation devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Support separate left and right channel dcs_codes valuesMark Brown2016-04-304-9/+13
| | | | | | | | Some devices can have performance optimized by setting different offsets for left and right channels. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Implement new DC servo readback mode for late WM8994 revisionsMark Brown2016-04-302-5/+17
| | | | | | | | | Later WM8994 devices implement a new DC servo readback mode with the register used to access the offset moved to register 0x59. Implement support for this and enable it on the appropriate devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Disable wm_hubs periodic DC servo updateMark Brown2016-04-301-2/+1
| | | | | | | | | This does not function correctly in all circumstances so disable the periodic updates unconditionally for stable; a future patch will reenable where appropriate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Handle spurious wm_hubs DC servo done interruptsMark Brown2016-04-301-14/+16
| | | | | | Don't assume the first fire indicates that we're done. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Implement DC servo completion IRQ handling for wm_hubs devicesMark Brown2016-04-302-5/+37
| | | | | | | | The individual devices should set the flag dcs_done_irq in the hubs shared data structure to indicate that they will flag the interrupt by calling wm_hubs_dcs_done(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Use late enable handling for direct voice, speaker and headphoneMark Brown2016-04-303-13/+22
| | | | | | | This ensures appropriate clocking for bypass paths to speaker and headphone and direct voice paths on affected revisions. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Correct left/right swap in wm_hubs DC offset correctionMark Brown2016-04-301-8/+8
| | | | | | | | It was consistently wrong for everything except WM8993 so should be no functional change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.comm>
* ASoC: Allow suppression of series updates on wm_hubs devicesMark Brown2016-04-302-1/+2
| | | | | | | Some devices do not support manual updates of the DC servo. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Trigger wm_hubs series update startup off a separate flagMark Brown2016-04-304-2/+4
| | | | | | | Allowing the two to be used independently. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* Merge remote-tracking branch 'linux-stable/linux-3.0.y' into ↵Ziyan2015-10-2513-18/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | p-android-omap-3.0-dev-espresso Conflicts: Makefile arch/arm/include/asm/hardware/cache-l2x0.h arch/arm/kernel/smp.c arch/arm/mach-omap2/board-4430sdp.c arch/arm/mach-omap2/board-omap4panda.c arch/arm/mach-omap2/opp.c arch/ia64/include/asm/futex.h drivers/bluetooth/ath3k.c drivers/bluetooth/btusb.c drivers/firmware/efivars.c drivers/gpu/drm/i915/intel_lvds.c drivers/gpu/drm/radeon/radeon_atombios.c drivers/gpu/drm/radeon/radeon_irq_kms.c drivers/hwmon/fam15h_power.c drivers/mfd/twl6030-irq.c drivers/mmc/core/sdio.c drivers/net/tun.c drivers/net/usb/ipheth.c drivers/net/usb/usbnet.c drivers/usb/core/hub.c drivers/usb/host/xhci-mem.c drivers/usb/host/xhci.h drivers/usb/musb/omap2430.c drivers/usb/serial/ftdi_sio.c drivers/usb/serial/ftdi_sio_ids.h drivers/usb/serial/option.c drivers/usb/serial/qcserial.c drivers/usb/serial/ti_usb_3410_5052.c drivers/usb/serial/ti_usb_3410_5052.h drivers/video/omap2/dss/hdmi.c fs/splice.c include/asm-generic/pgtable.h include/net/sch_generic.h kernel/cgroup.c kernel/futex.c kernel/time/timekeeping.c net/ipv4/route.c net/ipv4/syncookies.c net/ipv4/tcp_ipv4.c net/wireless/util.c security/commoncap.c sound/soc/soc-dapm.c
| * ASoC: 88pm860x: array overflow in snd_soc_put_volsw_2r_st()Dan Carpenter2013-10-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | commit d967967e8d1116fb38bad25e58714b5dddd03cca upstream. This is called from snd_ctl_elem_write() with user supplied data so we need to add some bounds checking. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: max98095: a couple array underflowsDan Carpenter2013-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | commit f8d7b13e14357ed19d2ca2799539600418dc3939 upstream. The ->put() function are called from snd_ctl_elem_write() with user supplied data. The limit checks here could underflow leading to a crash. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm8960: Fix PLL register writesMike Dyer2013-09-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | commit 85fa532b6ef920b32598df86b194571a7059a77c upstream. Bit 9 of PLL2,3 and 4 is reserved as '0'. The 24bit fractional part should be split across each register in 8bit chunks. Signed-off-by: Mike Dyer <mike.dyer@md-soft.co.uk> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: max98088 - fix element type of the register cache.Chih-Chung Chang2013-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit cb6f66a2d278e57a6c9d8fb59bd9ebd8ab3965c2 upstream. The registers of max98088 are 8 bits, not 16 bits. This bug causes the contents of registers to be overwritten with bad values when the codec is suspended and then resumed. Signed-off-by: Chih-Chung Chang <chihchung@chromium.org> Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: sglt5000: Fix SGTL5000_PLL_FRAC_DIV_MASKFabio Estevam2013-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | commit 5c78dfe87ea04b501ee000a7f03b9432ac9d008c upstream. SGTL5000_PLL_FRAC_DIV_MASK is used to mask bits 0-10 (11 bits in total) of register CHIP_PLL_CTRL, so fix the mask to accomodate all this bit range. Reported-by: Oskar Schirmer <oskar@scara.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm8994: missing break in wm8994_aif3_hw_params()Dan Carpenter2013-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | commit 4495e46fe18f198366961bb2b324a694ef8a9b44 upstream. The missing break here means that we always return early and the function is a no-op. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: max98088: Fix logging of hardware revision.Dylan Reid2013-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | commit 98682063549bedd6e2d2b6b7222f150c6fbce68c upstream. The hardware revision of the codec is based at 0x40. Subtract that before convering to ASCII. The same as it is done for 98095. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm8903: Fix the bypass to HP/LINEOUT when no DAC or ADC is runningAlban Bedel2013-04-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f1ca493b0b5e8f42d3b2dc8877860db2983f47b6 upstream. The Charge Pump needs the DSP clock to work properly, without it the bypass to HP/LINEOUT is not working properly. This requirement is not mentioned in the datasheet but has been confirmed by Mark Brown from Wolfson. Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm2000: Fix sense of speech clarity enableMark Brown2013-01-171-2/+2
| | | | | | | | | | | | | | | | commit 267f8fa2e1eef0612b2007e1f1846bcbc35cc1fa upstream. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm8978: pll incorrectly configured when codec is masterEric Millbrandt2012-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 55c6f4cb6ef49afbb86222c6a3ff85329199c729 upstream. When MCLK is supplied externally and BCLK and LRC are configured as outputs (codec is master), the PLL values are only calculated correctly on the first transmission. On subsequent transmissions, at differenct sample rates, the wrong PLL values are used. Test for f_opclk instead of f_pllout to determine if the PLL values are needed. Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm9712: Fix name of Capture SwitchMark Brown2012-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | commit 689185b78ba6fbe0042f662a468b5565909dff7a upstream. Help UIs associate it with the matching gain control. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm9712: Fix microphone source selectionMark Brown2012-09-141-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit ccf795847a38235ee4a56a24129ce75147d6ba8f upstream. Currently the microphone input source is not selectable as while there is a DAPM widget it's not connected to anything so it won't be properly instantiated. Add something more correct for the input structure to get things going, even though it's not hooked into the rest of the routing map and so won't actually achieve anything except allowing the relevant register bits to be written. Reported-by: Christop Fritz <chf.fritz@googlemail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm8994: Ensure there are enough BCLKs for four channelsMark Brown2012-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | commit b8edf3e5522735c8ce78b81845f7a1a2d4a08626 upstream. Otherwise if someone tries to use all four channels on AIF1 with the device in master mode we won't be able to clock out all the data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ASoC: wm8962: Allow VMID time to fully rampMark Brown2012-08-091-0/+3
| | | | | | | | | | | | | | | | | | | | commit 9d40e5582c9c4cfb6977ba2a0ca9c2ed82c56f21 upstream. Required for reliable power up from cold. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>