summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5677.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: rt5677: Avoid the pop sound that comes from the filter powerOder Chiou2015-11-101-39/+61
| | | | | | | | | The patch changes the type of DACs mixer to AUTODISABLE and add the delay time after power up to avoid the pop sound that comes from the filter power. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', ↵Mark Brown2015-08-301-4/+3
|\ \ | | | | | | | | | 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next
| | * ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-4/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error. Generate using the following coccinelle script // <smpl> @@ declarer name DECLARE_TLV_DB_RANGE; identifier tlv; constant x; @@ -unsigned int tlv[] = { - TLV_DB_RANGE_HEAD(x), +DECLARE_TLV_DB_RANGE(tlv, ... -}; +); // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/sh', ↵Mark Brown2015-08-301-90/+52
|\ \ \ | | |/ | | | | | | 'asoc/topic/simple', 'asoc/topic/sirf-codec' and 'asoc/topic/spear' into asoc-next
| * | ASoC: rt5677: Allow arbitrary block read/write via SPIBen Zhang2015-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added rt5677_spi_read() and refactored rt5677_spi_write() so that an arbitrary block in the DSP address space can be read/written via SPI. For example, this allows us to load an ELF DSP firmware with sparse sections, and stream audio samples from DSP ring buffer. Signed-off-by: Ben Zhang <benzh@chromium.org> Acked-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: rt5677: Return error if devm_gpiod_get_optional return ERR_PTRAxel Lin2015-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | If devm_gpiod_get_optional() return ERR_PTR, it means something wrong so request gpio fails. We had better return error in such case. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: rt5677: Remove NULL test for desc before gpiod_set_value_cansleep callAxel Lin2015-07-231-12/+6
| | | | | | | | | | | | | | | | | | | | | It's safe to call gpiod_set_value_cansleep() with NULL desc. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: rt5677: Switch to use unified device property APIBen Zhang2015-07-071-32/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the driver use the unified device property API so that platform data can be provided by Device Tree, ACPI or board files. Signed-off-by: Ben Zhang <benzh@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: rt5677: Switch to use descriptor-based gpiod APIBen Zhang2015-07-071-55/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the driver use the new descriptor-based gpiod API so that gpio assignment info can be provided by Device Tree, ACPI or board files. Signed-off-by: Ben Zhang <benzh@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: rt5677: Prefix hexadecimal ID register value with 0x in error printJarkko Nikula2015-07-061-1/+1
| |/ | | | | | | | | | | | | | | Make it obvious that unexpected value read from ID register is printed in hexadecimal. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', ↵Mark Brown2015-08-301-2/+5
|\ \ \ \ | | |_|/ | |/| | | | | | 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next
| | | * ASoC: Add function "rl6231_get_pre_div" to correct the dmic clock calculationOder Chiou2015-08-051-1/+4
| | |/ | |/| | | | | | | | | | | | | Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * regmap: Use reg_sequence for multi_reg_write / register_patchNariman Poushin2015-07-161-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Separate the functionality using sequences of register writes from the functions that take register defaults. This change renames the arguments in order to support the extension of reg_sequence to take an optional delay to be applied after any given register in a sequence is written. This avoids adding an int to all register defaults, which could substantially increase memory usage for regmaps with large default tables. This also updates all the clients of multi_reg_write/register_patch. Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', ↵Mark Brown2015-08-301-1/+1
|\ \ \ | | |/ | | | | | | 'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next
| * | ASoC: Constify snd_soc_dai_ops variablesAxel Lin2015-07-151-1/+1
| |/ | | | | | | | | | | | | | | The snd_soc_dai_ops variables are not modified after initialization in these drivers, so make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-151-1/+0
|/ | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/samsung' and ↵Mark Brown2015-06-051-8/+135
|\ \ | | | | | | | | | 'asoc/topic/sgtl5000' into asoc-next
| * | ASoC: rt5677: Add reset-gpio dts optionAnatol Pomozov2015-05-161-2/+30
| | | | | | | | | | | | | | | | | | | | | It allows to configure codec's RESET pin gpio Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: rt5677: Add DMIC ASRC detect functionOder Chiou2015-05-081-6/+75
| | | | | | | | | | | | | | | | | | | | | | | | The patch adds DMIC ASRC detect function to dominate whether the DMIC ASRC enable or not. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: rt5677: add i2s asrc clk src selectionBard Liao2015-04-291-0/+30
| |/ | | | | | | | | | | | | | | The ASRC source of i2s are also configurable. We add the selection in the existing rt5677_sel_asrc_clk_src API. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown2015-06-051-7/+7
|\ \
| * | ASoC: rt5677: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen2015-05-201-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: Move bias level update to the coreLars-Peter Clausen2015-04-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | All drivers have the same line at the end of the set_bias_level callback to update the bias_level state. Move this update into snd_soc_dapm_force_bias_level() and remove them from the drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: Route all bias level updates through the coreLars-Peter Clausen2015-04-271-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Use the new snd_soc_codec_force_bias_level() helper function to invoke the bias_level callback of a driver instead of calling the callback by hand. Currently the effect of this is the same, but having all bias level updates go through a central place will allow us to move more of the bias level management into the DAPM core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/fix/rt5677', 'asoc/fix/samsung' and ↵Mark Brown2015-04-291-1/+4
|\ \ \ | |_|/ |/| | | | | 'asoc/fix/tfa9879' into asoc-linus
| * | ASoC: rt5677: fixed wrong DMIC ref clockBard Liao2015-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DMIC clock source is not from codec system clock directly. it is generated from the division of system clock. And it should be 256 * sample rate of AIF1. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
| * | ASoC: rt5677: add register patch for PLLBard Liao2015-04-241-0/+3
| |/ | | | | | | | | | | | | | | | | The PLL output will be unstable in some cases. We can fix it by setting some registers. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* | ASoC: rt5677: add API to select ASRC clock sourceOder Chiou2015-03-161-0/+163
| | | | | | | | | | | | | | This patch defines an API to select the clock source for specified filters. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge branch 'fix/rt5677' of ↵Mark Brown2015-03-021-16/+16
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5677
| * | ASoC: rt5677: Correct the routing paths of that after IF1/2 DACx MuxOder Chiou2015-02-261-16/+16
| |/ | | | | | | | | | | | | The patch corrects the routing paths of that after IF1/2 DACx Mux Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt5677: Keep the LDO2 powered while used in the suspend modeOder Chiou2015-03-021-8/+8
| | | | | | | | | | | | | | | | The patch keeps the ldo2 power while the DSP function of "Voice Wake Up" used in the suspend mode. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt5677: Add the chip type to distinguish the setting of the clock sourceOder Chiou2015-03-021-6/+22
|/ | | | | | | | There is only one clock source in the rt5676, so the chip type is added to distinguish the setting of the clock source in the VAD function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/rockchip', 'asoc/topic/rt5645' ↵Mark Brown2015-02-041-0/+3
|\ \ | | | | | | | | | and 'asoc/topic/rt5677' into asoc-next
| | * ASoC: rt5677: fix SPI dependencyArnd Bergmann2015-01-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rt5677 codec has gained code that requires SPI to work correctly, but there is no provision in Kconfig to prevent the driver from being used when SPI is disabled or a loadable module, resulting in this build error: sound/built-in.o: In function `rt5677_spi_write': :(.text+0xa7ba0): undefined reference to `spi_sync' sound/built-in.o: In function `rt5677_spi_driver_init': :(.init.text+0x253c): undefined reference to `spi_register_driver' ERROR: "spi_sync" [sound/soc/codecs/snd-soc-rt5677-spi.ko] undefined! ERROR: "spi_register_driver" [sound/soc/codecs/snd-soc-rt5677-spi.ko] undefined! This makes the SPI portion of the driver depend on the SPI subsystem, and disables the function that uses SPI for firmware download if SPI is disabled. The latter may not be the correct solution, but I could not come up with a better one. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: af48f1d08a54741 ("ASoC: rt5677: Support DSP function for VAD application") Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-nextMark Brown2015-02-041-30/+210
|\ \ \
| * \ \ Merge branch 'fix/rt5677' of ↵Mark Brown2015-01-271-4/+14
| |\ \ \ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec
| * | | | ASoC: rt5677: Replace w->codec snd_soc_dapm_to_codec(w->dapm)Lars-Peter Clausen2015-01-151-11/+12
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | The codec field of the snd_soc_widget struct is eventually going to be removed, use snd_soc_dapm_to_codec(w->dapm) instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5677: Add the slot_width "25" support in the TDM modeOder Chiou2015-01-141-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the slot_width "25" support in the TDM mode for the Intel platform. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5677: Use the regmap functions instead of the snd_soc functionsOder Chiou2015-01-141-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch uses the regmap functions instead of the snd_soc functions in some cases. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5677: Add the MICBIAS VDD setting in the platform dataOder Chiou2015-01-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds the MICBIAS VDD setting in the platform data. It can be set to 1V8 or 3V3 in the MICBIAS VDD. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5677: Adjust the routing of "PLL1"Oder Chiou2014-12-241-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the duplicated PLL1 connections of the adc stereo filters, and remove the PLL1 connections of the DACs because the PLL1 should be connected to dac filters. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5677: Add the ASRC supportOder Chiou2014-12-241-0/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ASRC support Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5677: Revise the filter powersOder Chiou2014-12-241-6/+16
| | |/ | |/| | | | | | | | | | | | | | | | | | | Add the filter powers of the dac mono3 and mono4, and remove the connection of dac stereo1 filter that connect to DAC1 MIX. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/fix/rt5677', 'asoc/fix/simple', ↵Mark Brown2015-01-261-4/+14
|\ \ \ \ | | |/ / | | | / | | |/ | |/| 'asoc/fix/ts3a227e', 'asoc/fix/wm8904' and 'asoc/fix/wm8960' into asoc-linus
| * | ASoC: rt5677: Modify the behavior that updates the PLL parameter.Oder Chiou2015-01-091-4/+14
| |/ | | | | | | | | | | | | | | The patch modified the behavior that updates the PLL parameter. It set the update bit before the PLL power up. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt5677: fixed rt5677_dsp_vad_put rt5677_dsp_vad_get panicFang, Yang A2014-12-241-4/+5
|/ | | | | | | | snd_kcontrol_chip should return snd_soc_component instead of snd_soc_codec Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5677: make volume TLV closer to realityDylan Reid2014-12-051-11/+11
| | | | | | | | | | | The volume blocks have an step of 0.375dB, but TLV uses 0.01dB for units. Only use the resolution supported, ignoring the LSB of the volume register. This results in half the steps and 0.75dB per step, but reports accurate levels through TLV. Update the masks to reflect that these are registers have the LSB ignored. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5677: Fix the issue that the regmap_range "rt5677_ranges" cannot be ↵Oder Chiou2014-11-251-7/+30
| | | | | | | | | | | | accessed After the patch "ASoC: rt5677: Use specific r/w function for DSP mode", the regmap_range "rt5677_ranges" was not registered in rt5677_regmap_physical, and it caused that the regmap_range "rt5677_ranges" cannot be accessed by the specific r/w function. The patch fixes this issue. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5677: Set the slow charge of the vref in the end of the power sequencesOder Chiou2014-11-191-10/+46
| | | | | | | Set the slow charge of the vref in the end of the power sequences Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5677: Follow the gpio naming rule to rename the irq functionOder Chiou2014-11-191-5/+4
| | | | | | | Follow the gpio naming rule to rename the irq function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud