summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5659.c
AgeCommit message (Collapse)Author
2024-05-03ASoC: codecs: Drop explicit initialization of struct ↵Uwe Kleine-König
i2c_device_id::driver_data to 0 These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240502074722.1103986-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-12ASoC: codecs: fix TYPO 'reguest' to 'request' in error logYinchuan Guo
This patch corrects a common misspelling of "request" as "reguest" found in error log across multiple files within sound/soc/codecs. Signed-off-by: Yinchuan Guo <guoych37@mail2.sysu.edu.cn> Link: https://msgid.link/r/20240212144247.43744-1-guoych37@mail2.sysu.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-13ASoC: rt5659: Drop legacy GPIO includeLinus Walleij
This driver include the GPIO legacy header <linux/gpio.h yet doesn't use symbols from it. It is using the new consumer include <linux/gpio/consumer.h already. Drop the surplus include. Signed-off-by: Linus Walleij <linus.walleij@linaro.org Link: https://lore.kernel.org/r/20230812-descriptors-asoc-v1-11-eb4dca1f68af@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-22ASoC: rt5659: Use the devm_clk_get_optional() helperChristophe JAILLET
Use devm_clk_get_optional() instead of hand writing it. This saves some LoC and improves the semantic. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/5b44b2fddd8973e949e4ae2132971b147cfd1ec1.1684594544.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-08ASoC: Switch i2c drivers back to use .probe()Uwe Kleine-König
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de Link: https://lore.kernel.org/r/20230425095716.331419-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org
2022-06-27ASoC: rt*: Remove now redundant non_legacy_dai_naming flagCharles Keepax
The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-57-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-06ASoC: rt*: use simple i2c probe functionStephen Kitt
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20220405130326.2107293-1-steve@sk2.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27ASoC: codecs: Fix spelling mistake "Unsupport" -> "Unsupported"Colin Ian King
There are spelling mistakes in dev_err error messages. Fix them. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210924231003.144502-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27ASoC: rt5659: Fix the lost powers for the HDA headerJack Yu
The power of "LDO2", "MICBIAS1" and "Mic Det Power" were powered off after the DAPM widgets were added, and these powers were set by the JD settings "RT5659_JD_HDA_HEADER" in the probe function. In the codec probe function, these powers were ignored to prevent them controlled by DAPM. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Jack Yu <jack.yu@realtek.com> Message-Id: <15fced51977b458798ca4eebf03dafb9@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-31Merge tag 'mute-led-rework' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.13 ALSA: control - add generic LED API This patchset tries to resolve the diversity in the audio LED control among the ALSA drivers. A new control layer registration is introduced which allows to run additional operations on top of the elementary ALSA sound controls. A new control access group (three bits in the access flags) was introduced to carry the LED group information for the sound controls. The low-level sound drivers can just mark those controls using this access group. This information is not exported to the user space, but user space can manage the LED sound control associations through sysfs (last patch) per Mark's request. It makes things fully configurable in the kernel and user space (UCM). The actual state ('route') evaluation is really easy (the minimal value check for all channels / controls / cards). If there's more complicated logic for a given hardware, the card driver may eventually export a new read-only sound control for the LED group and do the logic itself. The new LED trigger control code is completely separated and possibly optional (there's no symbol dependency). The full code separation allows eventually to move this LED trigger control to the user space in future. Actually it replaces the already present functionality in the kernel space (HDA drivers) and allows a quick adoption for the recent hardware (ASoC codecs including SoundWire). snd_ctl_led 24576 0 The sound driver implementation is really easy: 1) call snd_ctl_led_request() when control LED layer should be automatically activated / it calls module_request("snd-ctl-led") on demand / 2) mark all related kcontrols with SNDRV_CTL_ELEM_ACCESS_SPK_LED or SNDRV_CTL_ELEM_ACCESS_MIC_LED Link: https://lore.kernel.org/r/20210317172945.842280-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-03-16ASoC: rt5659: Update MCLK rate in set_sysclk()Sameer Pujar
Simple-card/audio-graph-card drivers do not handle MCLK clock when it is specified in the codec device node. The expectation here is that, the codec should actually own up the MCLK clock and do necessary setup in the driver. Suggested-by: Mark Brown <broonie@kernel.org> Suggested-by: Michael Walle <michael@walle.cc> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1615829492-8972-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: rt5659: clarify expressionPierre-Louis Bossart
cppcheck warning: sound/soc/codecs/rt5659.c:3515:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5659_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210302212527.55158-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-10ASoC: codecs: rt5659: Remove many unused const variablesLee Jones
Looks as though they've never been used. Fixes the following W=1 kernel build warning(s): In file included from sound/soc/codecs/rt5659.c:25: In file included from sound/soc/codecs/rt5659.c:25: sound/soc/codecs/rt5659.c:1232:2: warning: ‘rt5659_ad_monor_asrc_enum’ defined but not used [-Wunused-const-variable=] 1232 | rt5659_ad_monor_asrc_enum, RT5659_ASRC_3, RT5659_AD_MONO_R_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1231:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1231 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1228:2: warning: ‘rt5659_ad_monol_asrc_enum’ defined but not used [-Wunused-const-variable=] 1228 | rt5659_ad_monol_asrc_enum, RT5659_ASRC_3, RT5659_AD_MONO_L_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1227:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1227 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1224:2: warning: ‘rt5659_ad_sto2_asrc_enum’ defined but not used [-Wunused-const-variable=] 1224 | rt5659_ad_sto2_asrc_enum, RT5659_ASRC_3, RT5659_AD_STO2_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1223:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1223 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1220:2: warning: ‘rt5659_ad_sto1_asrc_enum’ defined but not used [-Wunused-const-variable=] 1220 | rt5659_ad_sto1_asrc_enum, RT5659_ASRC_2, RT5659_AD_STO1_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1219:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1219 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1216:2: warning: ‘rt5659_da_monor_asrc_enum’ defined but not used [-Wunused-const-variable=] 1216 | rt5659_da_monor_asrc_enum, RT5659_ASRC_2, RT5659_DA_MONO_R_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1215:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1215 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1212:2: warning: ‘rt5659_da_monol_asrc_enum’ defined but not used [-Wunused-const-variable=] 1212 | rt5659_da_monol_asrc_enum, RT5659_ASRC_2, RT5659_DA_MONO_L_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1211:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1211 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1208:2: warning: ‘rt5659_da_sto_asrc_enum’ defined but not used [-Wunused-const-variable=] 1208 | rt5659_da_sto_asrc_enum, RT5659_ASRC_2, RT5659_DA_STO_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1207:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1207 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/20200709162328.259586-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-22ASoC: codecs: rt*: rename to snd_soc_component_read()Kuninori Morimoto
We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87d05z4mce.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-11ASoC: rt5659: remove redundant assignment to variable idxColin Ian King
Variable idx is being assigned with a value that is never idx, it is assigned a new value a couple of statements later. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200208221529.37105-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-12ASoC: rt5659: Separate adc 1/2 clock controlBard Liao
The control bits of ADC 1 and 2 clock are different. We have to separate it. 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 branch 'fix/rt5659' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5659
2018-03-12ASoC: rt5659: fix wrong control register for ADC2 powerBard Liao
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-02-13ASoC: rt5659: rt5659_intel_hd_header_probe_setup() can be staticWu Fengguang
Fixes: 041e74b71491 ("ASoC: rt5659: Add the support of Intel HDA Header") Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: rt5659: replace codec to componentKuninori Morimoto
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .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-02-12ASoC: rt5659: Remove the routing path of the power widget "LDO2"oder_chiou@realtek.com
This patch removes the routing path of the power widget "LDO2", and it should be depended on the hardware design. The power widget "LDO2" should add the routing path with the MICBIAS in the machine driver that is reasonable. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: rt5659: Add the support of Intel HDA Headeroder_chiou@realtek.com
The patch adds the support of Intel HDA Header. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18ASoC: rt5659: move set_pll to codec levelBard Liao
Move set_pll function to codec level and people can use it at both codec and dai level. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18ASoC: rt5659: move set_sysclk to codec levelBard Liao
Move set_sysclk to codec level and people can use it at both codec and dai level. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18ASoC: rt5659: connect LOUT Amp with Charge PumpBard Liao
"Charge Pump" is necessary for "LOUT Amp". Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18ASoC: rt5659: register power bit of LOUT AmpBard Liao
There is a power bit for LOUT Amp. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-01Merge remote-tracking branches 'asoc/topic/rt5563', 'asoc/topic/rt5616', ↵Mark Brown
'asoc/topic/rt5645', 'asoc/topic/rt5659' and 'asoc/topic/rt5663' into asoc-next
2017-08-10ASoC: codecs: add const to snd_soc_codec_driver structuresBhumika Goyal
Declare snd_soc_codec_driver structures as const as they are only passed as an argument to the function snd_soc_register_codec. This argument is of type const, so declare the structures with this property as const. In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in a copy operation along with getting passed to snd_soc_register_codec. So, it can be made const too. Done using Coccinelle: @match disable optional_qualifier@ identifier s; position p; @@ static struct snd_soc_codec_driver s@p={...}; @good1@ identifier match.s; position p; @@ snd_soc_register_codec(...,&s@p,...) @bad@ identifier match.s; position p!={match.p,good1.p}; @@ s@p @depends on !bad disable optional_qualifier@ identifier match.s; @@ static +const struct snd_soc_codec_driver s={...}; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-24ASoC: rt5659: constify acpi_device_id.Arvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-17ASoC: rt5659: fix platform_no_drv_owner.cocci warningskbuild test robot
sound/soc/codecs/rt5659.c:4236: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>
2017-01-12ASoC: rt5659: drop double constNicholas Mc Guire
Drop the const qualifier as it is being added by SOC_ENUM_DOUBLE_DECL() already which is called by SOC_ENUM_SINGLE_DECL() as well as the double const by calls to SOC_VALUE_ENUM_SINGLE_DECL() via SOC_VALUE_ENUM_DOUBLE_DECL). Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-12ASoC: rt5659: declare rt5659_i2c_driver staticNicholas Mc Guire
Declar rt5659_i2c_driver, which is only being passed to module_i2c_driver(rt5659_i2c_driver), static. Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-12ASoC: rt5659: use msleep() for long delaysNicholas Mc Guire
ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. For this large delay msleep() is preferable. Fixes: commit d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Link: http://lkml.org/lkml/2017/1/11/377 Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-29Merge remote-tracking branches 'asoc/topic/rt5659', 'asoc/topic/rt5660', ↵Mark Brown
'asoc/topic/rt5677' and 'asoc/topic/samsung' into asoc-next
2016-09-01ASoC: rt5659: Enable IRQ output for GPIO1 pinNicolin Chen
Since it's possible to have an IRQ without enabling JD3, the GPIO1 pin then would remain its default GPIO function which is set as an input direction (seeing from rt5659). Meanwhile, CPU would also listen this connection via its own GPIO input: [input] [input] CPU GPIO <--------> RT5659 GPIO1 The result for the IRQ on the CPU side will be unexpectable. So this patch enables the IRQ output for GPIO1 pin any way as long as there's an IRQ assigned from platform data or DT: [input] [IRQ output] CPU GPIO <--------< RT5659 GPIO1 Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: codec duplicated callback function goes to component on rt5659Kuninori Morimoto
codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: rt5659: Add mclk controlsNicolin Chen
The codec driver should control the mclk. So this patch adds this support. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-13Merge remote-tracking branches 'asoc/topic/rt5640', 'asoc/topic/rt5659', ↵Mark Brown
'asoc/topic/samsung' and 'asoc/topic/ssm4567' into asoc-next
2016-01-21ASoC: rt5659: avoid unused variable warning for rt5659_acpi_matchArnd Bergmann
The newly added rt5659 codec driver unconditionally defines an ACPI device match table but then uses ACPI_PTR() to remove the only reference to it, so we get a harmless build warning: sound/soc/codecs/rt5659.c:4200:30: warning: 'rt5659_acpi_match' defined but not used [-Wunused-variable] static struct acpi_device_id rt5659_acpi_match[] = { This changes both the OF match table and the ACPI match table to follow the same style, using ACPI_PTR/of_match_ptr to make the reference conditional, and using an #ifdef to hide the table. This also adds the missing MODULE_DEVICE_TABLE for the OF case and adapts the formatting to the same style. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-13ASoC: rt5659: Staticise rt5659_i2c_shutdownAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-13ASoC: rt5659: Fix irq leakAxel Lin
Use devm_request_threaded_irq to ensure the irq is freed when unload the module. The rt5659->i2c is no longer used after this conversion, thus remove it as well. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18ASoC: rt5659: add rt5659 codec driverBard Liao
This is the initial codec driver for rt5659. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>