Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH 5.4.y] ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs
@ 2019-11-27 14:47 Takashi Iwai
  2019-11-27 15:11 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2019-11-27 14:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: stable

commit 5a858e79c911330678b5a9be91a24830e94a0dc9 upstream.

The old Nvidia chips have multiple HD-audio codecs on the same
HD-audio controller, and this doesn't work as expected with the current
audio component binding that is implemented under the one-codec-per-
controller assumption; at the probe time, the driver leads to several
kernel WARNING messages.

For the proper support, we may change the pin2port and port2pin to
traverse the codec list per the given pin number, but this needs more
development and testing.

As a quick workaround, instead, this patch drops the binding in the
audio side for these legacy chips since the audio component support in
nouveau graphics driver is still not merged (hence it's basically
unused).

[ Unlike the original subject line, this patch actually disables the
  audio component binding for all Nvidia chips on 5.4.y, not only for
  legacy chips, but it doesn't matter much; nouveau gfx driver still
  doesn't provide the audio component binding, so it's only a
  placeholder on 5.4.y -- tiwai ]

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205625
Fixes: ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI")
Link: https://lore.kernel.org/r/20191122132000.4460-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/patch_hdmi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 78bd2e3722c7..cdacc52a5147 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -3492,8 +3492,6 @@ static int patch_nvhdmi(struct hda_codec *codec)
 
 	codec->link_down_at_suspend = 1;
 
-	generic_acomp_init(codec, &nvhdmi_audio_ops, nvhdmi_port2pin);
-
 	return 0;
 }
 
-- 
2.16.4


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

* Re: [PATCH 5.4.y] ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs
  2019-11-27 14:47 [PATCH 5.4.y] ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs Takashi Iwai
@ 2019-11-27 15:11 ` Greg Kroah-Hartman
  2019-11-27 15:25   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-27 15:11 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: stable

On Wed, Nov 27, 2019 at 03:47:06PM +0100, Takashi Iwai wrote:
> commit 5a858e79c911330678b5a9be91a24830e94a0dc9 upstream.
> 
> The old Nvidia chips have multiple HD-audio codecs on the same
> HD-audio controller, and this doesn't work as expected with the current
> audio component binding that is implemented under the one-codec-per-
> controller assumption; at the probe time, the driver leads to several
> kernel WARNING messages.
> 
> For the proper support, we may change the pin2port and port2pin to
> traverse the codec list per the given pin number, but this needs more
> development and testing.
> 
> As a quick workaround, instead, this patch drops the binding in the
> audio side for these legacy chips since the audio component support in
> nouveau graphics driver is still not merged (hence it's basically
> unused).
> 
> [ Unlike the original subject line, this patch actually disables the
>   audio component binding for all Nvidia chips on 5.4.y, not only for
>   legacy chips, but it doesn't matter much; nouveau gfx driver still
>   doesn't provide the audio component binding, so it's only a
>   placeholder on 5.4.y -- tiwai ]
> 
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205625
> Fixes: ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI")
> Link: https://lore.kernel.org/r/20191122132000.4460-1-tiwai@suse.de
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  sound/pci/hda/patch_hdmi.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> index 78bd2e3722c7..cdacc52a5147 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -3492,8 +3492,6 @@ static int patch_nvhdmi(struct hda_codec *codec)
>  
>  	codec->link_down_at_suspend = 1;
>  
> -	generic_acomp_init(codec, &nvhdmi_audio_ops, nvhdmi_port2pin);
> -
>  	return 0;
>  }
>  
> -- 
> 2.16.4
> 

This patch adds the build warning:
  CC [M]  sound/pci/hda/patch_hdmi.o
sound/pci/hda/patch_hdmi.c:3465:12: warning: ‘nvhdmi_port2pin’ defined but not used [-Wunused-function]
 3465 | static int nvhdmi_port2pin(struct hda_codec *codec, int port)
      |            ^~~~~~~~~~~~~~~
  LD [M]  sound/pci/hda/snd-hda-codec-hdmi.o

Is that intentional?

Did a different patch fix that issue up?

thanks,

greg k-h

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

* Re: [PATCH 5.4.y] ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs
  2019-11-27 15:11 ` Greg Kroah-Hartman
@ 2019-11-27 15:25   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2019-11-27 15:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: stable

On Wed, 27 Nov 2019 16:11:01 +0100,
Greg Kroah-Hartman wrote:
> 
> On Wed, Nov 27, 2019 at 03:47:06PM +0100, Takashi Iwai wrote:
> > commit 5a858e79c911330678b5a9be91a24830e94a0dc9 upstream.
> > 
> > The old Nvidia chips have multiple HD-audio codecs on the same
> > HD-audio controller, and this doesn't work as expected with the current
> > audio component binding that is implemented under the one-codec-per-
> > controller assumption; at the probe time, the driver leads to several
> > kernel WARNING messages.
> > 
> > For the proper support, we may change the pin2port and port2pin to
> > traverse the codec list per the given pin number, but this needs more
> > development and testing.
> > 
> > As a quick workaround, instead, this patch drops the binding in the
> > audio side for these legacy chips since the audio component support in
> > nouveau graphics driver is still not merged (hence it's basically
> > unused).
> > 
> > [ Unlike the original subject line, this patch actually disables the
> >   audio component binding for all Nvidia chips on 5.4.y, not only for
> >   legacy chips, but it doesn't matter much; nouveau gfx driver still
> >   doesn't provide the audio component binding, so it's only a
> >   placeholder on 5.4.y -- tiwai ]
> > 
> > BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205625
> > Fixes: ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI")
> > Link: https://lore.kernel.org/r/20191122132000.4460-1-tiwai@suse.de
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  sound/pci/hda/patch_hdmi.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> > index 78bd2e3722c7..cdacc52a5147 100644
> > --- a/sound/pci/hda/patch_hdmi.c
> > +++ b/sound/pci/hda/patch_hdmi.c
> > @@ -3492,8 +3492,6 @@ static int patch_nvhdmi(struct hda_codec *codec)
> >  
> >  	codec->link_down_at_suspend = 1;
> >  
> > -	generic_acomp_init(codec, &nvhdmi_audio_ops, nvhdmi_port2pin);
> > -
> >  	return 0;
> >  }
> >  
> > -- 
> > 2.16.4
> > 
> 
> This patch adds the build warning:
>   CC [M]  sound/pci/hda/patch_hdmi.o
> sound/pci/hda/patch_hdmi.c:3465:12: warning: ‘nvhdmi_port2pin’ defined but not used [-Wunused-function]
>  3465 | static int nvhdmi_port2pin(struct hda_codec *codec, int port)
>       |            ^~~~~~~~~~~~~~~
>   LD [M]  sound/pci/hda/snd-hda-codec-hdmi.o
> 
> Is that intentional?

No, that's an overlook.

> Did a different patch fix that issue up?

The original commit removes only one of two calls, so these symbols
are still used.  On 5.4.y, there is only one call site and the patch
removes it, so we see now the warning.

OK, please scratch this one, and let me cook and check again for v2.


thanks,

Takashi

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

end of thread, other threads:[~2019-11-27 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-27 14:47 [PATCH 5.4.y] ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs Takashi Iwai
2019-11-27 15:11 ` Greg Kroah-Hartman
2019-11-27 15:25   ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox