kernel/0175-fix-HDMI-audio-only-supports-playback.patch

70 lines
1.8 KiB
Diff

From eca012a3c6899d1d4359b25e2ebca7f350c582a0 Mon Sep 17 00:00:00 2001
From: denglei <denglei@eswincomputing.com>
Date: Tue, 24 Sep 2024 14:29:26 +0800
Subject: [PATCH 175/219] fix:HDMI audio only supports playback.
Changelogs:
HDMI audio only supports playback.
remove the hdmi codec error print on debian system.
Signed-off-by: denglei <denglei@eswincomputing.com>
---
sound/soc/eswin/esw-i2s.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/sound/soc/eswin/esw-i2s.c b/sound/soc/eswin/esw-i2s.c
index fb032ebd085e..4c5d33faade4 100755
--- a/sound/soc/eswin/esw-i2s.c
+++ b/sound/soc/eswin/esw-i2s.c
@@ -75,6 +75,8 @@
#define I2S0_IO_ADDR 0x51600124
+#define HDMI_DAI_NAME "i2s0-hdmi"
+
static struct clk *g_mclk;
static u32 dmaen_txch[] = {
@@ -375,10 +377,14 @@ static int i2s_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai_link *dai_link = rtd->dai_link;
dai_link->trigger_stop = SND_SOC_TRIGGER_ORDER_LDC;
+
+ if (!strcmp(cpu_dai->name, HDMI_DAI_NAME)) {
+ dai_link->playback_only = 1;
+ }
+
return 0;
}
-
static int i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{
@@ -660,7 +666,7 @@ static const struct snd_soc_component_driver i2s_component = {
static struct snd_soc_dai_driver i2s_dai[4] = {
{
- .name = "i2s0-hdmi",
+ .name = HDMI_DAI_NAME,
.id = 0,
.ops = &i2s_dai_ops,
.playback = {
@@ -670,13 +676,6 @@ static struct snd_soc_dai_driver i2s_dai[4] = {
.rates = ESW_I2S_RATES,
.formats = ESW_I2S_FORMATS,
},
- .capture = {
- .stream_name = "Capture",
- .channels_min = MIN_CHANNEL_NUM,
- .channels_max = MAX_CHANNEL_NUM,
- .rates = ESW_I2S_RATES,
- .formats = ESW_I2S_FORMATS,
- },
},
{
.name = "i2s0",
--
2.47.0