[PATCH 2/2] drm/amd/display: Add drm_audio_component support to amdgpu_dm

Takashi Iwai tiwai at suse.de
Wed Jul 10 14:36:19 UTC 2019


On Wed, 10 Jul 2019 16:31:40 +0200,
Kazlauskas, Nicholas wrote:
> 
> On 7/10/19 9:48 AM, Takashi Iwai wrote:
> > On Tue, 09 Jul 2019 18:30:19 +0200,
> > Nicholas Kazlauskas wrote:
> >>
> >> [Why]
> >> The drm_audio_component can be used to give pin ELD notifications
> >> directly to the sound driver. This fixes audio endpoints disappearing
> >> due to missing unsolicited notifications.
> >>
> >> [How]
> >> Send the notification via the audio component whenever we enable or
> >> disable audio state on a stream. This matches what i915 does with
> >> their drm_audio_component and what Takashi Iwai's proposed hack for
> >> radeon/amdpgu did.
> >>
> >> This is a bit delayed in when the notification actually occurs, however.
> >> We wait until after all the programming is complete rather than sending
> >> the notification mid sequence.
> >>
> >> Particular care is needed for the get ELD callback since it can happen
> >> outside the locking and fencing DRM does for atomic commits.
> >>
> >> Cc: Takashi Iwai <tiwai at suse.de>
> >> Cc: Leo Li <sunpeng.li at amd.com>
> >> Cc: Harry Wentland <harry.wentland at amd.com>
> >> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
> > 
> > Thanks for the patch, this has been a long-standing TODO for me, too!
> > 
> > Do you have the patch for HD-audio part as well?  Or you tested with
> > my old patch?  Then I'll resurrect my patch set as well.
> 
> I've tested this series with and without that patch. The notifications 
> work and the driver will query back with get_eld as expected.

OK, then I'm going to prepare a branch including that patch.

> Without the patch it should just retain the existing behavior.
> 
> > This patch itself looks almost good.  One caveat is that you might
> > want the reverse select of CONFIG_SND_HDA_COMPONENT, something like:
> 
> I can try adding this select based on DC for now (since it's the only 
> part that actually uses it at the moment).

Right, that's better.

> Just to note, audio is currently broken after hotplug at the moment for 
> AMDGPU with DC enabled, but this is unrelated to this particular series. 
> I have a patch that resolves that issue that should show up sometime 
> soon on amdgfx.

Thanks for the information!


Takashi


More information about the amd-gfx mailing list