summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5677.c
AgeCommit message (Collapse)AuthorFilesLines
2015-07-15ASoC: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski1-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>
2015-06-05Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/samsung' and ↵Mark Brown1-8/+135
'asoc/topic/sgtl5000' into asoc-next
2015-06-05Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown1-7/+7
2015-05-20ASoC: rt5677: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen1-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>
2015-05-16ASoC: rt5677: Add reset-gpio dts optionAnatol Pomozov1-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>
2015-05-08ASoC: rt5677: Add DMIC ASRC detect functionOder Chiou1-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>
2015-04-29Merge remote-tracking branches 'asoc/fix/rt5677', 'asoc/fix/samsung' and ↵Mark Brown1-1/+4
'asoc/fix/tfa9879' into asoc-linus
2015-04-29ASoC: rt5677: add i2s asrc clk src selectionBard Liao1-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>
2015-04-29ASoC: rt5677: fixed wrong DMIC ref clockBard Liao1-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
2015-04-27ASoC: Move bias level update to the coreLars-Peter Clausen1-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>
2015-04-27ASoC: Route all bias level updates through the coreLars-Peter Clausen1-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>
2015-04-24ASoC: rt5677: add register patch for PLLBard Liao1-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
2015-03-16ASoC: rt5677: add API to select ASRC clock sourceOder Chiou1-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>
2015-03-02Merge branch 'fix/rt5677' of ↵Mark Brown1-16/+16
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5677
2015-03-02ASoC: rt5677: Keep the LDO2 powered while used in the suspend modeOder Chiou1-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>
2015-03-02ASoC: rt5677: Add the chip type to distinguish the setting of the clock sourceOder Chiou1-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>
2015-02-26ASoC: rt5677: Correct the routing paths of that after IF1/2 DACx MuxOder Chiou1-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>
2015-02-04Merge remote-tracking branches 'asoc/topic/rockchip', 'asoc/topic/rt5645' ↵Mark Brown1-0/+3
and 'asoc/topic/rt5677' into asoc-next
2015-02-04Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-nextMark Brown1-30/+210
2015-01-29ASoC: rt5677: fix SPI dependencyArnd Bergmann1-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>
2015-01-27Merge branch 'fix/rt5677' of ↵Mark Brown1-4/+14
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec
2015-01-26Merge remote-tracking branches 'asoc/fix/rt5677', 'asoc/fix/simple', ↵Mark Brown1-4/+14
'asoc/fix/ts3a227e', 'asoc/fix/wm8904' and 'asoc/fix/wm8960' into asoc-linus
2015-01-15ASoC: rt5677: Replace w->codec snd_soc_dapm_to_codec(w->dapm)Lars-Peter Clausen1-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>
2015-01-14ASoC: rt5677: Add the slot_width "25" support in the TDM modeOder Chiou1-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>
2015-01-14ASoC: rt5677: Use the regmap functions instead of the snd_soc functionsOder Chiou1-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>
2015-01-09ASoC: rt5677: Modify the behavior that updates the PLL parameter.Oder Chiou1-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>
2015-01-08ASoC: rt5677: Add the MICBIAS VDD setting in the platform dataOder Chiou1-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>
2014-12-24ASoC: rt5677: Adjust the routing of "PLL1"Oder Chiou1-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>
2014-12-24ASoC: rt5677: Add the ASRC supportOder Chiou1-0/+155
Add the ASRC support Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: rt5677: Revise the filter powersOder Chiou1-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>
2014-12-24ASoC: rt5677: fixed rt5677_dsp_vad_put rt5677_dsp_vad_get panicFang, Yang A1-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>
2014-12-05ASoC: rt5677: make volume TLV closer to realityDylan Reid1-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>
2014-11-25ASoC: rt5677: Fix the issue that the regmap_range "rt5677_ranges" cannot be ↵Oder Chiou1-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>
2014-11-19ASoC: rt5677: Set the slow charge of the vref in the end of the power sequencesOder Chiou1-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>
2014-11-19ASoC: rt5677: Follow the gpio naming rule to rename the irq functionOder Chiou1-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>
2014-11-19ASoC: rt5677: Align the reg_default table with tab characterOder Chiou1-7/+7
Align the reg_default table with tab character Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17ASoC: rt5677: Modify the default value of the MX-8E[4] for ASRC functionOder Chiou1-2/+3
Modify the default value of the MX-8E[4] to 1 for ASRC function. It could prevent the pop noise with ASRC function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-12ASoC: rt5677: Add TDM channel mux in DAC side of IF1 and IF2Oder Chiou1-16/+314
It is the slot selection in DAC side of IF1 and IF2. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-07ASoC: rt5677: Use specific r/w function for DSP modeOder Chiou1-67/+100
In DSP mode, the register r/w should use the specific function to access that is invoked by address mapping of the DSP. The MX-65[1] is for switching DSP or codec mode. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05ASoC: rt5677: Minor coding style and typo fixOder Chiou1-7/+7
Minor coding style and typo fix Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28ASoC: rt5677: Add TDM channel mapping functionOder Chiou1-12/+227
It is for channel to slot mapping, and it is not only for 8 channels mapping, but also in 2, 4 and 6 channels mapping. If we want to use the 2 channels in the stereo2 adc path, we need to set the item "2/1/3/4" or "2/3/1/4". It also adds for stereo channel swap. It can map the sterero channels "L/R" to "R/L", "L/L" or R/R. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22ASoC: rt5677: rt5677_irq_init() can be statickbuild test robot1-2/+2
sound/soc/codecs/rt5677.c:4017:5: sparse: symbol 'rt5677_irq_init' was not declared. Should it be static? sound/soc/codecs/rt5677.c:4044:6: sparse: symbol 'rt5677_irq_exit' was not declared. Should it be static? Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22ASoC: rt5677: add GPIO IRQ supportOder Chiou1-0/+134
This allows to enable Mic Jack detection feature Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Modified-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: rt5677: fix build when kernel compiled without GPIOLIB supportAnatol Pomozov1-0/+5
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: rt5677: Print more information if setting DAI clock failedAnatol Pomozov1-1/+2
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: rt5677: Support DSP function for VAD applicationOder Chiou1-4/+284
The ALC5677 has a programmable DSP, and there is a SPI that is dadicated for DSP firmware loading. Therefore, the patch includes a SPI driver for writing the DSP firmware. The VAD(Voice Activaty Detection) has be implemented and use the DSP to recognize the key phase. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: rt5677: Add option to configure gpio as floating/pullup/pulldownAnatol Pomozov1-0/+39
gpio_config is array of 6 elements that allows to set GPIO as floating, pullup, pulldown. Sponsored: Google ChromeOS Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-06Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5677', ↵Mark Brown1-0/+140
'asoc/topic/samsung', 'asoc/topic/sgtl5000' and 'asoc/topic/sh' into asoc-next
2014-10-06Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/dmic', ↵Mark Brown1-8/+179
'asoc/topic/drivers', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next
2014-09-29ASoC: rt5677: Add dts properties for input/output differential configurationAnatol Pomozov1-0/+23
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>