diff mbox series

ALSA: hda - Force polling mode on CML for fixing codec communication

Message ID 1569303443-6838-1-git-send-email-sathyanarayana.nujella@intel.com (mailing list archive)
State New, archived
Headers show
Series ALSA: hda - Force polling mode on CML for fixing codec communication | expand

Commit Message

Sathyanarayana Nujella Sept. 24, 2019, 5:37 a.m. UTC
We observed the same issue as reported by commit a8d7bde23e7130686b7662
("ALSA: hda - Force polling mode on CFL for fixing codec communication")
Apply the same fix to CML.

Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Joyce Toh <joyce.toh@intel.com>
---
 sound/pci/hda/hda_intel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Takashi Iwai Sept. 24, 2019, 6:30 a.m. UTC | #1
On Tue, 24 Sep 2019 07:37:23 +0200,
Sathyanarayana Nujella wrote:
> 
> We observed the same issue as reported by commit a8d7bde23e7130686b7662
> ("ALSA: hda - Force polling mode on CFL for fixing codec communication")
> Apply the same fix to CML.
> 
> Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
> Signed-off-by: Joyce Toh <joyce.toh@intel.com>

Could you confirm that this workaround is still necessary for the
latest code?  We switched to the write-sync on the recent Intel chips,
and this may already cover such errors.


thanks,

Takashi

> ---
>  sound/pci/hda/hda_intel.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 91e71be42fa4..e6997a5bf098 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -370,6 +370,7 @@ enum {
>  #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
>  #define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
>  #define IS_CNL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9dc8)
> +#define IS_CML(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x02c8)
>  
>  static char *driver_short_names[] = {
>  	[AZX_DRIVER_ICH] = "HDA Intel",
> @@ -1754,7 +1755,7 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
>  		azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_UC;
>  
>  	/* Workaround for a communication error on CFL (bko#199007) and CNL */
> -	if (IS_CFL(pci) || IS_CNL(pci))
> +	if (IS_CFL(pci) || IS_CNL(pci) || IS_CML(pci))
>  		azx_bus(chip)->polling_mode = 1;
>  
>  	if (chip->driver_type == AZX_DRIVER_NVIDIA) {
> -- 
> 2.7.4
>
Pierre-Louis Bossart Sept. 24, 2019, 1:32 p.m. UTC | #2
On 9/24/19 12:37 AM, Sathyanarayana Nujella wrote:
> We observed the same issue as reported by commit a8d7bde23e7130686b7662
> ("ALSA: hda - Force polling mode on CFL for fixing codec communication")
> Apply the same fix to CML.
> 
> Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
> Signed-off-by: Joyce Toh <joyce.toh@intel.com>
> ---
>   sound/pci/hda/hda_intel.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 91e71be42fa4..e6997a5bf098 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -370,6 +370,7 @@ enum {
>   #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
>   #define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
>   #define IS_CNL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9dc8)
> +#define IS_CML(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x02c8)

nit-pick: This should be IS_CML_LP(), there are two separate PCI IDs for 
CometLake LP and H.

>   
>   static char *driver_short_names[] = {
>   	[AZX_DRIVER_ICH] = "HDA Intel",
> @@ -1754,7 +1755,7 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
>   		azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_UC;
>   
>   	/* Workaround for a communication error on CFL (bko#199007) and CNL */
> -	if (IS_CFL(pci) || IS_CNL(pci))
> +	if (IS_CFL(pci) || IS_CNL(pci) || IS_CML(pci))
>   		azx_bus(chip)->polling_mode = 1;
>   
>   	if (chip->driver_type == AZX_DRIVER_NVIDIA) {
>
Sathyanarayana Nujella Sept. 26, 2019, 6:52 p.m. UTC | #3
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Monday, September 23, 2019 11:30 PM
> To: Nujella, Sathyanarayana <sathyanarayana.nujella@intel.com>
> Cc: broonie@kernel.org; alsa-devel@alsa-project.org;
> liam.r.girdwood@linux.intel.com; pierre-louis.bossart@linux.intel.com; yung-
> chuan.liao@linux.intel.com; N, Harshapriya <harshapriya.n@intel.com>; Toh,
> Joyce <joyce.toh@intel.com>
> Subject: Re: [PATCH] ALSA: hda - Force polling mode on CML for fixing codec
> communication
> 
> 
> Could you confirm that this workaround is still necessary for the latest code?
> We switched to the write-sync on the recent Intel chips, and this may already
> cover such errors.
> 
> 
> thanks,
> 
> Takashi

Thank you.  We cross checked with latest code and specifically applied the below commit: 
ALSA: hda - Fix intermittent CORB/RIRB stall on Intel chips

Now, we see suspend & resume time significantly reduced. 
So, current WA patch is not needed.

BR
Sathya
diff mbox series

Patch

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 91e71be42fa4..e6997a5bf098 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -370,6 +370,7 @@  enum {
 #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
 #define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
 #define IS_CNL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9dc8)
+#define IS_CML(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x02c8)
 
 static char *driver_short_names[] = {
 	[AZX_DRIVER_ICH] = "HDA Intel",
@@ -1754,7 +1755,7 @@  static int azx_create(struct snd_card *card, struct pci_dev *pci,
 		azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_UC;
 
 	/* Workaround for a communication error on CFL (bko#199007) and CNL */
-	if (IS_CFL(pci) || IS_CNL(pci))
+	if (IS_CFL(pci) || IS_CNL(pci) || IS_CML(pci))
 		azx_bus(chip)->polling_mode = 1;
 
 	if (chip->driver_type == AZX_DRIVER_NVIDIA) {