On Wed, 17 Jul 2019 15:32:55 +0200, Takashi Iwai wrote: > > On Wed, 10 Jul 2019 16:36:19 +0200, > Takashi Iwai wrote: > > > > 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@xxxxxxx> > > > >> Cc: Leo Li <sunpeng.li@xxxxxxx> > > > >> Cc: Harry Wentland <harry.wentland@xxxxxxx> > > > >> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx> > > > > > > > > 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. > > FWIW, my latest patches are found in topic/hda-acomp branch on sound > git tree: > git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/hda-acomp > > There have been a slight refactoring in HD-audio side, and now it > supports both AMD and Nvidia audio component support. The branch > contains the patches for radeon and nouveau support. > > Note that the branch isn't permanent one, it'll be rebased later. > Once after I submit and get the review for the HD-audio patches, I'll > create an immutable branch based on 5.3-rc1 containing those HD-audio > patches (but not DRM ones), so that you can pull into your drm tree > for the completeness. BTW, one thing I forgot to add: i915 audio component recently added the device-link for assuring the PM call order. More specifically, in the component bind and unbind callbacks, device_link_add() and device_link_del() get called respectively. I guess the similar calls are needed for AMDGPU driver as well. thanks, Takashi _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx