All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Binding <sbinding@opensource.cirrus.com>
To: 'ArcticLampyrid' <ArcticLampyrid@outlook.com>,
	<james.schulman@cirrus.com>, <david.rhodes@cirrus.com>,
	<rf@opensource.cirrus.com>
Cc: <patches@opensource.cirrus.com>, <linux-sound@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 1/2] ALSA: cs35l41: obey the trigger type from DSDT
Date: Thu, 18 Apr 2024 11:58:12 +0100	[thread overview]
Message-ID: <002001da917f$4ebdb2e0$ec3918a0$@opensource.cirrus.com> (raw)
In-Reply-To: <TYCP286MB253551BDCC83320C246BD494C40E2@TYCP286MB2535.JPNP286.PROD.OUTLOOK.COM>

Hi,

Looking at the ACPI attached previously, this issue needs some more
investigation.
I don't think this patch is a good idea, since it is unknown what
effects this patch will have on other laptops.

Thanks,
Stefan

> -----Original Message-----
> From: ArcticLampyrid <ArcticLampyrid@outlook.com>
> Sent: Thursday, April 18, 2024 7:46 AM
> To: james.schulman@cirrus.com; david.rhodes@cirrus.com;
> rf@opensource.cirrus.com
> Cc: patches@opensource.cirrus.com; linux-sound@vger.kernel.org;
linux-
> kernel@vger.kernel.org; ArcticLampyrid <ArcticLampyrid@outlook.com>
> Subject: [PATCH v2 1/2] ALSA: cs35l41: obey the trigger type from
DSDT
> 
> On some models, CSC3551's interrupt pin connected to
> APIC. We need to obey the trigger type from DSDT in this case.
> 
> Signed-off-by: ArcticLampyrid <ArcticLampyrid@outlook.com>
> ---
>  sound/pci/hda/cs35l41_hda.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/sound/pci/hda/cs35l41_hda.c
b/sound/pci/hda/cs35l41_hda.c
> index d3fa6e136744..d9c7b4034684 100644
> --- a/sound/pci/hda/cs35l41_hda.c
> +++ b/sound/pci/hda/cs35l41_hda.c
> @@ -10,6 +10,7 @@
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
>  #include <sound/hda_codec.h>
> +#include <linux/irq.h>
>  #include <sound/soc.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/spi/spi.h>
> @@ -1511,6 +1512,14 @@ static int
cs35l41_hda_apply_properties(struct
> cs35l41_hda *cs35l41)
>  	irq_pol = cs35l41_gpio_config(cs35l41->regmap, hw_cfg);
> 
>  	if (cs35l41->irq && using_irq) {
> +		struct irq_data *irq_data;
> +
> +		irq_data = irq_get_irq_data(cs35l41->irq);
> +		if (irq_data && irqd_trigger_type_was_set(irq_data)) {
> +			irq_pol = irqd_get_trigger_type(irq_data);
> +			dev_info(cs35l41->dev, "Using configured IRQ
> Polarity: %d\n", irq_pol);
> +		}
> +
>  		ret = devm_regmap_add_irq_chip(cs35l41->dev, cs35l41-
> >regmap, cs35l41->irq,
>  					       IRQF_ONESHOT |
> IRQF_SHARED | irq_pol,
>  					       0,
> &cs35l41_regmap_irq_chip, &cs35l41->irq_data);
> --
> 2.44.0
> 



  reply	other threads:[~2024-04-18 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18  6:43 [PATCH v2 0/2] ALSA: hda/realtek: Fix internal speakers for Legion Y9000X 2022 IAH7 ArcticLampyrid
2024-04-18  6:45 ` [PATCH v2 1/2] ALSA: cs35l41: obey the trigger type from DSDT ArcticLampyrid
2024-04-18 10:58   ` Stefan Binding [this message]
2024-04-18  6:45 ` [PATCH v2 2/2] ALSA: hda/realtek: Fix internal speakers for Legion Y9000X 2022 IAH7 ArcticLampyrid
2024-04-18 10:59   ` Stefan Binding
2024-04-18 13:21 ` [PATCH v2 0/2] " ArcticLampyrid

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='002001da917f$4ebdb2e0$ec3918a0$@opensource.cirrus.com' \
    --to=sbinding@opensource.cirrus.com \
    --cc=ArcticLampyrid@outlook.com \
    --cc=david.rhodes@cirrus.com \
    --cc=james.schulman@cirrus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=rf@opensource.cirrus.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.