Skip to content

Commit dd88efb

Browse files
author
Robert Foss
committed
ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata
JIRA: https://issues.redhat.com/browse/RHEL-75950 Upstream Status: v6.14-rc1 Conflicts: .no_capture_mute did not apply gracefully, manually resolve conflict. drivers/gpu/drm/mediatek/mtk_dp.c drivers/gpu/drm/rockchip/cdn-dp-core.c commit bb1d67b Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> AuthorDate: Tue Dec 24 03:47:54 2024 +0200 Commit: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> CommitDate: Sat Jan 4 08:47:10 2025 +0200 The no_capture_mute flag might differ from platform to platform, especially in the case of the wrapping implementations, like the upcoming DRM HDMI Codec framework. Move the flag next to all other flags in struct hdmi_codec_pdata. Acked-by: Mark Brown <broonie@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-2-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Robert Foss <rfoss@redhat.com>
1 parent 10ac200 commit dd88efb

File tree

7 files changed

+7
-9
lines changed

7 files changed

+7
-9
lines changed

drivers/gpu/drm/exynos/exynos_hdmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,6 @@ static const struct hdmi_codec_ops audio_codec_ops = {
16531653
.audio_shutdown = hdmi_audio_shutdown,
16541654
.mute_stream = hdmi_audio_mute,
16551655
.get_eld = hdmi_audio_get_eld,
1656-
.no_capture_mute = 1,
16571656
};
16581657

16591658
static int hdmi_register_audio_device(struct hdmi_context *hdata)
@@ -1662,6 +1661,7 @@ static int hdmi_register_audio_device(struct hdmi_context *hdata)
16621661
.ops = &audio_codec_ops,
16631662
.max_i2s_channels = 6,
16641663
.i2s = 1,
1664+
.no_capture_mute = 1,
16651665
};
16661666

16671667
hdata->audio.pdev = platform_device_register_data(

drivers/gpu/drm/i2c/tda998x_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,6 @@ static const struct hdmi_codec_ops audio_codec_ops = {
11651165
.audio_shutdown = tda998x_audio_shutdown,
11661166
.mute_stream = tda998x_audio_mute_stream,
11671167
.get_eld = tda998x_audio_get_eld,
1168-
.no_capture_mute = 1,
11691168
};
11701169

11711170
static int tda998x_audio_codec_init(struct tda998x_priv *priv,
@@ -1176,6 +1175,7 @@ static int tda998x_audio_codec_init(struct tda998x_priv *priv,
11761175
.max_i2s_channels = 2,
11771176
.no_i2s_capture = 1,
11781177
.no_spdif_capture = 1,
1178+
.no_capture_mute = 1,
11791179
};
11801180

11811181
if (priv->audio_port_enable[AUDIO_ROUTE_I2S])

drivers/gpu/drm/mediatek/mtk_hdmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,6 @@ static const struct hdmi_codec_ops mtk_hdmi_audio_codec_ops = {
16651665
.mute_stream = mtk_hdmi_audio_mute,
16661666
.get_eld = mtk_hdmi_audio_get_eld,
16671667
.hook_plugged_cb = mtk_hdmi_audio_hook_plugged_cb,
1668-
.no_capture_mute = 1,
16691668
};
16701669

16711670
static int mtk_hdmi_register_audio_driver(struct device *dev)
@@ -1676,6 +1675,7 @@ static int mtk_hdmi_register_audio_driver(struct device *dev)
16761675
.max_i2s_channels = 2,
16771676
.i2s = 1,
16781677
.data = hdmi,
1678+
.no_capture_mute = 1,
16791679
};
16801680
struct platform_device *pdev;
16811681

drivers/gpu/drm/rockchip/cdn-dp-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,6 @@ static const struct hdmi_codec_ops audio_codec_ops = {
853853
.audio_shutdown = cdn_dp_audio_shutdown,
854854
.mute_stream = cdn_dp_audio_mute_stream,
855855
.get_eld = cdn_dp_audio_get_eld,
856-
.no_capture_mute = 1,
857856
};
858857

859858
static int cdn_dp_audio_codec_init(struct cdn_dp_device *dp,
@@ -864,6 +863,7 @@ static int cdn_dp_audio_codec_init(struct cdn_dp_device *dp,
864863
.spdif = 1,
865864
.ops = &audio_codec_ops,
866865
.max_i2s_channels = 8,
866+
.no_capture_mute = 1,
867867
};
868868

869869
dp->audio_pdev = platform_device_register_data(

drivers/gpu/drm/sti/sti_hdmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,6 @@ static const struct hdmi_codec_ops audio_codec_ops = {
12291229
.audio_shutdown = hdmi_audio_shutdown,
12301230
.mute_stream = hdmi_audio_mute,
12311231
.get_eld = hdmi_audio_get_eld,
1232-
.no_capture_mute = 1,
12331232
};
12341233

12351234
static int sti_hdmi_register_audio_driver(struct device *dev,
@@ -1239,6 +1238,7 @@ static int sti_hdmi_register_audio_driver(struct device *dev,
12391238
.ops = &audio_codec_ops,
12401239
.max_i2s_channels = 8,
12411240
.i2s = 1,
1241+
.no_capture_mute = 1,
12421242
};
12431243

12441244
DRM_DEBUG_DRIVER("\n");

include/sound/hdmi-codec.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ struct hdmi_codec_ops {
116116
int (*hook_plugged_cb)(struct device *dev, void *data,
117117
hdmi_codec_plugged_cb fn,
118118
struct device *codec_dev);
119-
120-
/* bit field */
121-
unsigned int no_capture_mute:1;
122119
};
123120

124121
/* HDMI codec initalization data */
@@ -130,6 +127,7 @@ struct hdmi_codec_pdata {
130127
uint spdif:1;
131128
uint no_spdif_playback:1;
132129
uint no_spdif_capture:1;
130+
uint no_capture_mute:1;
133131
int max_i2s_channels;
134132
void *data;
135133
};

sound/soc/codecs/hdmi-codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ static int hdmi_codec_mute(struct snd_soc_dai *dai, int mute, int direction)
713713
*/
714714
if (hcp->hcd.ops->mute_stream &&
715715
(direction == SNDRV_PCM_STREAM_PLAYBACK ||
716-
!hcp->hcd.ops->no_capture_mute))
716+
!hcp->hcd.no_capture_mute))
717717
return hcp->hcd.ops->mute_stream(dai->dev->parent,
718718
hcp->hcd.data,
719719
mute, direction);

0 commit comments

Comments
 (0)