linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: Unify PCM card's driver_name
@ 2021-01-15 19:12 Nicolas Saenz Julienne
  2021-01-17  7:57 ` Takashi Iwai
  2021-01-18 10:04 ` Maxime Ripard
  0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Saenz Julienne @ 2021-01-15 19:12 UTC (permalink / raw)
  To: mripard, dri-devel
  Cc: linux-kernel, eric, daniel, airlied, stefan.wahren, broonie,
	tiwai, Nicolas Saenz Julienne

User-space ALSA matches a card's driver name against an internal list of
aliases in order to select the correct configuration for the system.
When the driver name isn't defined, the match is performed against the
card's name.

With the introduction of RPi4 we now have two HDMI ports with two
distinct audio cards. This is reflected in their names, making them
different from previous RPi versions. With this, ALSA ultimately misses
the board's configuration on RPi4.

In order to avoid this, set "card->driver_name" to "vc4-hdmi"
unanimously.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Fixes: f437bc1ec731 ("drm/vc4: drv: Support BCM2711")
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 97f368bc1c67..4bdc8e71b5e5 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -1404,6 +1404,7 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
 	card->dai_link = dai_link;
 	card->num_links = 1;
 	card->name = vc4_hdmi->variant->card_name;
+	card->driver_name = "vc4-hdmi";
 	card->dev = dev;
 	card->owner = THIS_MODULE;
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/vc4: Unify PCM card's driver_name
  2021-01-15 19:12 [PATCH] drm/vc4: Unify PCM card's driver_name Nicolas Saenz Julienne
@ 2021-01-17  7:57 ` Takashi Iwai
  2021-01-18 10:04 ` Maxime Ripard
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2021-01-17  7:57 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: mripard, dri-devel, linux-kernel, eric, daniel, airlied,
	stefan.wahren, broonie, tiwai

On Fri, 15 Jan 2021 20:12:09 +0100,
Nicolas Saenz Julienne wrote:
> 
> User-space ALSA matches a card's driver name against an internal list of
> aliases in order to select the correct configuration for the system.
> When the driver name isn't defined, the match is performed against the
> card's name.
> 
> With the introduction of RPi4 we now have two HDMI ports with two
> distinct audio cards. This is reflected in their names, making them
> different from previous RPi versions. With this, ALSA ultimately misses
> the board's configuration on RPi4.
> 
> In order to avoid this, set "card->driver_name" to "vc4-hdmi"
> unanimously.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Fixes: f437bc1ec731 ("drm/vc4: drv: Support BCM2711")

Looks good to me.
Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

> ---
>  drivers/gpu/drm/vc4/vc4_hdmi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index 97f368bc1c67..4bdc8e71b5e5 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -1404,6 +1404,7 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
>  	card->dai_link = dai_link;
>  	card->num_links = 1;
>  	card->name = vc4_hdmi->variant->card_name;
> +	card->driver_name = "vc4-hdmi";
>  	card->dev = dev;
>  	card->owner = THIS_MODULE;
>  
> -- 
> 2.29.2
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/vc4: Unify PCM card's driver_name
  2021-01-15 19:12 [PATCH] drm/vc4: Unify PCM card's driver_name Nicolas Saenz Julienne
  2021-01-17  7:57 ` Takashi Iwai
@ 2021-01-18 10:04 ` Maxime Ripard
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2021-01-18 10:04 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: dri-devel, linux-kernel, eric, daniel, airlied, stefan.wahren,
	broonie, tiwai

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

On Fri, Jan 15, 2021 at 08:12:09PM +0100, Nicolas Saenz Julienne wrote:
> User-space ALSA matches a card's driver name against an internal list of
> aliases in order to select the correct configuration for the system.
> When the driver name isn't defined, the match is performed against the
> card's name.
> 
> With the introduction of RPi4 we now have two HDMI ports with two
> distinct audio cards. This is reflected in their names, making them
> different from previous RPi versions. With this, ALSA ultimately misses
> the board's configuration on RPi4.
> 
> In order to avoid this, set "card->driver_name" to "vc4-hdmi"
> unanimously.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Fixes: f437bc1ec731 ("drm/vc4: drv: Support BCM2711")

Applied, thanks
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-18 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 19:12 [PATCH] drm/vc4: Unify PCM card's driver_name Nicolas Saenz Julienne
2021-01-17  7:57 ` Takashi Iwai
2021-01-18 10:04 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).