lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 23 Apr 2023 09:24:53 +0000
From:   Reaper Li_OC <ReaperLiOC@...nfly.com>
To:     Takashi Iwai <tiwai@...e.de>
CC:     "perex@...ex.cz" <perex@...ex.cz>,
        "tiwai@...e.com" <tiwai@...e.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Jason Tao(SH-RD)" <JasonTao@...nfly.com>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>
Subject: 答复: [可能是垃圾邮件]  Re: [PATCH] ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs.

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.

Best Regards,

ReaperLi
________________________________________
发件人: Takashi Iwai <tiwai@...e.de>
发送时间: 2023年4月18日 17:44
收件人: Reaper Li_OC
抄送: perex@...ex.cz; tiwai@...e.com; linux-kernel@...r.kernel.org; Jason Tao(SH-RD); alsa-devel@...a-project.org
主题: [可能是垃圾邮件]  Re: [PATCH] ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs.

On Tue, 18 Apr 2023 10:33:12 +0200,
reaperli wrote:
>
> From: jasontao <jasontao@...nfly.com>
>
> Add a set of HD Audio PCI IDS, and the HDMI codec vendor IDs for
> Glenfly Arise.
>
> Signed-off-by: jasontao <jasontao@...nfly.com>
> Signed-off-by: reaperli <reaperlioc@...nfly.com>

The patch looks OK now, but could you submit to alsa-devel ML at the
next time?

About details in the patch:

> @@ -1743,6 +1745,8 @@ static int default_bdl_pos_adj(struct azx *chip)
>       }
>
>       switch (chip->driver_type) {
> +     case AZX_DRIVER_GFHDMI:
> +             return 128;

So this looks pretty high in comparison with other chips.
It means that the actual position is much behind the reported
position.  Due to a large FIFO?  Or what reason?

> @@ -1859,6 +1863,9 @@ static int azx_first_init(struct azx *chip)
>       }
>  #endif
>
> +     if (chip->driver_type == AZX_DRIVER_GFHDMI)
> +             bus->polling_mode = 1;

This looks odd, too.  Doesn't the hardware give any interrupt back
upon the CORB/RIRB response?

> --- 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;

This hack is needed for what reason?


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ