summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5677.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* ASoC: rt5677: Align the reg_default table with tab characterOder Chiou2014-11-191-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>
* ASoC: rt5677: Modify the default value of the MX-8E[4] for ASRC functionOder Chiou2014-11-171-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>
* ASoC: rt5677: Add TDM channel mux in DAC side of IF1 and IF2Oder Chiou2014-11-121-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>
* ASoC: rt5677: Use specific r/w function for DSP modeOder Chiou2014-11-071-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>
* ASoC: rt5677: Minor coding style and typo fixOder Chiou2014-11-051-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>
* ASoC: rt5677: Add TDM channel mapping functionOder Chiou2014-10-281-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>
* ASoC: rt5677: rt5677_irq_init() can be statickbuild test robot2014-10-221-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>
* ASoC: rt5677: add GPIO IRQ supportOder Chiou2014-10-221-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>
* ASoC: rt5677: fix build when kernel compiled without GPIOLIB supportAnatol Pomozov2014-10-201-0/+5
| | | | | Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5677: Print more information if setting DAI clock failedAnatol Pomozov2014-10-201-1/+2
| | | | | Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5677: Support DSP function for VAD applicationOder Chiou2014-10-201-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>
* ASoC: rt5677: Add option to configure gpio as floating/pullup/pulldownAnatol Pomozov2014-10-201-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>
*-. Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5677', ↵Mark Brown2014-10-061-0/+140
|\ \ | | | | | | | | | 'asoc/topic/samsung', 'asoc/topic/sgtl5000' and 'asoc/topic/sh' into asoc-next
| | * ASoC: rt5677: Add dts properties for input/output differential configurationAnatol Pomozov2014-09-291-0/+23
| | | | | | | | | | | | | | | Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rt5677: Add a configuration option for LDO2_POW pinAnatol Pomozov2014-09-241-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some boards have this pin statically tied and do not require any configuration, some other boards allow to enable chip using GPIO. Add an option that tells which GPIO is used to power the audio codec. Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rt5677: Add sidetone functionOder Chiou2014-09-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Add sidetone function Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rt5677: Add the TDM functionOder Chiou2014-09-171-0/+54
| | | | | | | | | | | | | | | | | | | | | The patch adds the TDM function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/dmic', ↵Mark Brown2014-10-061-8/+179
|\ \ \ \ | | |/ / | |/| | | | | | 'asoc/topic/drivers', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next
| | * | ASoC: Remove return value checking for gpiochip_remove()Axel Lin2014-09-171-4/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | gpiochip_remove() will return void eventually. Thus this patch removes return value checking for gpiochip_remove(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rt5677: Add the GPIO functionOder Chiou2014-09-161-0/+133
| | | | | | | | | | | | | | | | | | | | | The patch adds the GPIO function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rt5677: Add DMIC2 clock selectionBard Liao2014-08-271-8/+49
| |/ | | | | | | | | | | | | | | There are two pins can be used for rt5677's DMIC2 clock. This patch add the select options for it. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* / ASoC: rt5677: correct mismatch widget nameBard Liao2014-08-271-4/+4
|/ | | | | | | We name MICBIAS1 in dapm widget, but micbias1 in route table. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Modify the voltage level in the BIAS OFF stageOder Chiou2014-07-071-1/+1
| | | | | | | The patch modifies the voltage level in the BIAS OFF stage Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Convert to use rl6231_pll_calcAxel Lin2014-06-301-61/+8
| | | | | | | | | | | | | The implementation of rt5677_pll_calc() has the same logic of rl6231_pll_calc(). The only difference is the lower boundary checking for freq_in. This patch calls rl6231_pll_calc() instead of open-coded. The k_bp of struct rt5677_pll_code is always false, thus also remove the code to check pll_code.k_bp. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Add a PMD case to MICBIAS1 eventOder Chiou2014-06-211-1/+9
| | | | | | | The patch adds a PMD case to MICBIAS1 event. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Replace the string "Gain" to "Volume"Oder Chiou2014-06-211-5/+5
| | | | | | | The patch replaces the string "Gain" to "Volume". Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Replace the string "source" to "Source"Oder Chiou2014-06-211-61/+61
| | | | | | | The patch replaces the string "source" to "Source". Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Replace the string "micbias1" to "MICBIAS1"Oder Chiou2014-06-211-1/+1
| | | | | | | The patch replaces the string "micbias1" to "MICBIAS1". Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Remove unneeded goto in rt5677_i2c_probeAxel Lin2014-06-211-8/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Convert to use rl6231_calc_dmic_clkAxel Lin2014-06-161-15/+1
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Convert to use rl6231_get_clk_infoAxel Lin2014-06-161-16/+2
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5677: Convert to use module_i2c_driverAxel Lin2014-06-161-12/+1
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: add RT5677 CODEC driverOder Chiou2014-06-011-0/+3498
This patch adds the Realtek ALC5677 codec driver. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>