diff mbox series

drm: xlnx: zynqmp_dpsub: use snd_soc_dummy_dlc

Message ID 87ecxvr25o.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New
Headers show
Series drm: xlnx: zynqmp_dpsub: use snd_soc_dummy_dlc | expand

Commit Message

Kuninori Morimoto April 14, 2025, 12:56 a.m. UTC
struct zynqmp_dp_audio :: components has codec component, but it is
used as dummy DAI. OTOH, We can use common snd_soc_dummy_dlc.
Let's use common dummy_dlc instead of own component.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
I have not tested, needs Tested-by from someone.

 drivers/gpu/drm/xlnx/zynqmp_dp_audio.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Tomi Valkeinen April 16, 2025, 11:39 a.m. UTC | #1
Hi,

On 14/04/2025 03:56, Kuninori Morimoto wrote:
> struct zynqmp_dp_audio :: components has codec component, but it is
> used as dummy DAI. OTOH, We can use common snd_soc_dummy_dlc.
> Let's use common dummy_dlc instead of own component.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> I have not tested, needs Tested-by from someone.
> 
>   drivers/gpu/drm/xlnx/zynqmp_dp_audio.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c b/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c
> index f07ff4eb3a6d..1a46a046103f 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c
> @@ -45,7 +45,6 @@ struct zynqmp_dpsub_audio {
>   
>   	struct {
>   		struct snd_soc_dai_link_component cpu;
> -		struct snd_soc_dai_link_component codec;
>   		struct snd_soc_dai_link_component platform;
>   	} components[ZYNQMP_NUM_PCMS];
>   
> @@ -403,10 +402,8 @@ int zynqmp_audio_init(struct zynqmp_dpsub *dpsub)
>   		link->num_cpus = 1;
>   		link->cpus[0].dai_name = audio->dai_name;
>   
> -		link->codecs = &audio->components[i].codec;
> +		link->codecs = &snd_soc_dummy_dlc;
>   		link->num_codecs = 1;
> -		link->codecs[0].name = "snd-soc-dummy";
> -		link->codecs[0].dai_name = "snd-soc-dummy-dai";
>   
>   		link->platforms = &audio->components[i].platform;
>   		link->num_platforms = 1;

Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

I can pick this up to drm-misc.

  Tomi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c b/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c
index f07ff4eb3a6d..1a46a046103f 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c
@@ -45,7 +45,6 @@  struct zynqmp_dpsub_audio {
 
 	struct {
 		struct snd_soc_dai_link_component cpu;
-		struct snd_soc_dai_link_component codec;
 		struct snd_soc_dai_link_component platform;
 	} components[ZYNQMP_NUM_PCMS];
 
@@ -403,10 +402,8 @@  int zynqmp_audio_init(struct zynqmp_dpsub *dpsub)
 		link->num_cpus = 1;
 		link->cpus[0].dai_name = audio->dai_name;
 
-		link->codecs = &audio->components[i].codec;
+		link->codecs = &snd_soc_dummy_dlc;
 		link->num_codecs = 1;
-		link->codecs[0].name = "snd-soc-dummy";
-		link->codecs[0].dai_name = "snd-soc-dummy-dai";
 
 		link->platforms = &audio->components[i].platform;
 		link->num_platforms = 1;