summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5677.h
AgeCommit message (Collapse)AuthorFilesLines
2018-02-12ASoC: rt5645/rt5677: replace codec to componentKuninori Morimoto1-2/+2
Now we can replace Codec to Component. Let's do it. Because Intel/Mediatek platforms are using rt5645/rt5677, we need to update these all related drivers in same time. Otherwise compile error/warning happen rt5645: 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 rt5677: 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>
2017-07-19ASoC: rt5677: Hide platform data in the module sourcesAndy Shevchenko1-1/+29
There is no user of legacy platform data. Remove separate header and hide its content inside module sources. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07ASoC: rt5677: Switch to use descriptor-based gpiod APIBen Zhang1-2/+3
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>
2015-05-16ASoC: rt5677: Add reset-gpio dts optionAnatol Pomozov1-0/+1
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-04-29ASoC: rt5677: add i2s asrc clk src selectionBard Liao1-0/+14
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-03-16ASoC: rt5677: add API to select ASRC clock sourceOder Chiou1-0/+79
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-02ASoC: rt5677: Add the chip type to distinguish the setting of the clock sourceOder Chiou1-0/+6
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>
2014-12-05ASoC: rt5677: make volume TLV closer to realityDylan Reid1-12/+12
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-1/+1
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-0/+1
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-12ASoC: rt5677: Add TDM channel mux in DAC side of IF1 and IF2Oder Chiou1-4/+44
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-1/+2
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-10-29ASoC: rt5677: Add TDM channel mapping functionOder Chiou1-3/+35
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: add GPIO IRQ supportOder Chiou1-0/+49
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: Support DSP function for VAD applicationOder Chiou1-0/+6
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: Include gpio driver headerBen Zhang1-0/+1
The header file is needed because struct gpio_chip is placed in struct rt5677_priv. Signed-off-by: Ben Zhang <benzh@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24ASoC: rt5677: Add a configuration option for LDO2_POW pinAnatol Pomozov1-0/+1
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>
2014-09-23ASoC: rt5677: Add sidetone functionOder Chiou1-0/+4
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>
2014-09-16ASoC: rt5677: Add the GPIO functionOder Chiou1-0/+112
The patch adds the GPIO function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16ASoC: rt5677: Revise the wrong name in the header fileOder Chiou1-22/+22
The patch revises the wrong name in the header file. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-27ASoC: rt5677: Add DMIC2 clock selectionBard Liao1-0/+10
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>
2014-07-07ASoC: rt5677: Remove the redundant definition in head fileOder Chiou1-7/+0
The patch removes the redundant definition in head file Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-30ASoC: rt5677: Convert to use rl6231_pll_calcAxel Lin1-8/+0
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>
2014-06-01ASoC: add RT5677 CODEC driverOder Chiou1-0/+1451
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>