From 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:44:59 +0000
Subject: [PATCH] gmac get mac form eeprom
---
kernel/sound/soc/codecs/rk1000_codec.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/kernel/sound/soc/codecs/rk1000_codec.c b/kernel/sound/soc/codecs/rk1000_codec.c
index c708f01..9cabd09 100644
--- a/kernel/sound/soc/codecs/rk1000_codec.c
+++ b/kernel/sound/soc/codecs/rk1000_codec.c
@@ -200,7 +200,7 @@
unsigned int dai_fmt;
dai_fmt = rtd->card->dai_link[0].dai_fmt;
- iface = snd_soc_component_read32(component, ACCELCODEC_R09) & 0x1f3;
+ iface = snd_soc_component_read(component, ACCELCODEC_R09) & 0x1f3;
snd_soc_component_write(component, ACCELCODEC_R0C, 0x17);
snd_soc_component_write(component, ACCELCODEC_R04,
ASC_INT_MUTE_L | ASC_INT_MUTE_R |
@@ -217,7 +217,7 @@
return 0;
}
-static int rk1000_codec_mute(struct snd_soc_dai *dai, int mute)
+static int rk1000_codec_mute(struct snd_soc_dai *dai, int mute, int stream)
{
struct snd_soc_component *component = dai->component;
struct rk1000_codec_priv *rk1000_codec;
@@ -276,7 +276,8 @@
static struct snd_soc_dai_ops rk1000_codec_ops = {
.hw_params = rk1000_codec_pcm_hw_params,
.set_fmt = rk1000_codec_set_dai_fmt,
- .digital_mute = rk1000_codec_mute,
+ .mute_stream = rk1000_codec_mute,
+ .no_capture_mute = 1,
};
#define RK1000_CODEC_RATES SNDRV_PCM_RATE_8000_192000
@@ -355,13 +356,13 @@
ASC_DITHER_ENABLE | ASC_BCLKDIV_4);
/*2volume,input,output*/
digital_gain = VOLUME_OUTPUT;
- if (snd_soc_component_read32(component, ACCELCODEC_R05) != 0x0f) {
+ if (snd_soc_component_read(component, ACCELCODEC_R05) != 0x0f) {
snd_soc_component_write(component, ACCELCODEC_R05,
(digital_gain >> 8) & 0xFF);
snd_soc_component_write(component, ACCELCODEC_R06, digital_gain & 0xFF);
}
- if (snd_soc_component_read32(component, ACCELCODEC_R07) != 0x0f) {
+ if (snd_soc_component_read(component, ACCELCODEC_R07) != 0x0f) {
snd_soc_component_write(component, ACCELCODEC_R07,
(digital_gain >> 8) & 0xFF);
snd_soc_component_write(component, ACCELCODEC_R08, digital_gain & 0xFF);
--
Gitblit v1.6.2