summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/arizona.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: arizona: Set FLL to free-run before disablingRichard Fitzgerald2013-11-201-0/+4
| | | | | | | | | The FLL must be placed into free-run mode before disabling to allow it to entirely shut down. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* ASoC: arizona: Improve handling of setting REFCLK to 0Charles Keepax2013-09-171-9/+14
| | | | | | | | | | | This patch suppresses calculation of REFCLK parameters when the REFCLK source frequency is set to zero, additionally it will consider a source frequency of zero as the REFCLK being disabled and switch to using the SYNCCLK. Reported-by: Kyung Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm8997: Initial CODEC driverCharles Keepax2013-08-131-3/+10
| | | | | | | | | | | | | | The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus interfacing, for smartphones, tablets and other portable audio devices based on the Arizona platform. This patch adds the wm8997 CODEC driver. [Fixed some interface churn from bitrot due to the patch not going via the MFD tree as expected -- broonie] 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/+20
| | | | | | | | 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 default case to silence build warningCharles Keepax2013-07-151-0/+3
| | | | | | Reported-by: Fengguang Wu <fengguang.wu@intel.com> 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/+33
| | | | | | | | | | 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-0/+7
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: arizona: Add delay after powering up line level outputsMark Brown2013-03-261-0/+18
| | | | | | | Ensure that the outputs are fully enabled before we begin passing audio through them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'arizona-extcon-asoc' of ↵Mark Brown2013-03-261-0/+33
|\ | | | | | | | | | | | | | | | | | | | | 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/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: remove duplicated include from arizona.cWei Yongjun2013-03-261-1/+0
| | | | | | | | | | | | | | Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Basic support for ISRC rate selectionMark Brown2013-03-211-0/+27
| | | | | | | | | | | | | | | | | | | | 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: Suppress speaker enable if thermal shutdown is flaggedMark Brown2013-03-211-2/+24
| | | | | | | | | | | | | | Ensure that the device state does not diverge from the state we have set in the register map in order to make the behaviour clearer. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Log thermal eventsMark Brown2013-03-211-0/+54
| | | | | | | | | | | | Help with debuggability. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Factor out speaker widgets from CODEC driversMark Brown2013-03-211-0/+82
| | | | | | | | | | | | | | | | | | | | 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: Ensure we clock two channels for I2S modeMark Brown2013-03-131-1/+8
| | | | | | | | | | | | I2S requires stereo clocking even for mono data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Provide defines for the clock ratesMark Brown2013-03-131-6/+6
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Suppress reference calculations when setting REFCLK to 0Mark Brown2013-03-081-2/+2
| | | | | | | | | | | | | | | | Allow users to keep on specifying their output frequency when disabling the reference clock. Reported-by: Kyung Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Ensure synchroniser is disabled when not neededMark Brown2013-03-081-0/+3
| | | | | | | | | | | | | | When live configuring a FLL configuration with no synchroniser disable the synchroniser in case the previous configuration used one. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Optimise FLL loop gainsMark Brown2013-03-061-4/+39
| | | | | | | | | | | | | | For optimal performance the FLL loop gain should be adjusted depending on the frequency of the input clock for the loop. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Increase FLL synchroniser bandwidth for high frequenciesMark Brown2013-03-061-0/+11
| | | | | | | | | | | | | | If we are using a high freqency SYNCCLK then increasing the bandwidth of the synchroniser improves performance. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: If we only have a clock to synchronise with make it REFCLKMark Brown2013-03-051-38/+38
| | | | | | | | | | | | | | If there is only one clock active the FLL should use REFCLK rather than SYNCCLK as the clock to synchronise with since REFCLK is always required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Don't enable FLL on REFCLK configurationCharles Keepax2013-03-041-9/+6
| | | | | | | | | | | | | | | | Enabling the FLL when REFCLK is being configured is not what the user would expect and can cause issues if SYNCCLK has no specified frequency. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Only allow input volume updates when inputs are enabledMark Brown2013-03-041-2/+37
| | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | 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/+39
| | | | | | | | | | | | | | | | 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-6/+10
| | | | | | | | | | | | | | | | | | 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: Factor out FLL enableCharles Keepax2013-03-041-30/+36
| | | | | | | | | | | | | | | | In preparation for additional features on the FLL this patch factors out the code for enabling an FLL into a seperate function. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Factor out FLL disableCharles Keepax2013-03-041-7/+15
| | | | | | | | | | | | | | | | In preparation for additional features on the FLL this patch factors out the code for disabling an FLL into a seperate function. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Factor out check for enabled FLLCharles Keepax2013-03-041-8/+17
| | | | | | | | | | | | | | | | | | In preparation for additional features on the FLL this patch factors out the code which checks if an FLL is currently enabled into a seperate function. 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-51/+50
| | | | | | | | | | | | | | | | | | 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-12/+16
|/ | | | | | | | | 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: Automatically manage input mutesMark Brown2013-02-121-0/+17
| | | | | | | | For optimal performance the inputs should be kept muted until after power up. Since there are few use cases for muting inputs during capture move the mutes to automatic control. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'asoc/topic/arizona' into asoc-nextMark Brown2013-02-111-55/+177
|\
| * ASoC: arizona: Allow number of channels clocked to be restrictedMark Brown2013-01-211-2/+12
| | | | | | | | | | | | | | | | Place a cap on the number of channels clocks are generated for. This is intended for use with systems which have the WM5102 master an I2S bus with multiple data lines. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: arizona: Support clearing clocksMark Brown2013-01-211-0/+7
| | | | | | | | | | | | | | | | | | Some systems may wish to support switching between telephony and CD audio clock rates but this is restricted by enforcement of constraints on the current DAI clock. Support setting clocks to zero and don't enforce any constraints in that case in order to facilitate this use case. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * Merge remote-tracking branch 'asoc/fix/arizona' into asoc-arizonaMark Brown2013-01-171-1/+1
| |\ | | | | | | | | | | | | Conflicts: sound/soc/codecs/arizona.c
| * | ASoC: arizona: Don't request FLL lock IRQMark Brown2013-01-161-19/+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 remote-tracking branch 'asoc/fix/arizona' into asoc-arizonaMark Brown2013-01-131-0/+3
| |\ \
| * | | ASoC: arizona: Factor out rate selection codeMark Brown2013-01-041-36/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for more advanced sample rate managment move the existing code out of the main hw_params() function. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | Merge branch 'fix/arizona' of ↵Mark Brown2013-01-041-7/+2
| |\ \ \ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-arizona
| * | | | ASoC: arizona: Allow runtime reconfiguration of the output modeMark Brown2013-01-041-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+48
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | ASoC: arizona: Implement tristate supportMark Brown2012-12-241-0/+16
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | ASoC: arizona: Add noise gate hold time enumerationMark Brown2012-12-241-0/+9
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | | | ASoC: arizona: Fix debug logging level for FLLs and AIFsMark Brown2013-02-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use _dbg for debug messages. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | | | ASoC: arizona: Fixed a bug in FLL fractional calculationRyo Tsutsui2013-02-041-1/+10
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously arizona_calc_fll() was checking if the target frequency is exactly divisible by reference frequency, but should have been product of the ratio and the reference frequency. Also scale down the Lamba and Theta coefficients be under 16-bits in order to match the registers. Signed-off-by: Ryo Tsutsui <ryo.tsutsui@wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | | | ASoC: arizona: Use actual rather than desired BCLK when calculating LRCLKMark Brown2013-01-171-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | Otherwise we'll get the wrong LRCLK if we need to pick a higher BCLK than is required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | | ASoC: arizona: Disable free-running mode on FLL1Charles Keepax2013-01-081-0/+3
| |/ |/| | | | | | | | | | | | | | | The free running mode can cause problems when attempting to bring up the FLL running from a defined clock source. This patch disables free-running mode. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: arizona: Remove DSP B and left justified AIF modesMark Brown2013-01-041-6/+0
| | | | | | | | | | | | | | These are not supported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
OpenPOWER on IntegriCloud