linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ALSA: hda: Enable sync-write operation as default for all controllers
       [not found] ` <20200618144051.7415-1-tiwai-l3A5Bk7waGM@public.gmane.org>
@ 2020-07-14  8:08   ` Jon Hunter
       [not found]     ` <8fc9f086-9a34-4287-8f51-6e0ebc34928f-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Hunter @ 2020-07-14  8:08 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-tegra

Hi Takashi,

On 18/06/2020 15:40, Takashi Iwai wrote:
> In the end we already enabled the sync-write mode for most of HD-audio
> controllers including Intel, and it's no big merit to keep the async
> write mode for the rest.  Let's make it as default and drop the
> superfluous AZX_DCAPS_SYNC_WRITE bit flag.
> 
> Also, avoid to set the allow_bus_reset flag, which is a quite unstable
> and hackish behavior that was needed only for some early platforms
> (decades ago).  The straight fallback to the single cmd mode is more
> robust.
> 
> Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>


I have noticed a regression in HDA playback on our Tegra186 Jetson TX2
platform. Bisect is pointing to this patch and reverting this does
appear to fix it. Interestingly, I am not seeing any problems on other
Tegra platforms, however, Tegra186 does have the IOMMU enabled for HDA
which is one different between the other platforms.

We can take a closer look at this for Tegra, but I am wondering if we
revert this for Tegra for now.

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH] ALSA: hda: Enable sync-write operation as default for all controllers
       [not found]     ` <8fc9f086-9a34-4287-8f51-6e0ebc34928f-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2020-07-14  8:09       ` Jon Hunter
  2020-07-14  8:30       ` Takashi Iwai
  1 sibling, 0 replies; 6+ messages in thread
From: Jon Hunter @ 2020-07-14  8:09 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-tegra


On 14/07/2020 09:08, Jon Hunter wrote:
> Hi Takashi,
> 
> On 18/06/2020 15:40, Takashi Iwai wrote:
>> In the end we already enabled the sync-write mode for most of HD-audio
>> controllers including Intel, and it's no big merit to keep the async
>> write mode for the rest.  Let's make it as default and drop the
>> superfluous AZX_DCAPS_SYNC_WRITE bit flag.
>>
>> Also, avoid to set the allow_bus_reset flag, which is a quite unstable
>> and hackish behavior that was needed only for some early platforms
>> (decades ago).  The straight fallback to the single cmd mode is more
>> robust.
>>
>> Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
> 
> 
> I have noticed a regression in HDA playback on our Tegra186 Jetson TX2
> platform. Bisect is pointing to this patch and reverting this does
> appear to fix it. Interestingly, I am not seeing any problems on other
> Tegra platforms, however, Tegra186 does have the IOMMU enabled for HDA
> which is one different between the other platforms.
> 
> We can take a closer look at this for Tegra, but I am wondering if we
> revert this for Tegra for now.

By revert, I don't mean revert the entire change, but just disable the
sync-write for Tegra for now.

Jon

-- 
nvpublic

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

* Re: [PATCH] ALSA: hda: Enable sync-write operation as default for all controllers
       [not found]     ` <8fc9f086-9a34-4287-8f51-6e0ebc34928f-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2020-07-14  8:09       ` Jon Hunter
@ 2020-07-14  8:30       ` Takashi Iwai
       [not found]         ` <s5hy2nmv6qv.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2020-07-14  8:30 UTC (permalink / raw)
  To: Jon Hunter; +Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-tegra

On Tue, 14 Jul 2020 10:08:02 +0200,
Jon Hunter wrote:
> 
> Hi Takashi,
> 
> On 18/06/2020 15:40, Takashi Iwai wrote:
> > In the end we already enabled the sync-write mode for most of HD-audio
> > controllers including Intel, and it's no big merit to keep the async
> > write mode for the rest.  Let's make it as default and drop the
> > superfluous AZX_DCAPS_SYNC_WRITE bit flag.
> > 
> > Also, avoid to set the allow_bus_reset flag, which is a quite unstable
> > and hackish behavior that was needed only for some early platforms
> > (decades ago).  The straight fallback to the single cmd mode is more
> > robust.
> > 
> > Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
> 
> 
> I have noticed a regression in HDA playback on our Tegra186 Jetson TX2
> platform. Bisect is pointing to this patch and reverting this does
> appear to fix it. Interestingly, I am not seeing any problems on other
> Tegra platforms, however, Tegra186 does have the IOMMU enabled for HDA
> which is one different between the other platforms.
> 
> We can take a closer look at this for Tegra, but I am wondering if we
> revert this for Tegra for now.

It's a deja vu, we (or someone else in Nvidia?) discussed it in the
past?

The patch below should cure the problem temporarily, as it sets the
polling mode as default for Tegra.  But it'd be appreciated if you can
find the root cause.


thanks,

Takashi

--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -394,6 +394,7 @@ static int hda_tegra_create(struct snd_card *card,
 	if (err < 0)
 		return err;
 
+	chip->bus.core.polling = 1;
 	chip->bus.core.needs_damn_long_delay = 1;
 
 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);

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

* Re: [PATCH] ALSA: hda: Enable sync-write operation as default for all controllers
       [not found]         ` <s5hy2nmv6qv.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
@ 2020-07-14  9:08           ` Jon Hunter
       [not found]             ` <6f7a6d27-127d-9242-0638-abaf10e38410-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Hunter @ 2020-07-14  9:08 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-tegra


On 14/07/2020 09:30, Takashi Iwai wrote:
> On Tue, 14 Jul 2020 10:08:02 +0200,
> Jon Hunter wrote:
>>
>> Hi Takashi,
>>
>> On 18/06/2020 15:40, Takashi Iwai wrote:
>>> In the end we already enabled the sync-write mode for most of HD-audio
>>> controllers including Intel, and it's no big merit to keep the async
>>> write mode for the rest.  Let's make it as default and drop the
>>> superfluous AZX_DCAPS_SYNC_WRITE bit flag.
>>>
>>> Also, avoid to set the allow_bus_reset flag, which is a quite unstable
>>> and hackish behavior that was needed only for some early platforms
>>> (decades ago).  The straight fallback to the single cmd mode is more
>>> robust.
>>>
>>> Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
>>
>>
>> I have noticed a regression in HDA playback on our Tegra186 Jetson TX2
>> platform. Bisect is pointing to this patch and reverting this does
>> appear to fix it. Interestingly, I am not seeing any problems on other
>> Tegra platforms, however, Tegra186 does have the IOMMU enabled for HDA
>> which is one different between the other platforms.
>>
>> We can take a closer look at this for Tegra, but I am wondering if we
>> revert this for Tegra for now.
> 
> It's a deja vu, we (or someone else in Nvidia?) discussed it in the
> past?
> 
> The patch below should cure the problem temporarily, as it sets the
> polling mode as default for Tegra.  But it'd be appreciated if you can
> find the root cause.
> 
> 
> thanks,
> 
> Takashi
> 
> --- a/sound/pci/hda/hda_tegra.c
> +++ b/sound/pci/hda/hda_tegra.c
> @@ -394,6 +394,7 @@ static int hda_tegra_create(struct snd_card *card,
>  	if (err < 0)
>  		return err;
>  
> +	chip->bus.core.polling = 1;
>  	chip->bus.core.needs_damn_long_delay = 1;
>  
>  	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
> 

Did you mean ...

diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 0cc5fad1af8a..5637f0129932 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -443,6 +443,7 @@ static int hda_tegra_create(struct snd_card *card,
        if (err < 0)
                return err;

+       chip->bus.core.sync_write = 0;
        chip->bus.core.needs_damn_long_delay = 1;
        chip->bus.core.aligned_mmio = 1;

The above works for me.

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH] ALSA: hda: Enable sync-write operation as default for all controllers
       [not found]             ` <6f7a6d27-127d-9242-0638-abaf10e38410-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2020-07-14  9:12               ` Takashi Iwai
       [not found]                 ` <s5hr1tev4sw.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2020-07-14  9:12 UTC (permalink / raw)
  To: Jon Hunter; +Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-tegra

On Tue, 14 Jul 2020 11:08:18 +0200,
Jon Hunter wrote:
> 
> 
> On 14/07/2020 09:30, Takashi Iwai wrote:
> > On Tue, 14 Jul 2020 10:08:02 +0200,
> > Jon Hunter wrote:
> >>
> >> Hi Takashi,
> >>
> >> On 18/06/2020 15:40, Takashi Iwai wrote:
> >>> In the end we already enabled the sync-write mode for most of HD-audio
> >>> controllers including Intel, and it's no big merit to keep the async
> >>> write mode for the rest.  Let's make it as default and drop the
> >>> superfluous AZX_DCAPS_SYNC_WRITE bit flag.
> >>>
> >>> Also, avoid to set the allow_bus_reset flag, which is a quite unstable
> >>> and hackish behavior that was needed only for some early platforms
> >>> (decades ago).  The straight fallback to the single cmd mode is more
> >>> robust.
> >>>
> >>> Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
> >>
> >>
> >> I have noticed a regression in HDA playback on our Tegra186 Jetson TX2
> >> platform. Bisect is pointing to this patch and reverting this does
> >> appear to fix it. Interestingly, I am not seeing any problems on other
> >> Tegra platforms, however, Tegra186 does have the IOMMU enabled for HDA
> >> which is one different between the other platforms.
> >>
> >> We can take a closer look at this for Tegra, but I am wondering if we
> >> revert this for Tegra for now.
> > 
> > It's a deja vu, we (or someone else in Nvidia?) discussed it in the
> > past?
> > 
> > The patch below should cure the problem temporarily, as it sets the
> > polling mode as default for Tegra.  But it'd be appreciated if you can
> > find the root cause.
> > 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > --- a/sound/pci/hda/hda_tegra.c
> > +++ b/sound/pci/hda/hda_tegra.c
> > @@ -394,6 +394,7 @@ static int hda_tegra_create(struct snd_card *card,
> >  	if (err < 0)
> >  		return err;
> >  
> > +	chip->bus.core.polling = 1;
> >  	chip->bus.core.needs_damn_long_delay = 1;
> >  
> >  	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
> > 
> 
> Did you mean ...
> 
> diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
> index 0cc5fad1af8a..5637f0129932 100644
> --- a/sound/pci/hda/hda_tegra.c
> +++ b/sound/pci/hda/hda_tegra.c
> @@ -443,6 +443,7 @@ static int hda_tegra_create(struct snd_card *card,
>         if (err < 0)
>                 return err;
> 
> +       chip->bus.core.sync_write = 0;
>         chip->bus.core.needs_damn_long_delay = 1;
>         chip->bus.core.aligned_mmio = 1;
> 
> The above works for me.

Yeah, sorry, that was a wrong patch :)
I'm fine for applying it with some more comments.

Care to submit a proper patch?


thanks,

Takashi

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

* Re: [PATCH] ALSA: hda: Enable sync-write operation as default for all controllers
       [not found]                 ` <s5hr1tev4sw.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
@ 2020-07-14  9:51                   ` Jon Hunter
  0 siblings, 0 replies; 6+ messages in thread
From: Jon Hunter @ 2020-07-14  9:51 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-tegra


On 14/07/2020 10:12, Takashi Iwai wrote:

...

>> Did you mean ...
>>
>> diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
>> index 0cc5fad1af8a..5637f0129932 100644
>> --- a/sound/pci/hda/hda_tegra.c
>> +++ b/sound/pci/hda/hda_tegra.c
>> @@ -443,6 +443,7 @@ static int hda_tegra_create(struct snd_card *card,
>>         if (err < 0)
>>                 return err;
>>
>> +       chip->bus.core.sync_write = 0;
>>         chip->bus.core.needs_damn_long_delay = 1;
>>         chip->bus.core.aligned_mmio = 1;
>>
>> The above works for me.
> 
> Yeah, sorry, that was a wrong patch :)
> I'm fine for applying it with some more comments.
> 
> Care to submit a proper patch?


No problem. I will submit a patch.

Jon

-- 
nvpublic

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

end of thread, other threads:[~2020-07-14  9:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200618144051.7415-1-tiwai@suse.de>
     [not found] ` <20200618144051.7415-1-tiwai-l3A5Bk7waGM@public.gmane.org>
2020-07-14  8:08   ` [PATCH] ALSA: hda: Enable sync-write operation as default for all controllers Jon Hunter
     [not found]     ` <8fc9f086-9a34-4287-8f51-6e0ebc34928f-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-07-14  8:09       ` Jon Hunter
2020-07-14  8:30       ` Takashi Iwai
     [not found]         ` <s5hy2nmv6qv.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2020-07-14  9:08           ` Jon Hunter
     [not found]             ` <6f7a6d27-127d-9242-0638-abaf10e38410-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-07-14  9:12               ` Takashi Iwai
     [not found]                 ` <s5hr1tev4sw.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2020-07-14  9:51                   ` Jon Hunter

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).