All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Reaper Li_OC <ReaperLiOC@glenfly.com>
Cc: "tiwai@suse.com" <tiwai@suse.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Jason Tao(SH-RD)" <JasonTao@glenfly.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: 答复: [可能是垃圾邮件]  Re: [PATCH] ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs.
Date: Mon, 24 Apr 2023 16:08:50 +0200	[thread overview]
Message-ID: <87354pwex9.wl-tiwai@suse.de> (raw)
In-Reply-To: <c805ef8c3a384df8b7b8a189da8318dc@glenfly.com>

On Sun, 23 Apr 2023 11:15:57 +0200,
Reaper Li_OC wrote:
> 
> 
> Hi
> 
> Thanks, I will also submit to alsa-devel ML at the next time. 
> 
> For the listed questions:
> 
> > @@ -1743,6 +1745,8 @@ static int default_bdl_pos_adj(struct azx *chip)
> >        }
> > 
> >        switch (chip->driver_type) {
> > +     case AZX_DRIVER_GFHDMI:
> > +             return 128;
> 
>  our chip need increase the bdl as there is limitation on hardware, once hdac
> interrupt interval is too short, the audio data may get lost.
> 
> > @@ -1859,6 +1863,9 @@ static int azx_first_init(struct azx *chip)
> >        }
> >  #endif
> > 
> > +     if (chip->driver_type == AZX_DRIVER_GFHDMI)
> > +             bus->polling_mode = 1;
> 
> Our chip has interrupt upon the CORB/RIRB response, when the codec complete
> the command, It sends interrupt and writes response entries to memory, However
> on our hardware, the response entries sometimes are not actually synchronized
> to memory when driver handle the hdac interrupt. If the RIRB status is not
> updated in the hdac interrupt handler, azx_rirb_get_response keeps trying to
> receive a response  from rirb until 1s timout before enabling polling_mode,
> some apps treat it as an error. So for our hardware, need to enable
> polling_mode to fix it.
> 
> > --- a/sound/pci/hda/patch_hdmi.c
> > +++ b/sound/pci/hda/patch_hdmi.c
> > @@ -4489,6 +4489,18 @@ static int patch_via_hdmi(struct hda_codec *codec)
> >        return patch_simple_hdmi(codec, VIAHDMI_CVT_NID, VIAHDMI_PIN_NID);
> >  }
> > 
> > +static int patch_gf_hdmi(struct hda_codec *codec)
> > +{
> > +     int err;
> > +
> > +     err = patch_generic_hdmi(codec);
> > +     if (err)
> > +             return err;
> > +
> > +     codec->no_sticky_stream = 1;
> 
> On our chip, there are two codecs. when stream switch from one codec to
> another codec, our hardware need driver to do actual clean-ups in
> codec_cleanup_stream for the linked codec, otherwise it can't complete switch
> successfully.

OK, then please provide those info as comments briefly in relevant
places, as well as some details in the commit log.


thanks,

Takashi

WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Reaper Li_OC <ReaperLiOC@glenfly.com>
Cc: "perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Jason Tao(SH-RD)" <JasonTao@glenfly.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: 答复: [可能是垃圾邮件]  Re: [PATCH] ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs.
Date: Mon, 24 Apr 2023 16:08:50 +0200	[thread overview]
Message-ID: <87354pwex9.wl-tiwai@suse.de> (raw)
In-Reply-To: <c805ef8c3a384df8b7b8a189da8318dc@glenfly.com>

On Sun, 23 Apr 2023 11:15:57 +0200,
Reaper Li_OC wrote:
> 
> 
> Hi
> 
> Thanks, I will also submit to alsa-devel ML at the next time. 
> 
> For the listed questions:
> 
> > @@ -1743,6 +1745,8 @@ static int default_bdl_pos_adj(struct azx *chip)
> >        }
> > 
> >        switch (chip->driver_type) {
> > +     case AZX_DRIVER_GFHDMI:
> > +             return 128;
> 
>  our chip need increase the bdl as there is limitation on hardware, once hdac
> interrupt interval is too short, the audio data may get lost.
> 
> > @@ -1859,6 +1863,9 @@ static int azx_first_init(struct azx *chip)
> >        }
> >  #endif
> > 
> > +     if (chip->driver_type == AZX_DRIVER_GFHDMI)
> > +             bus->polling_mode = 1;
> 
> Our chip has interrupt upon the CORB/RIRB response, when the codec complete
> the command, It sends interrupt and writes response entries to memory, However
> on our hardware, the response entries sometimes are not actually synchronized
> to memory when driver handle the hdac interrupt. If the RIRB status is not
> updated in the hdac interrupt handler, azx_rirb_get_response keeps trying to
> receive a response  from rirb until 1s timout before enabling polling_mode,
> some apps treat it as an error. So for our hardware, need to enable
> polling_mode to fix it.
> 
> > --- a/sound/pci/hda/patch_hdmi.c
> > +++ b/sound/pci/hda/patch_hdmi.c
> > @@ -4489,6 +4489,18 @@ static int patch_via_hdmi(struct hda_codec *codec)
> >        return patch_simple_hdmi(codec, VIAHDMI_CVT_NID, VIAHDMI_PIN_NID);
> >  }
> > 
> > +static int patch_gf_hdmi(struct hda_codec *codec)
> > +{
> > +     int err;
> > +
> > +     err = patch_generic_hdmi(codec);
> > +     if (err)
> > +             return err;
> > +
> > +     codec->no_sticky_stream = 1;
> 
> On our chip, there are two codecs. when stream switch from one codec to
> another codec, our hardware need driver to do actual clean-ups in
> codec_cleanup_stream for the linked codec, otherwise it can't complete switch
> successfully.

OK, then please provide those info as comments briefly in relevant
places, as well as some details in the commit log.


thanks,

Takashi

  reply	other threads:[~2023-04-24 14:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18  8:33 [PATCH] ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs reaperli
2023-04-18  9:44 ` Takashi Iwai
2023-04-18  9:44   ` Takashi Iwai
2023-04-23  9:15   ` 答复: [可能是垃圾邮件] " Reaper Li_OC
2023-04-24 14:08     ` Takashi Iwai [this message]
2023-04-24 14:08       ` Takashi Iwai
2023-04-23  9:24   ` Reaper Li_OC
2023-04-23  9:24     ` Reaper Li_OC

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87354pwex9.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=JasonTao@glenfly.com \
    --cc=ReaperLiOC@glenfly.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.