summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
AgeCommit message (Collapse)AuthorFilesLines
2016-09-27ASoC: wm8991: fix wrong usage of DECLARE_TLV_DB_LINEAR()Takashi Sakamoto1-7/+19
As long as reading datasheet of WM8991, this driver includes wrong usage of DECLARE_TLV_DB_LINEAR(). In "Table 6 Input PGA Volume Range", volume is represented in 5 bits by 1.5 dB/step between -16.5/30.0 dB. Thus, 'in_pga_tlv' should be dB step representation. In "Table 34 LOMIX and ROMIX Volume Range", volume is represented in three bits by -3 dB/step from 0 to -21 dB. Thus, 'out_mix_tlv' should be dB step represenation. In "Table 36 LOPGA, ROPGA, LOUT, ROUT and SPKVOL Volume Range", volume is represented in 7 bits by 1 dB/step from -73 to 6 dB, including mute. Thus, 'out_pga_tlv' should be dB step representation. In "Table 26 Digital Volume Range", volume is represented in 8 bits by 3/8 dB/step from -71.625 to 0 dB. Thus, 'out_dac_tlv' should be dB step representation. In "Table 16 ADC Digital Volume Range", volume is represented in 8 bits by 3/8 dB/step from -71.625 to 17.625 dB. Thus, 'in_adc_tlv' should be dB step representation. In "Table 23 Digital Sidetone Volume", volume is represented in 5 bits by 3 dB/step from -36 to 0 dB. Thus, 'out_sidetone_tlv' should be dB step representation. In "Table 12 Left Input Mixer Volume Control", volume is represented in 3 bits by 3 dB/step from -12 to 6 dB Totally, current implementation includes misuse of TLV-related macro. This commit replaces usage of DECLARE_TLV_DB_LINEAR() with proper macros, to give proper information to applications in user land. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-01Merge tag 'armsoc-drivers' of ↵Linus Torvalds1-29/+4
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "Driver updates for ARM SoCs. A slew of changes this release cycle. The reset driver tree, that we merge through arm-soc for historical reasons, is also sizable this time around. Among the changes: - clps711x: Treewide changes to compatible strings, merged here for simplicity. - Qualcomm: SCM firmware driver cleanups, move to platform driver - ux500: Major cleanups, removal of old mach-specific infrastructure. - Atmel external bus memory driver - Move of brcmstb platform to the rest of bcm - PMC driver updates for tegra, various fixes and improvements - Samsung platform driver updates to support 64-bit Exynos platforms - Reset controller cleanups moving to devm_reset_controller_register() APIs - Reset controller driver for Amlogic Meson - Reset controller driver for Hisilicon hi6220 - ARM SCPI power domain support" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (100 commits) ARM: ux500: consolidate base platform files ARM: ux500: move soc_id driver to drivers/soc ARM: ux500: call ux500_setup_id later ARM: ux500: consolidate soc_device code in id.c ARM: ux500: remove cpu_is_u* helpers ARM: ux500: use CLK_OF_DECLARE() ARM: ux500: move l2x0 init to .init_irq mfd: db8500 stop passing around platform data ASoC: ab8500-codec: remove platform data based probe ARM: ux500: move ab8500_regulator_plat_data into driver ARM: ux500: remove unused regulator data soc: raspberrypi-power: add CONFIG_OF dependency firmware: scpi: add CONFIG_OF dependency video: clps711x-fb: Changing the compatibility string to match with the smallest supported chip input: clps711x-keypad: Changing the compatibility string to match with the smallest supported chip pwm: clps711x: Changing the compatibility string to match with the smallest supported chip serial: clps711x: Changing the compatibility string to match with the smallest supported chip irqchip: clps711x: Changing the compatibility string to match with the smallest supported chip clocksource: clps711x: Changing the compatibility string to match with the smallest supported chip clk: clps711x: Changing the compatibility string to match with the smallest supported chip ...
2016-07-24Merge remote-tracking branches 'asoc/topic/wm8753' and 'asoc/topic/wm8985' ↵Mark Brown4-38/+149
into asoc-next
2016-07-24Merge remote-tracking branches 'asoc/topic/tas571x', ↵Mark Brown6-356/+419
'asoc/topic/tlv320aic31xx', 'asoc/topic/tpa6130a2', 'asoc/topic/twl6040' and 'asoc/topic/wm8731' into asoc-next
2016-07-24Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', ↵Mark Brown2-321/+112
'asoc/topic/sti' and 'asoc/topic/sunxi' into asoc-next
2016-07-24Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5614', ↵Mark Brown7-3/+665
'asoc/topic/rt5670' and 'asoc/topic/s8' into asoc-next
2016-07-24Merge remote-tracking branches 'asoc/topic/max98504', 'asoc/topic/max9867', ↵Mark Brown9-118/+1715
'asoc/topic/max9877', 'asoc/topic/mtk' and 'asoc/topic/nau8825' into asoc-next
2016-07-24Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/hdmi', ↵Mark Brown5-7/+931
'asoc/topic/maintainers' and 'asoc/topic/max8960' into asoc-next
2016-07-24Merge remote-tracking branches 'asoc/topic/cs53l30', 'asoc/topic/cygnus', ↵Mark Brown6-69/+1678
'asoc/topic/da7219' and 'asoc/topic/davinci' into asoc-next
2016-07-24Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', ↵Mark Brown13-65/+1614
'asoc/topic/bt-sco', 'asoc/topic/compress' and 'asoc/topic/cs35l33' into asoc-next
2016-07-24Merge remote-tracking branches 'asoc/topic/adau', 'asoc/topic/adau7002', ↵Mark Brown19-138/+448
'asoc/topic/adsp', 'asoc/topic/ak4613' and 'asoc/topic/ak4642' into asoc-next
2016-07-24Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-nextMark Brown2-2/+24
2016-07-24Merge remote-tracking branch 'asoc/topic/pcm5102a' into asoc-nextMark Brown1-1/+0
2016-07-24Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-nextMark Brown2-2/+2
2016-07-24Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown2-2/+12
2016-07-24Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown1-0/+1
2016-07-21ASoC: cs53l30: Fix bit shift issue of TDM modeNicolin Chen1-2/+6
The TDM mode using PCM format now has two-bit right shift due to the format configuration in the driver. According to Figure 4-13 in the CS53L30 datasheet, using ASP_SCLK_INV = 0 and SHIFT_LEFT = 1 should be the correct combination to create one-bit right shift for the DSP type A format. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-21ASoC: cs53l30: Fix a bug for TDM slot location validationNicolin Chen1-2/+2
The maximum slot number of CS53L30 is 4 while it should support the situation that's less than 4 channels based on the rx_mask. So when the driver validates the last slot location, it should check the last active slot instead of always the 4th one. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-15ASoC: nau8825: drop redundant idiom when converting integer to booleanJohn Hsu1-2/+2
Thanks Mark and Anatol for the discussion. According to the result, the standard C will translate any non-zero value into true, or false otherwise. QUOTE: "6.3.1.2 Boolean type When any scalar value is converted to _Bool, the result is 0 if the value compares equal to 0; otherwise, the result is 1 " Thus, the "!!" idiom is removed. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14ASoC: nau8825: jack connection decision with different insertion logicJohn Hsu1-2/+9
The original design only covers the jack insertion logic is active low. Add more condition to cover no matter the logic is active low and high. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14ASoC: rt5514-spi: Convert to use devm_* APIAxel Lin1-19/+6
Use devm_* API to simplify the code. This patch also fixes the return value in probe error paths. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-12ASoC: ab8500-codec: remove platform data based probeArnd Bergmann1-29/+4
The ux500 platform hasn't used board files for a long time, and nothing defines a ab8500_codec_platform_data, so we can just remove the probing based on that and always use device tree properties directly. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-07-12sgtl5000: add Lineout volume controlKalle Kankare1-0/+10
This controls the volume for the line out pins of SGTL5000. Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11ASoC: rt286: set combo jack for KabylakeVinod Koul1-0/+7
Like in Skylake, Kabylake also uses combo jack so add Kabylake to DMI match for combo jack configuration. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11ASoC: hdac_hdmi: Add device id for KabylakeShreyas NC1-0/+1
Kabylake platform is similar to Skylake. So, add the device id. Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08ASoC: rt5645: Add ACPI ID 10EC5640Vinod Koul1-0/+7
Some CHT platforms use RT5645 codec which has entry 10EC5640 so add it. Also add DMI quirk for jack detection. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98001 [Jack detection] Suggested-by: Stephen Just <stephenjust@gmail.com> Signed-off-by: Sachin Mokashi <sachinx.mokashi@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-07ASoC: rt5645: add DAC1 soft volume func controlBard Liao2-0/+14
This patch add an alsa control for DAC1 digital volume control function selection. The options are: 0: Gain update immediately 1: Gain update when a zero crossing 2: Gain update when a zero crossing with a soft ramp Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-07ASoC: rt5645: set RT5645_PRIV_INDEX as volatileBard Liao1-0/+1
RT5645_PRIV_INDEX(0x6a) indicate the address of PR- registers. So, it should be volatile. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-04ASoC: cs35l33: Remove unused including <linux/version.h>Wei Yongjun1-1/+0
Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-04ASoC: bt-sco: extend rate and add a general compatible stringGarlic Tseng1-16/+36
Add supports for 16k (wideband BT) and add a general compatible string "linux,bt-sco" Signed-off-by: Garlic Tseng <garlic.tseng@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-04ASoC: bt-sco: add config promptGarlic Tseng1-1/+1
Add config prompt for bt-sco codec driver Signed-off-by: Garlic Tseng <garlic.tseng@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-01Merge remote-tracking branches 'asoc/fix/rcar', 'asoc/fix/rt5670' and ↵Mark Brown2-1/+2
'asoc/fix/wm8940' into asoc-linus
2016-07-01Merge remote-tracking branches 'asoc/fix/ak4613', 'asoc/fix/arizona', ↵Mark Brown5-5/+8
'asoc/fix/cx20442', 'asoc/fix/davinci', 'asoc/fix/fsl-ssi' and 'asoc/fix/hdmi' into asoc-linus
2016-07-01Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown1-1/+1
2016-07-01ASoC: rt5645: patch reg-0x8aBard Liao1-2/+3
reg-8a assign the tracking source for each ASRC tracker. The default value is 0x0000 which means all ASRC trackers will track LRCK1. But in most cases, we wish each ASRC tracker track the corresponding LRCK. i.e. ASRC1 tracks LRCK1, ASRC2 tracks LRCK2 and so on. So, we rewrite reg-8a as 0x0120. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-01ASoC: rt5645: fix reg-2f default value.Bard Liao1-1/+1
The default value of reg-2f in codec rt5650 is 0x5002, not 0x1002. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-01ASoC: cs35l33: Fix display revision idAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-01ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optionalAxel Lin1-5/+1
devm_gpiod_get_optional() returns NULL when the gpio is not assigned. So the if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) test is always false. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-29ASoC: max98504: Add max98504 speaker amplifier driverSylwester Nawrocki4-0/+448
This patch adds driver for the MAX98504 speaker amplifier. The MAX98504 is a high efficiency mono class D amplifier that features an integrated boost converter with voltage and current sensing ADCs for Dynamic Speaker Management. This driver does not include support for the I2S DAI, as we wouldn't be able to test such code in a hardware configuration where the amplifier has only wired the analogue input. Signed-off-by: Inha Song <ideal.song@samsung.com> [k.kozlowski: rebased on 4.1] Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> [s.nawrocki: removed unused macro definitions, rewrote regulator supply related parts, rewrote regmap configuration code, added support for speaker enable and global chip enable through DAPM, rewritten as component driver, added PDM DAI definition and TDM callbacks for PDM channels configuration] Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> -- Changes since v2: - added parsing of the VBAT brownout DT properties, - removed MAX98504_REG_SPEAKER_SOURCE_SELECT register initialization, - removed unused macro definitions. Changes since v1: - none. Changes since initial version: - added regulator supply handling, - added DAPM widges for speaker source selection, - added PDM DAI definition and TDM callbacks for setting up active PDM Tx channels and I/V sense ADC data mapping, - removed all optional DT properties, added regulator supply properties in the DT binding. Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-29ASoC: cs35l33: mark PM functions as __maybe_unusedArnd Bergmann1-2/+2
The newly added cs35l33 driver produces a harmless warning when CONFIG_PM is disabled: sound/soc/codecs/cs35l33.c:908:12: error: 'cs35l33_runtime_suspend' defined but not used [-Werror=unused-function] sound/soc/codecs/cs35l33.c:868:12: error: 'cs35l33_runtime_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to shut up the warning regardless of the configuration. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-28ASoC: cs35l33: Remove setting dapm->bias_level in cs35l33_set_bias_levelAxel Lin1-3/+0
This is done by ASoC core now. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-28ASoC: cs35l33: Remove unnecessary free_irq callAxel Lin1-5/+2
Current code uses devm_request_threaded_irq() so it does not need to explicitly call free_irq() in .probe error path and .remove. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-27ASoC: hdmi-codec: callback function will be called with private dataKuninori Morimoto1-7/+8
Current hdmi-codec driver is assuming that it will be registered from HDMI driver. Because of this assumption, each callback function has struct device pointer which is parent device (= HDMI). Then, it can use dev_get_drvdata() to get private data. OTOH, on some SoC/HDMI case, SoC has VIDEO/SOUND and HDMI IPs. This case, it needs SoC VIDEO, SoC SOUND and HDMI video, HDMI codec driver. In DesignWare HDMI IP case, SoC VIDEO (= DRM/KMS) driver tries to bind DesignWare HDMI video driver, and HDMI codec driver (= hdmi-codec). This case, above "parent device" of HDMI codec driver is DRM/KMS driver and its "device" already has private data. And, from DT and ASoC CPU/Codec/Card binding point of view, HDMI codec (= hdmi-codec) needs to have "parent device" (= DRM/KMS), otherwise, it never detect sound card. Because of these reasons, some driver can't use dev_get_drvdata() to get private data on hdmi-codec driver. This patch add new void pointer on hdmi_codec_pdata for private data, and callback function will be called with it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-27ASoC: cs35l33: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
sound/soc/codecs/cs35l33.c:1301:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-27ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.Paul Handrigan4-0/+1543
Initial commit of the Cirrus Logic cs35l33 8V boosted class D amplifier. Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-27ASoC: hdac_hdmi: Increase loglevel of hex dump printedVedang Patel1-2/+4
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it. print_hex_dump_bytes (which just calls print_hex_dump) uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency. Signed-off-by: Vedang Patel <vedang.patel@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-26ASoC: da7219: Convert driver to use generic device/fwnode functionsAdam Thomson2-69/+68
This change converts the driver from using the of_* functions to using the device_* and fwnode_* functions for accssing FW related data. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Acked-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-26ASoC: tpa6130a2: Remove goto err_gpioHelen Koike1-7/+4
Replace goto err_gpio by return ret Signed-off-by: Helen Koike <helen.koike@collabora.co.uk> Tested-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-26ASoC: tpa6130a2: Add DAPM supportHelen Koike2-113/+83
Add DAPM support and updated rx51 accordingly. As a consequence: - the exported function tpa6130a2_stereo_enable is not needed anymore - the mutex is dealt in the DAPM - the power state is tracked by the DAPM Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> [koike: port for upstream] Signed-off-by: Helen Koike <helen.koike@collabora.co.uk> Tested-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-26ASoC: wm8753: Replace magic numberAlexander Shiyan1-1/+1
Use SND_SOC_NOPM constant, instead of -1. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@kernel.org>