mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
ASoC: codecs: add support for rk817 codec
Replace digital_mute with mute_stream Replace xxx_dai with asoc_rtd_to_xxx(rtd, i) Change-Id: If8c5ce04703b94f7eb91e61efeab6bf7dcfca7ff Signed-off-by: Shunhua Lan <lsh@rock-chips.com> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -151,6 +151,7 @@ config SND_SOC_ALL_CODECS
|
||||
imply SND_SOC_PCM512x_I2C
|
||||
imply SND_SOC_PCM512x_SPI
|
||||
imply SND_SOC_RK3328
|
||||
imply SND_SOC_RK817
|
||||
imply SND_SOC_RT274
|
||||
imply SND_SOC_RT286
|
||||
imply SND_SOC_RT298
|
||||
@@ -1024,6 +1025,11 @@ config SND_SOC_RK3328
|
||||
tristate "Rockchip RK3328 audio CODEC"
|
||||
select REGMAP_MMIO
|
||||
|
||||
config SND_SOC_RK817
|
||||
tristate "Rockchip RK817 CODEC"
|
||||
depends on MFD_RK808
|
||||
select REGMAP_I2C
|
||||
|
||||
config SND_SOC_RL6231
|
||||
tristate
|
||||
default y if SND_SOC_RT5514=y
|
||||
|
||||
@@ -156,6 +156,7 @@ snd-soc-pcm512x-objs := pcm512x.o
|
||||
snd-soc-pcm512x-i2c-objs := pcm512x-i2c.o
|
||||
snd-soc-pcm512x-spi-objs := pcm512x-spi.o
|
||||
snd-soc-rk3328-objs := rk3328_codec.o
|
||||
snd-soc-rk817-objs := rk817_codec.o
|
||||
snd-soc-rl6231-objs := rl6231.o
|
||||
snd-soc-rl6347a-objs := rl6347a.o
|
||||
snd-soc-rt1011-objs := rt1011.o
|
||||
@@ -465,6 +466,7 @@ obj-$(CONFIG_SND_SOC_PCM512x) += snd-soc-pcm512x.o
|
||||
obj-$(CONFIG_SND_SOC_PCM512x_I2C) += snd-soc-pcm512x-i2c.o
|
||||
obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o
|
||||
obj-$(CONFIG_SND_SOC_RK3328) += snd-soc-rk3328.o
|
||||
obj-$(CONFIG_SND_SOC_RK817) += snd-soc-rk817.o
|
||||
obj-$(CONFIG_SND_SOC_RL6231) += snd-soc-rl6231.o
|
||||
obj-$(CONFIG_SND_SOC_RL6347A) += snd-soc-rl6347a.o
|
||||
obj-$(CONFIG_SND_SOC_RT1011) += snd-soc-rt1011.o
|
||||
|
||||
@@ -829,7 +829,7 @@ static int rk817_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_component *component = rtd->codec_dai->component;
|
||||
struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
|
||||
struct rk817_codec_priv *rk817 = snd_soc_component_get_drvdata(component);
|
||||
unsigned int rate = params_rate(params);
|
||||
unsigned char apll_cfg3_val;
|
||||
@@ -903,7 +903,7 @@ static int rk817_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rk817_digital_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int rk817_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
|
||||
{
|
||||
struct snd_soc_component *component = dai->component;
|
||||
struct rk817_codec_priv *rk817 = snd_soc_component_get_drvdata(component);
|
||||
@@ -978,7 +978,8 @@ static struct snd_soc_dai_ops rk817_dai_ops = {
|
||||
.hw_params = rk817_hw_params,
|
||||
.set_fmt = rk817_set_dai_fmt,
|
||||
.set_sysclk = rk817_set_dai_sysclk,
|
||||
.digital_mute = rk817_digital_mute,
|
||||
.mute_stream = rk817_digital_mute,
|
||||
.no_capture_mute = 1,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver rk817_dai[] = {
|
||||
|
||||
Reference in New Issue
Block a user