summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)AuthorFilesLines
2018-03-28Merge remote-tracking branches 'asoc/topic/isabelle', 'asoc/topic/jz4740', ↵Mark Brown7-254/+446
'asoc/topic/lm49453', 'asoc/topic/max9759' and 'asoc/topic/max98088' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/hdmi-codec', ↵Mark Brown3-62/+54
'asoc/topic/ics43432', 'asoc/topic/imx-wm8962' and 'asoc/topic/inno_rk3036' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/fsl_esai', 'asoc/topic/fsl_ssi', ↵Mark Brown1-17/+11
'asoc/topic/fsl_utils', 'asoc/topic/generic-dmaengine' and 'asoc/topic/gtm601' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es7134', ↵Mark Brown5-148/+120
'asoc/topic/es8316', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/da7219', 'asoc/topic/da732x', ↵Mark Brown5-269/+390
'asoc/topic/da9055' and 'asoc/topic/dmic' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/cx20442', 'asoc/topic/cygnus', ↵Mark Brown5-566/+532
'asoc/topic/da7210', 'asoc/topic/da7213' and 'asoc/topic/da7218' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/cs42xx8', ↵Mark Brown7-265/+256
'asoc/topic/cs43130', 'asoc/topic/cs4349' and 'asoc/topic/cs53l30' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/cs4271', 'asoc/topic/cs42l42', ↵Mark Brown9-352/+316
'asoc/topic/cs42l51', 'asoc/topic/cs42l52' and 'asoc/topic/cs42l56' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/cs35l33', 'asoc/topic/cs35l34', ↵Mark Brown5-336/+303
'asoc/topic/cs35l35', 'asoc/topic/cs4265' and 'asoc/topic/cs4270' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/cpcap', 'asoc/topic/cq93vc' and ↵Mark Brown5-39/+1607
'asoc/topic/cs35l32' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', ↵Mark Brown13-488/+725
'asoc/topic/bd28623', 'asoc/topic/blackfin' and 'asoc/topic/bt-sco' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/ak5386', 'asoc/topic/ak5558', ↵Mark Brown7-181/+641
'asoc/topic/alc5623', 'asoc/topic/alc5632' and 'asoc/topic/amd' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/ak4554', 'asoc/topic/ak4613', ↵Mark Brown5-188/+173
'asoc/topic/ak4641', 'asoc/topic/ak4642' and 'asoc/topic/ak4671' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/adav80x', 'asoc/topic/ads117x', ↵Mark Brown10-175/+893
'asoc/topic/ak4104', 'asoc/topic/ak4458' and 'asoc/topic/ak4535' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/ad73311', 'asoc/topic/adau1373', ↵Mark Brown10-261/+243
'asoc/topic/adau17x1', 'asoc/topic/adau1977' and 'asoc/topic/adau7002' into asoc-next
2018-03-28Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ab8500', ↵Mark Brown14-643/+580
'asoc/topic/ac97', 'asoc/topic/ad1836' and 'asoc/topic/ad193x' into asoc-next
2018-03-28Merge remote-tracking branch 'asoc/topic/rt5665' into asoc-nextMark Brown2-184/+169
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown1-82/+80
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm5102a' into asoc-nextMark Brown1-9/+7
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-nextMark Brown1-26/+25
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm3008' into asoc-nextMark Brown1-21/+15
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm186x' into asoc-nextMark Brown4-92/+68
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm179x' into asoc-nextMark Brown4-38/+20
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm1789' into asoc-nextMark Brown5-0/+369
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-nextMark Brown1-33/+29
2018-03-28Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown16-1225/+1297
2018-03-28Merge remote-tracking branch 'asoc/topic/component-platform' into asoc-nextMark Brown4-93/+65
2018-03-28Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/rt5659', ↵Mark Brown3-9/+16
'asoc/fix/ssm2602' and 'asoc/fix/topology' into asoc-linus
2018-03-28ASoC: cpcap: replace codec to componentKuninori Morimoto1-79/+73
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: ssm2602: Replace reg_default_raw with reg_defaultJames Kelly1-6/+13
SSM2602 driver is broken on recent kernels (at least since 4.9). User space applications such as amixer or alsamixer get EIO when attempting to access codec controls via the relevant IOCTLs. Root cause of these failures is the regcache_hw_init function in drivers/base/regmap/regcache.c, which prevents regmap cache initalization from the reg_defaults_raw element of the regmap_config structure when registers are write only. It also disables the regmap cache entirely when all registers are write only or volatile as is the case for the SSM2602 driver. Using the reg_defaults element of the regmap_config structure rather than the reg_defaults_raw element to initalize the regmap cache avoids the logic in the regcache_hw_init function entirely. It also makes this driver consistent with other ASoC codec drivers, as this driver was the ONLY codec driver that used the reg_defaults_raw element to initalize the cache. Tested on Digilent Zybo Z7 development board which has a SSM2603 codec chip connected to a Xilinx Zynq SoC. Signed-off-by: James Kelly <jamespeterkelly@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2018-03-19ASoC: codecs: Add support for PCM1789Mylène Josserand5-0/+369
Add Texas Instruments's PCM1789 DAC support. It is a simple DAC and does not have many registers. One particularity about this DAC is that the clocks must be always enabled. Also, an entire software reset is necessary while starting to play a sound otherwise, the clocks are not synchronized (so the DAC is not able to send data). Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: da7210: Use devm_snd_soc_register_component()weiyongjun (A)1-1/+1
Since the remove callback is removed, the snd_soc_unregister_component() is missing when remove device. Using devm_snd_soc_register_component() instead of snd_soc_register_component(). Fixes: d06f33aed85c ("ASoC: da7210: replace codec to component") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-14ASoC: da7219: make structure da7219_dai_clks_ops staticColin Ian King1-1/+1
structure da7219_dai_clks_ops is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: sound/soc/codecs/da7219.c:1777:22: warning: symbol 'da7219_dai_clks_ops' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-13ASoC: da7219: clkdev_drop usage depends on CONFIG_COMMON_CLKAdam Thomson1-0/+2
Fixes: ASoC: da7219: Add common clock usage for providing DAI clks clkdev_drop usage in the codec remove function should be dependent on if CONFIG_COMMON_CLK is defined for the platform, otherwise it can cause build failures for platforms that do not support this. The clkdev_* functions are still defined for those platforms, in headers and source but the functions are not linked in. This patch resolves this issue, so clkdev_drop is only used if CONFIG_COMMON_CLK is defined. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-12ASoC: rt5659: fix wrong control register for ADC2 powerBard Liao1-2/+2
The control register for ADC L2 and R2 is RT5659_PWR_DIG_1 not RT5659_PWR_DIG_2. Signed-off-by: Zhong An <zhongan@pinecone.net> Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-12ASoC: rt5659: fix wrong bit define for ADC L2 power.Bard Liao1-1/+1
RT5659_PWR_ADC_L2_BIT should be 2. Signed-off-by: Zhong An <zhongan@pinecone.net> Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-12Merge remote-tracking branches 'asoc/fix/amd', 'asoc/fix/hdmi-codec', ↵Mark Brown4-15/+33
'asoc/fix/rt5651', 'asoc/fix/samsung', 'asoc/fix/sgtl5000', 'asoc/fix/sunxi' and 'asoc/fix/wm-adsp' into asoc-linus
2018-03-09ASoC: da7219: Add common clock usage for providing DAI clksAdam Thomson2-8/+130
There is a need to use DA7219 as DAI clock master for other codecs within a system, which means that the DAI clocks are required to remain, regardless of whether the codec is actually running playback/capture. To be able to expose control of the DAI clocking the common clock framework has been employed. The current implementation adds a simple clock gate for enabling and disabling the DAI clocks, with no rate control supported (this is still handled through standard hw_params() functions as before). If DT is enabled then the clock is added to the OF providers list, otherwise a clkdev lookup is used. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-07Merge branch 'topic/rt5651' of ↵Mark Brown2-353/+420
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
2018-03-07ASoC: rt5651: Rewrite jack-type detectionHans de Goede2-42/+70
We get the insertion event before the jack is fully inserted at which point the second ring on a TRRS connector may short the 2nd ring and sleeve contacts. Testing has shown that this short-circuit may happen as late as 500ms after the insertion event, but it never lasts longer then 300ms. This commit changes the detection algorithm to require 5 identical OVCD values in a row at 100 ms intervals to fix the jack-type sometimes getting mis-detected. Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-07ASoC: rt5651: Add rt5651_jack_inserted() helperHans de Goede1-17/+28
Add rt5651_jack_inserted() helper to get the jack-detect switch status, This is a preparation patch for rewriting the jack type-detection to make it more reliable. Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-07ASoC: rt5651: Enable Platform Clock during jack-type detectHans de Goede1-0/+3
When using RCCLK instead of MCLK / PLL1 the OVCD status often gets stuck at its last value, which breaks jack-type detection. This commit fixes this by force-enabling the platform clock when doing jack-type detection. Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-07ASoC: rt5651: Enable sticky mode for OVCDHans de Goede1-3/+30
When the mic-gnd contacts are short-circuited by a headphones plug, the hardware periodically retries if it can apply the bias-current leading to the OVCD status flip-flopping 1-0-1 with it being 0 about 10% of the time. This commit enables the sticky bit for the OVCD status to deal with this. This commit also introduces 2 helper functions to deal with the OVCD status bit, this may seem a bit overkill now, but these will also be used in future patches. Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-07ASoC: rt5651: Allow specifying the OVCD scale-factor through a device-propertyHans de Goede2-0/+30
OVer-Current-Detection (OVCD) for the micbias current is used to detect if an inserted jack is a headset or headphones (mic shorted to ground). The threshold for at which current the OVCD triggers on the rt5651 is not only controlled by setting the absolute current limit, but also by setting a scale factor which applies to the limit. Testing has shown that we need to set both (depending on the board). This commit adds support for the sofar unused OVCD scale-factor register and adds support for specifying non-default values for it through the "realtek,over-current-scale-factor" device-property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-07ASoC: rt5651: Allow specifying over-current threshold through a device-propertyHans de Goede2-1/+22
OVer-Current-Detection (OVCD) for the micbias current is used to detect if an inserted jack is a headset or headphones (mic shorted to ground). Some boards may need different values for the OVCD current threshold because of a resistor on the board in serial with or parallel to the jack mic contact. This commit adds support for configuring the OCVD current threshold through the "realtek,over-current-threshold-microamp" device-property. Note this commit changes the default value from 600uA to 2000uA, because testing has shown 600uA to be a poor default. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-07ASoC: rt5651: Configure jack-detect source through a device-propertyHans de Goede1-26/+7
Configure the jack-detect source through a device-property which can be set by code outside of the codec driver. Rather then putting platform specific DMI quirks inside the generic codec driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-07ASoC: rt5651: Make rt5651_apply_properties() privateHans de Goede2-4/+12
The idea behind exporting rt5651_apply_properties(), was for it to be used on platforms where the platform code may need to add device-properties, rather then relying only on properties set by the firmware. The platform code could then call rt5651_apply_properties() after adding properties to make sure that the codec driver was aware of the new properties. But this is not necessary, as long as we do all property parsing from the codec component-driver's probe function (or later) then the machine driver can attach properties before calling snd_soc_register_card and calling rt5651_apply_properties() for ordering reasons is not necessary. This commit makes rt5651_apply_properties() private and adds 2 comments documenting that all property parsing must be done from the codec component-driver's probe function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-01Merge branch 'topic/component-platform' of ↵Mark Brown4-93/+65
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
2018-03-01ASoC: rt5651: Always keep OVCD enabledHans de Goede1-8/+1
OVCD is not only useful for jack-type detection, but is also useful to protect against over-current faults in general, so always keep OVCD enabled, instead of only enabling it for jack-type detection. Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-01ASoC: rt5651: Only configure OVCD once at set_jack timeHans de Goede1-9/+11
Only configure OVCD once at set_jack time, rather then configuring it on every jack-insertion event and switch to using bit field defines instead of hardcoding a magic value. Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>