* [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values
@ 2024-01-22 11:45 Rui Salvaterra
2024-01-22 11:45 ` [PATCH 2/2] ALSA: hda: Increase default bdl_pos_adj for Apollo Lake Rui Salvaterra
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Rui Salvaterra @ 2024-01-22 11:45 UTC (permalink / raw)
To: amadeuszx.slawinski, tiwai; +Cc: linux-sound, linux-kernel, Rui Salvaterra
We have self-explanatory constants for Intel HDA devices, let's use them instead
of magic numbers and code comments.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
---
sound/pci/hda/hda_intel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 2276adc84478..66f013ee160d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1729,8 +1729,8 @@ static int default_bdl_pos_adj(struct azx *chip)
/* some exceptions: Atoms seem problematic with value 1 */
if (chip->pci->vendor == PCI_VENDOR_ID_INTEL) {
switch (chip->pci->device) {
- case 0x0f04: /* Baytrail */
- case 0x2284: /* Braswell */
+ case PCI_DEVICE_ID_INTEL_HDA_BYT:
+ case PCI_DEVICE_ID_INTEL_HDA_BSW:
return 32;
}
}
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ALSA: hda: Increase default bdl_pos_adj for Apollo Lake
2024-01-22 11:45 [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values Rui Salvaterra
@ 2024-01-22 11:45 ` Rui Salvaterra
2024-01-22 11:51 ` Amadeusz Sławiński
2024-01-22 11:51 ` [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values Amadeusz Sławiński
2024-01-23 7:51 ` Takashi Iwai
2 siblings, 1 reply; 5+ messages in thread
From: Rui Salvaterra @ 2024-01-22 11:45 UTC (permalink / raw)
To: amadeuszx.slawinski, tiwai; +Cc: linux-sound, linux-kernel, Rui Salvaterra
Apollo Lake seems to also suffer from IRQ timing issues. After being up for ~4
minutes, a Pentium N4200 system ends up falling back to workqueue-based IRQ
handling:
[ 208.019906] snd_hda_intel 0000:00:0e.0: IRQ timing workaround is activated
for card #0. Suggest a bigger bdl_pos_adj.
Unfortunately, the Baytrail and Braswell workaround value of 32 samples isn't
enough to fix the issue here. Default to 64 samples.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
---
sound/pci/hda/hda_intel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 66f013ee160d..1b550c42db09 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1732,6 +1732,8 @@ static int default_bdl_pos_adj(struct azx *chip)
case PCI_DEVICE_ID_INTEL_HDA_BYT:
case PCI_DEVICE_ID_INTEL_HDA_BSW:
return 32;
+ case PCI_DEVICE_ID_INTEL_HDA_APL:
+ return 64;
}
}
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values
2024-01-22 11:45 [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values Rui Salvaterra
2024-01-22 11:45 ` [PATCH 2/2] ALSA: hda: Increase default bdl_pos_adj for Apollo Lake Rui Salvaterra
@ 2024-01-22 11:51 ` Amadeusz Sławiński
2024-01-23 7:51 ` Takashi Iwai
2 siblings, 0 replies; 5+ messages in thread
From: Amadeusz Sławiński @ 2024-01-22 11:51 UTC (permalink / raw)
To: Rui Salvaterra, tiwai; +Cc: linux-sound, linux-kernel
On 1/22/2024 12:45 PM, Rui Salvaterra wrote:
> We have self-explanatory constants for Intel HDA devices, let's use them instead
> of magic numbers and code comments.
>
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
> ---
> sound/pci/hda/hda_intel.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 2276adc84478..66f013ee160d 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -1729,8 +1729,8 @@ static int default_bdl_pos_adj(struct azx *chip)
> /* some exceptions: Atoms seem problematic with value 1 */
> if (chip->pci->vendor == PCI_VENDOR_ID_INTEL) {
> switch (chip->pci->device) {
> - case 0x0f04: /* Baytrail */
> - case 0x2284: /* Braswell */
> + case PCI_DEVICE_ID_INTEL_HDA_BYT:
> + case PCI_DEVICE_ID_INTEL_HDA_BSW:
> return 32;
> }
> }
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ALSA: hda: Increase default bdl_pos_adj for Apollo Lake
2024-01-22 11:45 ` [PATCH 2/2] ALSA: hda: Increase default bdl_pos_adj for Apollo Lake Rui Salvaterra
@ 2024-01-22 11:51 ` Amadeusz Sławiński
0 siblings, 0 replies; 5+ messages in thread
From: Amadeusz Sławiński @ 2024-01-22 11:51 UTC (permalink / raw)
To: Rui Salvaterra, tiwai; +Cc: linux-sound, linux-kernel
On 1/22/2024 12:45 PM, Rui Salvaterra wrote:
> Apollo Lake seems to also suffer from IRQ timing issues. After being up for ~4
> minutes, a Pentium N4200 system ends up falling back to workqueue-based IRQ
> handling:
>
> [ 208.019906] snd_hda_intel 0000:00:0e.0: IRQ timing workaround is activated
> for card #0. Suggest a bigger bdl_pos_adj.
>
> Unfortunately, the Baytrail and Braswell workaround value of 32 samples isn't
> enough to fix the issue here. Default to 64 samples.
>
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
> ---
> sound/pci/hda/hda_intel.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 66f013ee160d..1b550c42db09 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -1732,6 +1732,8 @@ static int default_bdl_pos_adj(struct azx *chip)
> case PCI_DEVICE_ID_INTEL_HDA_BYT:
> case PCI_DEVICE_ID_INTEL_HDA_BSW:
> return 32;
> + case PCI_DEVICE_ID_INTEL_HDA_APL:
> + return 64;
> }
> }
>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values
2024-01-22 11:45 [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values Rui Salvaterra
2024-01-22 11:45 ` [PATCH 2/2] ALSA: hda: Increase default bdl_pos_adj for Apollo Lake Rui Salvaterra
2024-01-22 11:51 ` [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values Amadeusz Sławiński
@ 2024-01-23 7:51 ` Takashi Iwai
2 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2024-01-23 7:51 UTC (permalink / raw)
To: Rui Salvaterra; +Cc: amadeuszx.slawinski, tiwai, linux-sound, linux-kernel
On Mon, 22 Jan 2024 12:45:12 +0100,
Rui Salvaterra wrote:
>
> We have self-explanatory constants for Intel HDA devices, let's use them instead
> of magic numbers and code comments.
>
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Applied both patches now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-23 7:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-22 11:45 [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values Rui Salvaterra
2024-01-22 11:45 ` [PATCH 2/2] ALSA: hda: Increase default bdl_pos_adj for Apollo Lake Rui Salvaterra
2024-01-22 11:51 ` Amadeusz Sławiński
2024-01-22 11:51 ` [PATCH 1/2] ALSA: hda: Replace numeric device IDs with constant values Amadeusz Sławiński
2024-01-23 7:51 ` Takashi Iwai
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.