summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/max98090.c
AgeCommit message (Collapse)AuthorFilesLines
2014-06-19ASoC: max98090: Fix missing free_irqJarkko Nikula1-1/+1
max98090.c doesn't free the threaded interrupt it requests. This causes an oops when doing "cat /proc/interrupts" after snd-soc-max98090.ko is unloaded. Fix this by requesting the interrupt by using devm_request_threaded_irq(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Cc: Stable <stable@vger.kernel.org> # 3.10+ Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-03Merge remote-tracking branches 'asoc/topic/max98090' and ↵Mark Brown1-4/+27
'asoc/topic/max98095' into asoc-next
2014-05-26ASoC: max98090: Add master clock handlingTushar Behera1-0/+23
If master clock is provided through device tree, then update the master clock frequency during set_sysclk. Documentation has been updated to reflect the change. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: max98090: Add NI/MI values for user pclk 19.2 MHzChen Zhen1-4/+4
This patch adds the clock divisor and multiplier NI, MI values for audio sampling frequencies 44100 and 48000 Hz and PCLK 19.2 MHz. This is useful for the Odroid X2/U2 boards when the codec works in master mode and its MCLK clock is fed from the I2S CDCLK output. Signed-off-by: Chen Zhen <zhen1.chen@samsung.com> [s.nawrocki@samsung.com: edited the commit description] Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22Merge remote-tracking branches 'asoc/topic/headers', 'asoc/topic/intel', ↵Mark Brown1-12/+35
'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/mc13783' and 'asoc/topic/multicodec' into asoc-next
2014-05-22Merge remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown1-3/+2
2014-05-22Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown1-2/+2
2014-05-16ASoC: max98090: Move microphone bias voltage setting to probe functionJarkko Nikula1-7/+3
Microphone bias level configuration register can configure voltage between 2.2 V and 2.8 V but doesn't manage is voltage on or off. Microphone bias on/off state is controlled by "MICBIAS" DAPM widget. Therefore there is no need to update bias voltage conditionally depending on jack state each time when codec goes to SND_SOC_BIAS_ON state and setting can be moved to max98090_probe() as driver currently doesn't support other levels than 2.8 V. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16ASoC: max98090: Make sure we configure BCLK in one placeLiam Girdwood1-3/+5
BCL is being configured in two places producing a warning message. Make sure we only configure BCLK once and when we are master. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16ASoC: max98090: Add ACPI probing supportJarkko Nikula1-2/+26
Add ACPI ID for MAX98090 and ACPI 5 I2C device probing support. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16ASoC: max98090: Mark cache as dirty prior to restoringLiam Girdwood1-0/+2
Make sure the cache is fully flushed at resume time. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16ASoC: max98090: Reset codec on resumeLiam Girdwood1-0/+23
Make sure we reset codec and clear any IRQs on resume. This matches the init sequence in probe. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-16ASoC: max98090: Fix reset at resume timeLiam Girdwood1-0/+3
Reset needs to wait 20ms before other codec IO is performed. This wait was not being performed. Fix this by making sure the reset register is not restored with the cache, but use the manual reset method in resume with the wait. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-05-16ASoC: max98090: Fix digital sidetone gain TLVLiam Girdwood1-1/+2
TLV for digital sidetone volume is wrong, this fix matches it to the datasheet. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14ASoC: max98090: Replace usage deprecated MUX/ENUM macrosLars-Peter Clausen1-3/+2
SND_SOC_DAPM_VIRT_MUX and SOC_DAPM_ENUM_VIRT 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>
2014-04-14ASoC: max98090: Include of.hSachin Kamat1-0/+1
of_match_ptr is defined in of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14ASoC: Add snd_soc_kcontrol_codec() helper functionLars-Peter Clausen1-2/+2
For CODEC controls snd_kcontrol_chip() currently returns a pointer to the CODEC that registered the control. With the upcoming consolidation of platform and CODEC controls this will change. Prepare for this by introducing the snd_soc_kcontrol_codec() helper function that will hide the implementation details of how the CODEC for a control can be obtained. This will allow us to change this easily in the future. The patch also updates all CODEC drivers to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-09Merge remote-tracking branches 'asoc/fix/alc5632', 'asoc/fix/cs42l52', ↵Mark Brown1-0/+7
'asoc/fix/cs42xxx8', 'asoc/fix/da732x', 'asoc/fix/davinci', 'asoc/fix/fsl-sai', 'asoc/fix/fsl-ssi' and 'asoc/fix/max98090' into asoc-linus
2014-04-01ASoC: max98090: add an of_match tableStephen Warren1-0/+7
Add a device tree match table. This serves to make the driver's support of device tree more explicit. Perhaps the fallback for DT matching to using the i2c_device_id table will go away one day, since it fails in face of devices from different vendors with the same name. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-23Merge remote-tracking branches 'asoc/topic/max98090' and 'asoc/topic/omap' ↵Mark Brown1-1/+0
into asoc-next
2014-03-14ASoC: max98090: Remove unused control_data fieldLars-Peter Clausen1-1/+0
The driver assigns a value to the control_data field of the driver's state struct, but never reads it again. Which means it is unused and can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown1-8/+0
2014-03-13Merge remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown1-75/+97
2014-03-11ASoC: codec: Simplify ASoC probe code.Xiubo Li1-8/+0
For some CODEC drivers like who act as the MFDs children are ignored by this patch. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-01ASoC: max98090: Use SOC_ENUM_SINGLE_VIRT_DECL()Lars-Peter Clausen1-1/+1
For the upcoming consolidation for MUXs and virtual MUXs we need to mark virtual enums as such. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20ASoC: max98090: Use SOC_ENUM_SINGLE_DECL()Takashi Iwai1-75/+97
Just replace with the helper macro. No functional change at all. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-16ASoC: max98090: make REVISION_ID readableStephen Warren1-0/+1
The REVISION_ID register is not currently marked readable. snd_soc_read() refuses to read the register, and hence probe() fails. Fixes: d4807ad2c4c0 ("regmap: Check readable regs in _regmap_read") [exposed the bug, by checking for readability] Fixes: 685e42154dcf ("ASoC: Replace max98090 Device Driver") [left out this register from the readable list] Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-12ASoC: max98090: sync regcache on entering STANDBYDylan Reid1-10/+10
Sync regcache when entering STANDBY from OFF. ON isn't entered with OFF as the current state, so the registers were not being re-synced after suspend/resume. The 98088 and 98095 already call regcache_sync from STANDBY. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-01-13ASoC: max98090: Use params_width() rather than memory formatMark Brown1-2/+2
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-19ASoC: max98090: Use power efficient workqueueMark Brown1-4/+6
None of the delayed work the driver schedules has particularly short delays and it is not performance sensitive so let the scheduler run it wherever is most efficient rather than in a per CPU workqueue by using the system power efficient workqueue. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-06-17Merge remote-tracking branch 'asoc/topic/max98090' into asoc-nextMark Brown1-4/+20
2013-06-06ASoC: max98090: Guard runtime PM callbacksMark Brown1-0/+2
Otherwise the functions will be defined but unreferenced when runtime PM is disabled, generating warnings. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-20ASoC: max98090: request IRQF_ONESHOT interruptAndrew Bresticker1-1/+1
request_threaded_irq() rejects calls which both do not specify a handler (indicating that the primary IRQ handler should be used) and do not set IRQF_ONESHOT because the combination is unsafe with level-triggered interrupts. It is safe in this case, though, since max98090 IRQs are edge-triggered and the interrupts aren't ACK'ed until the codec's IRQ status register is read. Because of this, an IRQF_ONESHOT interrupt doesn't really make a difference, but request one anyway in order to make request_threaded_irq() happy. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-17ASoC: max98090: add digital mic mux to record pathAndrew Bresticker1-4/+18
The max98090 driver currently treats the digital mic enable as a supply on the record path, causing the digital mic enable to always be turned on when attempting to record. This is incorrect, however, since the digital mic enable is also a mux control where 0 selects the ADC output as input to the record-path DSP and 1 selects the digital mic. This patch adds a virtual DMIC mux to the reocrd path so that we can switch between the ADC and the digital mic for recording. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-12Merge remote-tracking branch 'asoc/topic/max98090' into asoc-nextMark Brown1-29/+16
2013-03-20ASoC:: max98090: Remove executable bitJoe Perches1-0/+0
Source files shouldn't have the executable bit set. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04ASoC: max98090: Remove unnecessary bracesSachin Kamat1-12/+6
Braces are not required for single line statements. Silences the following checkpatch warnings: WARNING: braces {} are not necessary for single statement blocks. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04ASoC: max98090: Fix checkpatch errors related to spacingSachin Kamat1-8/+8
Fixes the following type of checkpatch errors: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04ASoC: max98090: Make struct dev_pm_ops constSachin Kamat1-1/+1
Silences the following checkpatch warning: WARNING: struct dev_pm_ops should normally be const. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04ASoC: max98090: Convert to devm_regmap_init_i2c()Sachin Kamat1-6/+1
devm_regmap_init_i2c() is device managed and makes error handling and code cleanup simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04ASoC: max98090: Remove unneeded version.h header includeSachin Kamat1-2/+0
version.h header file inclusion is not required as detected by versioncheck. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-07ASoC: Replace max98090 Device DriverJerry Wong1-0/+2398
This patch completes the replacement of the existing max98090 driver, by installing a more complete driver. Signed-off-by: Jerry Wong <jerry.wong@maximintegrated.com> Tested-by: Matthew Mowdy <matthew.mowdy@maximintegrated.com> Reviewed-by: Ralph Birt <ralph.birt@maximintegrated.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-07ASoC: Replace max98090 Device DriverJerry Wong1-577/+0
This patch removes the existing max98090 driver prior to installing a more complete one. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: Add max98090 codec driverKuninori Morimoto1-0/+577
This patch adds the max98090 codec prototype driver. It supports Headphone only at this point. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>