summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/arizona.h
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: wm8998: Initial WM8998 codec driverRichard Fitzgerald2015-10-021-1/+6
| | | | | | Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: arizona: add defines for single-input gain controlRichard Fitzgerald2015-10-021-0/+5
| | | | | | | | | | | Adds convenience defines for declaring a gain control that has an input mux. These blocks are functionally equivalent to the existing mixer blocks but can only have a single input active at once. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: arizona: Add utility function to check if an input is analogCharles Keepax2015-09-161-0/+2
| | | | | | | | | We will occasionally require to take different action based on if an input is analog or digital so add a helper function to return if an input is analog. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ac97', ↵Mark Brown2015-08-301-0/+19
|\ \ | | | | | | | | | 'asoc/topic/ak4542', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next
| | * ASoC: arizona: Implement stability check for LHPF coefficientsCharles Keepax2015-07-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Specifying unstable coefficients for the low/high pass filters can have a severe impact on the audio. This patchs adds a stability check on the coefficients written to the low/high pass filter block to prevent this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: arizona: Implement stability check for EQ coefficientsCharles Keepax2015-07-071-0/+10
| |/ | | | | | | | | | | | | | | | | | | | | Specifying unstable coefficients for the EQ can have a severe impact on the audio. This patchs adds a stability check on the coefficients written to the EQ, for this it is necessary to merge the mode control and the coefficients as some coefficients may only be unstable with a certain mode setting so it is ideal if these are always updated in sync. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: arizona: Poll for FLL clock OK rather than use interruptsCharles Keepax2015-08-251-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | The extcon driver takes the DAPM mutex from within the interrupt thread in several places, which makes it possible to get into a situation where the interrupt thread is blocked waiting on the DAPM mutex whilst a DAPM sequence is running which is attempting to configure the FLL. In this case the FLL completion can't be completed as as the IRQ handler is ONE_SHOT, which cause the FLL lock to use the full time out (250mS) and report that the process timed out. It is not really practical to make the extcon driver not take the DAPM mutex from within the interrupt thread, at least not without extensive modification. So this patch fixes the issue by switching the wait for the FLL lock to polling. A few fast polls are done first as the FLL should lock quickly for a good quality reference clock, (indeed it hits on the first poll on my system) and it will poll every 20mS after that until it times out. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* ASoC: wm_adsp: Move DSP Rate controls into the codecRichard Fitzgerald2015-06-191-0/+2
| | | | | | | | | | | | | | | | | | The rate controls are codec-specific, it's not possible to generically say what the range or the meaning of each control is (or even if they exist at all) - that depends on the particular codec. This is currently being handled for Arizona codecs by putting an Arizona-specific table of controls inside the wm_adsp driver. This creates a dependency between wm_adsp and arizona.c, and is an awkward solution if the ADSP is used in another family of codecs Fix this by moving the Arizona-specific rate controls into the Arizona codec drivers. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: arizona: Export functions to control subsystem DVFSRichard Fitzgerald2015-06-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | The WM5102 and WM8997 codecs have an internal dynamic clock booster. When this booster is active, the DCVDD voltage must be increased. If all the currently active audio paths can run with the root SYSCLK we can disable the booster, allowing us to turn down DCVDD voltage to save power. Previously this was being done by having the booster enable bit set as a side-effect of the LDO1 regulator driver, which is unexpected behaviour of a regulator and not compatible with using an external regulator. [Originally this was documented as a feature of the internal LDO -- broonie] This patch exports functions to handle the booster enable and DCVDD voltage, with each relevant subsystem flagging whether it can currently run without the booster. Note that these subsystems are stateless and none of them are nestable, so there's no need for reference counting, we only need a simple boolean for each subsystem of whether their current condition could require the booster or will allow us to turn the codec down to lower operating power. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: arizona: Use auto disable muxes for routingCharles Keepax2015-05-061-2/+2
| | | | | | | | | | | The mixer core on the Arizona devices is powered up whenever any routing is non-zero. This patch saves a little power and avoids a few difficult corner cases (around the mixer core being powered whilst there is no clock available), by using the autodisable mux functionality to only write out the settings for the muxes when they are powered up. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: arizona: Coalesce output power up delaysCharles Keepax2015-01-271-0/+2
| | | | | | | | Save a bit of scheduling by coalescing all the output power up delays into a single delay. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: arizona: Add delay for output disableCharles Keepax2015-01-271-0/+3
| | | | | | | | | | Give the output disable sequence a chance to fully complete, otherwise there is a danger we may remove the clock before it is finished resulting in a pop noise. The delay for each output must be cumulative and these are coalesced into a single delay. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: wm5110: Power both channels for differential mono outputCharles Keepax2014-06-211-0/+1
| | | | | | | | | | | | On the wm5110 CODEC both the left and right channel must be powered when an output is being used as a mono output, although no audio is routed to the right output channel. This patch adds additional DAPM routes to link the right channel to the left in the case where an output is marked as mono. Audio must always be brought in on the left channel for mono operation. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: arizona: Replace usage deprecated MUX/ENUM macrosLars-Peter Clausen2014-04-141-2/+2
| | | | | | | | | SND_SOC_DAPM_VALUE_MUX and SOC_DAPM_VALUE_ENUM are deprecated and merely an alias for SND_SOC_DAPM_MUX and SOC_DAPM_ENUM. Replace the deprecated macros so we can eventually remove their definition. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/atmel', ↵Mark Brown2014-01-161-8/+9
|\ \ | | | | | | | | | 'asoc/topic/bcm2835', 'asoc/topic/docs', 'asoc/topic/fsl', 'asoc/topic/generic', 'asoc/topic/kirkwood', 'asoc/topic/mc13783', 'asoc/topic/mxs', 'asoc/topic/nuc900', 'asoc/topic/sai', 'asoc/topic/sh', 'asoc/topic/ssm2602', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl4030', 'asoc/topic/ux500', 'asoc/topic/width' and 'asoc/topic/x86' into for-tiwai
| * | ASoC: wm_adsp: Start DSP booting earlier in the DAPM processCharles Keepax2014-01-081-8/+9
| |/ | | | | | | | | | | | | | | | | | | Move the start of booting the DSP to earlier in the DAPM process, and move the final starting of the DSP to later in the DAPM process. This allows us to overlap some of the processing with other components of the system being brought up. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm5110: Add support for ASRC RATE 1Charles Keepax2013-12-191-0/+1
| | | | | | | | | | | | | | | | Add support for configuring the sample rate on the SYSCLK side of the ASRC. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm5110: Add FSH for ISRCsCharles Keepax2013-12-191-0/+1
| | | | | | | | | | | | | | | | | | Currently, the driver only supports configuration of the lower sample rate (FSL) on the ISRCs. With the higher rate being fixed a SYSCLK, this patch adds support for configuring the higher sample rate (FSH). Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge tag 'ib-asoc-1' of git://git.linaro.org/people/ljones/mfd into ↵Mark Brown2013-11-211-0/+1
|\ \ | | | | | | | | | | | | | | | asoc-arizona Immutable branch for ASoC, as requested by Mark Brown
| * | ASoC: wm5110: Expose input high pass filter controlsCharles Keepax2013-11-211-0/+1
| |/ | | | | | | | | | | Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | ASoC: wm5110: Add extra AIF2 channelsRichard Fitzgerald2013-11-201-1/+1
|/ | | | | | Signed-off-by: D.J. Barrow <dbarrow@wolfsonmicro.com> Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: arizona: Add widget<->mux route into mux route macroCharles Keepax2013-08-121-1/+2
| | | | | | | | | The routes linking the widget and the input mux were being added manually, rather than by the ARIZONA_MUX_ROUTES macro. This patchs adds the routes to the macro. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm5110: Correct input OSR bits for wm5110Charles Keepax2013-08-061-0/+1
| | | | | | | | The input OSR bits are specified differently for wm5110 than for current revs of wm5102. This patch corrects support for this on wm5110. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: arizona: Add signal activity output for DRCCharles Keepax2013-07-151-0/+1
| | | | | | | | | | When doing signal activity detection, the only output from the DRC will often be a GPIO pin. This patch adds a signal activity output that is activated when a GPIO is configured to output the DRC signal activity detection. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: arizona: Provide simple DAI ops for autoconfiguring interfacesMark Brown2013-05-201-1/+2
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'arizona-extcon-asoc' of ↵Mark Brown2013-03-261-0/+3
|\ | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into asoc-arizona ASoC/extcon: arizona: Fix interaction between HPDET and headphone outputs This patch series covers both ASoC and extcon subsystems and fixes an interaction between the HPDET function and the headphone outputs - we really shouldn't run HPDET while the headphone is active. The first patch is a refactoring to make the extcon side easier.
| * ASoC: arizona: Fix interaction between headphone outputs and identificationMark Brown2013-03-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Running HPDET while the headphone outputs are enabled can disrupt the operation of HPDET. In order to avoid this HPDET needs to disable the headphone outputs and ASoC needs to not enable them while HPDET is running. Do the ASoC side of this by storing the enable state in the core driver structure and only writing to the device if a flag indicating that the accessory detection side is in a state where it can have the headphone output stage enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Basic support for ISRC rate selectionMark Brown2013-03-211-0/+6
| | | | | | | | | | | | | | | | | | | | Since ASoC does not yet really have the framework features needed to support propagating sample rates through the device well yet implement basic support for the ISRCs equivalent to that we currently have for the ASRCs. The user can opt for 8kHz or 16kHz as the rate for the DSP blocks in addition to the main audio rate, these being the primary use cases. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Factor out speaker widgets from CODEC driversMark Brown2013-03-211-0/+5
| | | | | | | | | | | | | | | | | | | | Some system designs have been identified which repurpose portions of the speaker driver circuits for other functions which will require that they not be managed using DAPM. Prepare for this by factoring out the creation of the speaker widgets into the core driver, the widgets will be replaced by dummy ones when the additional functions are enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Provide defines for the clock ratesMark Brown2013-03-131-0/+8
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Only allow input volume updates when inputs are enabledMark Brown2013-03-041-0/+3
| | | | | | | | | | | | | | | | | | Since we are automatically managing the mutes we may as well also manage the volume update bits, disabling volume updates while none of the inputs are active. Since we are doing this we may as well allow the volumes to ramp together so only enable volume updates once at the end of power up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Add convience define for clearing SYNCCLKCharles Keepax2013-03-041-0/+1
| | | | | | | | | | Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Add support for directly setting the FLL REFCLKCharles Keepax2013-03-041-0/+2
| | | | | | | | | | | | | | | | This patch allows the REFCLK to be set directly allowing much greater flexibility in how the FLLs are configured. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Improve suppression of noop FLL updatesCharles Keepax2013-03-041-2/+1
| | | | | | | | | | | | | | | | | | Previously updates that only changes FLL source would be missed, this patch corrects this. We also ensures that both REFCLK and SYNCCLK frequency changes are considered, in preparation for future updates. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Tidy up SYNCCLK selection and cache valuesCharles Keepax2013-03-041-0/+2
| | | | | | | | | | | | | | | | | | This patch caches the current SYNCCLK settings in the arizona_fll struct and uses these to simplify the code which determines which source should be used for the REFCLK and SYNCCLK inputs. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Move selection of FLL REFCLK into initCharles Keepax2013-03-041-0/+3
|/ | | | | | | | | In preparation for additional features on the FLL this patch moves the code selecting the REFCLK source based on the 32kHz clock into the FLL initialisation function. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Don't request FLL lock IRQMark Brown2013-01-161-1/+0
| | | | | | | | We only log the result and since the interrupt triggers on loss of lock during shutdown this may lead to spurious interrupts during shutdown delaying the process. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'fix/arizona' of ↵Mark Brown2013-01-041-9/+9
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-arizona
| * ASoC: arizona: Correct FLL source definitionsMark Brown2012-12-241-9/+9
| | | | | | | | | | | | | | | | | | | | The FLL source constants were numbered as a simple enumeration but were being used in the code as direct values to be written to the registers. Renumber the constants to reflect the usage. Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | ASoC: arizona: Allow runtime reconfiguration of the output modeMark Brown2013-01-041-0/+3
| | | | | | | | | | | | | | | | | | | | Some systems use external analogue switches to connect more analogue devices to the CODEC than are supported by the device. In some systems this requires changing the switched output from single ended to differential mode dynamically at runtime. Add a new function arizona_set_output_mode() to support this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm5102: Implement routing and power management for ISRCsMark Brown2013-01-041-1/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Add noise gate hold time enumerationMark Brown2012-12-241-0/+2
|/ | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Add volume ramp controlsMark Brown2012-12-091-0/+6
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Suppress noop FLL updatesMark Brown2012-11-271-0/+2
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Add support for multiplexer with no associated mixerCharles Keepax2012-11-141-20/+20
| | | | | | | | | | | | | | The Asynchronous Sample Rate Converters on the wm5102/wm5110 have no mixer attached to their input, but they do allow the input to be selected from a number of sources via a multiplexer. Currently the platform assumes the presence of 4 multiplexers and a mixer for each block. This patch adds support multiplexed single input blocks into the Arizona platform. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Define standard hookup for ADSP2Mark Brown2012-10-281-1/+46
| | | | | | | Many Arizona class devices contain ADSP2 cores with a standard method for hooking them into the audio map. Define standard helpers for this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Add more DSP options for mixer input muxesMark Brown2012-09-261-1/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Implement OPCLK supportMark Brown2012-08-091-2/+4
| | | | | | | | Arizona devices support two output system clocks. Provide support for configuring these via set_sysclk(). Once the clock API is more useful we should migrate over to that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Support variable FLL VCO multipliersMark Brown2012-07-101-0/+1
| | | | | | | Some Arizona chips have a higher frequency for the FLL VCO, support this in the common code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Add IN4 to the mixer tablesMark Brown2012-07-091-1/+1
| | | | | | Some devices have four input structures rather than three. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud