* [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
@ 2024-08-02 15:22 Richard Fitzgerald
2024-08-02 15:22 ` [PATCH v2 1/3] spi: Add empty versions of ACPI functions Richard Fitzgerald
` (6 more replies)
0 siblings, 7 replies; 16+ messages in thread
From: Richard Fitzgerald @ 2024-08-02 15:22 UTC (permalink / raw)
To: tiwai, broonie, wsa+renesas, mika.westerberg
Cc: linux-sound, linux-spi, linux-i2c, linux-kernel, patches,
Richard Fitzgerald
Add support for HP G12 laptops that use CS35L54 or CS35L56 amplifiers
with Realtek HDA codecs. Some of these use the same SSID for models with
CS35L54 and models with CS35L56 so the ACPI entries are examined to
determine which amp is present.
To avoid having to #ifdef around this code we've fixed the definitions
of SPI and I2C functions that were not correctly supplying dummy functions
when the real functions are not in the build.
Changes since V1:
Added I2C and SPI patches to provide dummy functions.
Richard Fitzgerald (2):
spi: Add empty versions of ACPI functions
i2c: Fix conditional for substituting empty ACPI functions
Simon Trimmer (1):
ALSA: hda/realtek: Add support for new HP G12 laptops
include/linux/i2c.h | 2 +-
include/linux/spi/spi.h | 19 ++++++-
sound/pci/hda/patch_realtek.c | 99 +++++++++++++++++++++++++++++++++++
3 files changed, 118 insertions(+), 2 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/3] spi: Add empty versions of ACPI functions
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
@ 2024-08-02 15:22 ` Richard Fitzgerald
2024-08-02 15:22 ` [PATCH v2 2/3] i2c: Fix conditional for substituting empty " Richard Fitzgerald
` (5 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Richard Fitzgerald @ 2024-08-02 15:22 UTC (permalink / raw)
To: tiwai, broonie, wsa+renesas, mika.westerberg
Cc: linux-sound, linux-spi, linux-i2c, linux-kernel, patches,
Richard Fitzgerald
Provide empty versions of acpi_spi_count_resources(),
acpi_spi_device_alloc() and acpi_spi_find_controller_by_adev()
if the real functions are not being built.
This commit fixes two problems with the original definitions:
1) There wasn't an empty version of these functions
2) The #if only depended on CONFIG_ACPI. But the functions are implemented
in the core spi.c so CONFIG_SPI_MASTER must also be enabled for the real
functions to exist.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
Changes since V1:
- This patch is new in V2.
include/linux/spi/spi.h | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index e4f3f3d30a03..d47d5f14ff99 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -902,12 +902,29 @@ extern int devm_spi_register_controller(struct device *dev,
struct spi_controller *ctlr);
extern void spi_unregister_controller(struct spi_controller *ctlr);
-#if IS_ENABLED(CONFIG_ACPI)
+#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SPI_MASTER)
extern struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev);
extern struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr,
struct acpi_device *adev,
int index);
int acpi_spi_count_resources(struct acpi_device *adev);
+#else
+static inline struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev)
+{
+ return NULL;
+}
+
+static inline struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr,
+ struct acpi_device *adev,
+ int index)
+{
+ return ERR_PTR(-ENODEV);
+}
+
+static inline int acpi_spi_count_resources(struct acpi_device *adev)
+{
+ return 0;
+}
#endif
/*
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/3] i2c: Fix conditional for substituting empty ACPI functions
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
2024-08-02 15:22 ` [PATCH v2 1/3] spi: Add empty versions of ACPI functions Richard Fitzgerald
@ 2024-08-02 15:22 ` Richard Fitzgerald
2024-08-04 14:34 ` Wolfram Sang
2024-08-02 15:22 ` [PATCH v2 3/3] ALSA: hda/realtek: Add support for new HP G12 laptops Richard Fitzgerald
` (4 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Richard Fitzgerald @ 2024-08-02 15:22 UTC (permalink / raw)
To: tiwai, broonie, wsa+renesas, mika.westerberg
Cc: linux-sound, linux-spi, linux-i2c, linux-kernel, patches,
Richard Fitzgerald
Add IS_ENABLED(CONFIG_I2C) to the conditional around a bunch of ACPI
functions.
The conditional around these functions depended only on CONFIG_ACPI.
But the functions are implemented in I2C core, so are only present if
CONFIG_I2C is enabled.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
Changes since V1:
- This patch is new in V2.
include/linux/i2c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 07e33bbc9256..7eedd0c662da 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -1066,7 +1066,7 @@ static inline int of_i2c_get_board_info(struct device *dev,
struct acpi_resource;
struct acpi_resource_i2c_serialbus;
-#if IS_ENABLED(CONFIG_ACPI)
+#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_I2C)
bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
struct acpi_resource_i2c_serialbus **i2c);
int i2c_acpi_client_count(struct acpi_device *adev);
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 3/3] ALSA: hda/realtek: Add support for new HP G12 laptops
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
2024-08-02 15:22 ` [PATCH v2 1/3] spi: Add empty versions of ACPI functions Richard Fitzgerald
2024-08-02 15:22 ` [PATCH v2 2/3] i2c: Fix conditional for substituting empty " Richard Fitzgerald
@ 2024-08-02 15:22 ` Richard Fitzgerald
2024-08-02 21:49 ` (subset) [PATCH v2 0/3] ALSA: " Mark Brown
` (3 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Richard Fitzgerald @ 2024-08-02 15:22 UTC (permalink / raw)
To: tiwai, broonie, wsa+renesas, mika.westerberg
Cc: linux-sound, linux-spi, linux-i2c, linux-kernel, patches,
Simon Trimmer, Richard Fitzgerald
From: Simon Trimmer <simont@opensource.cirrus.com>
Some of these laptop models have quirk IDs that are identical but have
different amplifier parts fitted, this difference is described in the
ACPI information.
The solution introduced for this product family can derive the required
component binding information from ACPI instead of hardcoding it,
supports the new variants of the CS35L56 being used and has generalized
naming that makes it applicable to other ALC+amp combinations.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
No changes since V1.
sound/pci/hda/patch_realtek.c | 99 +++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1645d21d422f..1a05c647f08c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -11,15 +11,18 @@
*/
#include <linux/acpi.h>
+#include <linux/cleanup.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/dmi.h>
#include <linux/module.h>
+#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/leds.h>
#include <linux/ctype.h>
+#include <linux/spi/spi.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/hda_codec.h>
@@ -6856,6 +6859,86 @@ static void comp_generic_fixup(struct hda_codec *cdc, int action, const char *bu
}
}
+static void cs35lxx_autodet_fixup(struct hda_codec *cdc,
+ const struct hda_fixup *fix,
+ int action)
+{
+ struct device *dev = hda_codec_dev(cdc);
+ struct acpi_device *adev;
+ struct fwnode_handle *fwnode __free(fwnode_handle) = NULL;
+ const char *bus = NULL;
+ static const struct {
+ const char *hid;
+ const char *name;
+ } acpi_ids[] = {{ "CSC3554", "cs35l54-hda" },
+ { "CSC3556", "cs35l56-hda" },
+ { "CSC3557", "cs35l57-hda" }};
+ char *match;
+ int i, count = 0, count_devindex = 0;
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ for (i = 0; i < ARRAY_SIZE(acpi_ids); ++i) {
+ adev = acpi_dev_get_first_match_dev(acpi_ids[i].hid, NULL, -1);
+ if (adev)
+ break;
+ }
+ if (!adev) {
+ dev_err(dev, "Failed to find ACPI entry for a Cirrus Amp\n");
+ return;
+ }
+
+ count = i2c_acpi_client_count(adev);
+ if (count > 0) {
+ bus = "i2c";
+ } else {
+ count = acpi_spi_count_resources(adev);
+ if (count > 0)
+ bus = "spi";
+ }
+
+ fwnode = fwnode_handle_get(acpi_fwnode_handle(adev));
+ acpi_dev_put(adev);
+
+ if (!bus) {
+ dev_err(dev, "Did not find any buses for %s\n", acpi_ids[i].hid);
+ return;
+ }
+
+ if (!fwnode) {
+ dev_err(dev, "Could not get fwnode for %s\n", acpi_ids[i].hid);
+ return;
+ }
+
+ /*
+ * When available the cirrus,dev-index property is an accurate
+ * count of the amps in a system and is used in preference to
+ * the count of bus devices that can contain additional address
+ * alias entries.
+ */
+ count_devindex = fwnode_property_count_u32(fwnode, "cirrus,dev-index");
+ if (count_devindex > 0)
+ count = count_devindex;
+
+ match = devm_kasprintf(dev, GFP_KERNEL, "-%%s:00-%s.%%d", acpi_ids[i].name);
+ if (!match)
+ return;
+ dev_info(dev, "Found %d %s on %s (%s)\n", count, acpi_ids[i].hid, bus, match);
+ comp_generic_fixup(cdc, action, bus, acpi_ids[i].hid, match, count);
+
+ break;
+ case HDA_FIXUP_ACT_FREE:
+ /*
+ * Pass the action on to comp_generic_fixup() so that
+ * hda_component_manager functions can be called in just once
+ * place. In this context the bus, hid, match_str or count
+ * values do not need to be calculated.
+ */
+ comp_generic_fixup(cdc, action, NULL, NULL, NULL, 0);
+ break;
+ }
+}
+
static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{
comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
@@ -7528,6 +7611,7 @@ enum {
ALC256_FIXUP_CHROME_BOOK,
ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7,
ALC287_FIXUP_LENOVO_SSID_17AA3820,
+ ALCXXX_FIXUP_CS35LXX,
};
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -9857,6 +9941,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc287_fixup_lenovo_ssid_17aa3820,
},
+ [ALCXXX_FIXUP_CS35LXX] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = cs35lxx_autodet_fixup,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -10271,6 +10359,17 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d08, "HP EliteBook 1045 14 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d85, "HP EliteBook 1040 14 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d86, "HP Elite x360 1040 14 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d8c, "HP EliteBook 830 13 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d8d, "HP Elite x360 830 13 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d8e, "HP EliteBook 840 14 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d8f, "HP EliteBook 840 14 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d90, "HP EliteBook 860 16 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALCXXX_FIXUP_CS35LXX),
+ SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALCXXX_FIXUP_CS35LXX),
SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: (subset) [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
` (2 preceding siblings ...)
2024-08-02 15:22 ` [PATCH v2 3/3] ALSA: hda/realtek: Add support for new HP G12 laptops Richard Fitzgerald
@ 2024-08-02 21:49 ` Mark Brown
2024-08-05 8:02 ` Takashi Iwai
` (2 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2024-08-02 21:49 UTC (permalink / raw)
To: tiwai, wsa+renesas, mika.westerberg, Richard Fitzgerald
Cc: linux-sound, linux-spi, linux-i2c, linux-kernel, patches
On Fri, 02 Aug 2024 16:22:12 +0100, Richard Fitzgerald wrote:
> Add support for HP G12 laptops that use CS35L54 or CS35L56 amplifiers
> with Realtek HDA codecs. Some of these use the same SSID for models with
> CS35L54 and models with CS35L56 so the ACPI entries are examined to
> determine which amp is present.
>
> To avoid having to #ifdef around this code we've fixed the definitions
> of SPI and I2C functions that were not correctly supplying dummy functions
> when the real functions are not in the build.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/3] spi: Add empty versions of ACPI functions
commit: 90ec3a8a7fd0d43026fcca979713e077d4883b56
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/3] i2c: Fix conditional for substituting empty ACPI functions
2024-08-02 15:22 ` [PATCH v2 2/3] i2c: Fix conditional for substituting empty " Richard Fitzgerald
@ 2024-08-04 14:34 ` Wolfram Sang
0 siblings, 0 replies; 16+ messages in thread
From: Wolfram Sang @ 2024-08-04 14:34 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: tiwai, broonie, mika.westerberg, linux-sound, linux-spi,
linux-i2c, linux-kernel, patches
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
On Fri, Aug 02, 2024 at 04:22:14PM +0100, Richard Fitzgerald wrote:
> Add IS_ENABLED(CONFIG_I2C) to the conditional around a bunch of ACPI
> functions.
>
> The conditional around these functions depended only on CONFIG_ACPI.
> But the functions are implemented in I2C core, so are only present if
> CONFIG_I2C is enabled.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
` (3 preceding siblings ...)
2024-08-02 21:49 ` (subset) [PATCH v2 0/3] ALSA: " Mark Brown
@ 2024-08-05 8:02 ` Takashi Iwai
2024-08-06 11:06 ` Richard Fitzgerald
2024-08-05 19:40 ` Mark Brown
2024-08-12 7:20 ` Takashi Iwai
6 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2024-08-05 8:02 UTC (permalink / raw)
To: Mark Brown, Wolfram Sang
Cc: Richard Fitzgerald, tiwai, wsa+renesas, mika.westerberg,
linux-sound, linux-spi, linux-i2c, linux-kernel, patches
On Fri, 02 Aug 2024 17:22:12 +0200,
Richard Fitzgerald wrote:
>
> Add support for HP G12 laptops that use CS35L54 or CS35L56 amplifiers
> with Realtek HDA codecs. Some of these use the same SSID for models with
> CS35L54 and models with CS35L56 so the ACPI entries are examined to
> determine which amp is present.
>
> To avoid having to #ifdef around this code we've fixed the definitions
> of SPI and I2C functions that were not correctly supplying dummy functions
> when the real functions are not in the build.
>
> Changes since V1:
> Added I2C and SPI patches to provide dummy functions.
>
> Richard Fitzgerald (2):
> spi: Add empty versions of ACPI functions
> i2c: Fix conditional for substituting empty ACPI functions
>
> Simon Trimmer (1):
> ALSA: hda/realtek: Add support for new HP G12 laptops
Hm, the 3rd patch requires both patch 1 and 2, and now those seem to
have been applied to two different trees, which makes hard to apply
the 3rd one.
Mark, Wolfram, will you guys submit PR for 6.11-rc3 including the
patch 1 and 2? If so, I can apply the patch 3 later on top of
6.11-rc3.
Or, I'd need to pull from both of you and apply the patch 3.
thanks,
Takashi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
` (4 preceding siblings ...)
2024-08-05 8:02 ` Takashi Iwai
@ 2024-08-05 19:40 ` Mark Brown
2024-08-12 7:19 ` Takashi Iwai
2024-08-12 7:20 ` Takashi Iwai
6 siblings, 1 reply; 16+ messages in thread
From: Mark Brown @ 2024-08-05 19:40 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: tiwai, wsa+renesas, mika.westerberg, linux-sound, linux-spi,
linux-i2c, linux-kernel, patches
[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]
On Fri, Aug 02, 2024 at 04:22:12PM +0100, Richard Fitzgerald wrote:
> Add support for HP G12 laptops that use CS35L54 or CS35L56 amplifiers
> with Realtek HDA codecs. Some of these use the same SSID for models with
> CS35L54 and models with CS35L56 so the ACPI entries are examined to
> determine which amp is present.
The following changes since commit a0c04bd55a467aee3eb647555343ad6971106e86:
Merge tag 'kbuild-fixes-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild (2024-07-28 14:02:48 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-acpi-lookup-dummy
for you to fetch changes up to 90ec3a8a7fd0d43026fcca979713e077d4883b56:
spi: Add empty versions of ACPI functions (2024-08-02 18:51:59 +0100)
----------------------------------------------------------------
spi: Add empty versions of ACPI lookup functions
A patch from Richard Fitzgerald adding dummy versions of the ACPI lookup
functions for SPI:
Provide empty versions of acpi_spi_count_resources(),
acpi_spi_device_alloc() and acpi_spi_find_controller_by_adev()
if the real functions are not being built.
This commit fixes two problems with the original definitions:
1) There wasn't an empty version of these functions
2) The #if only depended on CONFIG_ACPI. But the functions are implemented
in the core spi.c so CONFIG_SPI_MASTER must also be enabled for the real
functions to exist.
----------------------------------------------------------------
Richard Fitzgerald (1):
spi: Add empty versions of ACPI functions
include/linux/spi/spi.h | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-05 8:02 ` Takashi Iwai
@ 2024-08-06 11:06 ` Richard Fitzgerald
2024-08-06 11:19 ` Takashi Iwai
0 siblings, 1 reply; 16+ messages in thread
From: Richard Fitzgerald @ 2024-08-06 11:06 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown, Wolfram Sang
Cc: tiwai, mika.westerberg, linux-sound, linux-spi, linux-i2c,
linux-kernel, patches
On 5/8/24 09:02, Takashi Iwai wrote:
> On Fri, 02 Aug 2024 17:22:12 +0200,
> Richard Fitzgerald wrote:
>>
>> Add support for HP G12 laptops that use CS35L54 or CS35L56 amplifiers
>> with Realtek HDA codecs. Some of these use the same SSID for models with
>> CS35L54 and models with CS35L56 so the ACPI entries are examined to
>> determine which amp is present.
>>
>> To avoid having to #ifdef around this code we've fixed the definitions
>> of SPI and I2C functions that were not correctly supplying dummy functions
>> when the real functions are not in the build.
>>
>> Changes since V1:
>> Added I2C and SPI patches to provide dummy functions.
>>
>> Richard Fitzgerald (2):
>> spi: Add empty versions of ACPI functions
>> i2c: Fix conditional for substituting empty ACPI functions
>>
>> Simon Trimmer (1):
>> ALSA: hda/realtek: Add support for new HP G12 laptops
>
> Hm, the 3rd patch requires both patch 1 and 2, and now those seem to
> have been applied to two different trees, which makes hard to apply
> the 3rd one.
>
> Mark, Wolfram, will you guys submit PR for 6.11-rc3 including the
> patch 1 and 2? If so, I can apply the patch 3 later on top of
> 6.11-rc3.
>
> Or, I'd need to pull from both of you and apply the patch 3.
>
>
> thanks,
>
> Takashi
We've just noticed that the SPI patches have gone into for-6.12.
We really hoped that we could get the main patch (G12 support) into
6.11 (yes, I know, I didn't actually say that we were targeting 6.11 -
sorry).
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-06 11:06 ` Richard Fitzgerald
@ 2024-08-06 11:19 ` Takashi Iwai
2024-08-06 11:29 ` Wolfram Sang
0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2024-08-06 11:19 UTC (permalink / raw)
To: Wolfram Sang
Cc: Richard Fitzgerald, Mark Brown, tiwai, mika.westerberg,
linux-sound, linux-spi, linux-i2c, linux-kernel, patches
On Tue, 06 Aug 2024 13:06:25 +0200,
Richard Fitzgerald wrote:
>
> On 5/8/24 09:02, Takashi Iwai wrote:
> > On Fri, 02 Aug 2024 17:22:12 +0200,
> > Richard Fitzgerald wrote:
> >>
> >> Add support for HP G12 laptops that use CS35L54 or CS35L56 amplifiers
> >> with Realtek HDA codecs. Some of these use the same SSID for models with
> >> CS35L54 and models with CS35L56 so the ACPI entries are examined to
> >> determine which amp is present.
> >>
> >> To avoid having to #ifdef around this code we've fixed the definitions
> >> of SPI and I2C functions that were not correctly supplying dummy functions
> >> when the real functions are not in the build.
> >>
> >> Changes since V1:
> >> Added I2C and SPI patches to provide dummy functions.
> >>
> >> Richard Fitzgerald (2):
> >> spi: Add empty versions of ACPI functions
> >> i2c: Fix conditional for substituting empty ACPI functions
> >>
> >> Simon Trimmer (1):
> >> ALSA: hda/realtek: Add support for new HP G12 laptops
> >
> > Hm, the 3rd patch requires both patch 1 and 2, and now those seem to
> > have been applied to two different trees, which makes hard to apply
> > the 3rd one.
> >
> > Mark, Wolfram, will you guys submit PR for 6.11-rc3 including the
> > patch 1 and 2? If so, I can apply the patch 3 later on top of
> > 6.11-rc3.
> >
> > Or, I'd need to pull from both of you and apply the patch 3.
> >
> >
> > thanks,
> >
> > Takashi
>
> We've just noticed that the SPI patches have gone into for-6.12.
> We really hoped that we could get the main patch (G12 support) into
> 6.11 (yes, I know, I didn't actually say that we were targeting 6.11 -
> sorry).
I also planned for 6.12, but fortunately didn't take it yet, so it's
no problem :)
And, I see Mark's PR is based on Linus tree, so that's fine to take.
The remaining question is about the i2c patch.
Wolfram, has the patch been merged for your branch for 6.11? If yes,
can I pull your change, so that I can apply the patch 3 together with
the SPI change?
thanks,
Takashi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-06 11:19 ` Takashi Iwai
@ 2024-08-06 11:29 ` Wolfram Sang
2024-08-06 11:41 ` Takashi Iwai
0 siblings, 1 reply; 16+ messages in thread
From: Wolfram Sang @ 2024-08-06 11:29 UTC (permalink / raw)
To: Takashi Iwai
Cc: Richard Fitzgerald, Mark Brown, tiwai, mika.westerberg,
linux-sound, linux-spi, linux-i2c, linux-kernel, patches
[-- Attachment #1: Type: text/plain, Size: 366 bytes --]
> Wolfram, has the patch been merged for your branch for 6.11? If yes,
> can I pull your change, so that I can apply the patch 3 together with
> the SPI change?
Yes, you can pull i2c/for-current. Maybe I can also retrofit an
immutable branch for you. I'd think, though, that it is easiest to wait
for 6.11-rc3 which will include the I2C part of this series. Or?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-06 11:29 ` Wolfram Sang
@ 2024-08-06 11:41 ` Takashi Iwai
2024-08-12 6:53 ` Wolfram Sang
0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2024-08-06 11:41 UTC (permalink / raw)
To: Wolfram Sang
Cc: Takashi Iwai, Richard Fitzgerald, Mark Brown, tiwai,
mika.westerberg, linux-sound, linux-spi, linux-i2c, linux-kernel,
patches
On Tue, 06 Aug 2024 13:29:09 +0200,
Wolfram Sang wrote:
>
>
> > Wolfram, has the patch been merged for your branch for 6.11? If yes,
> > can I pull your change, so that I can apply the patch 3 together with
> > the SPI change?
>
> Yes, you can pull i2c/for-current. Maybe I can also retrofit an
> immutable branch for you. I'd think, though, that it is easiest to wait
> for 6.11-rc3 which will include the I2C part of this series. Or?
Yeah, it's fine, I can wait for 6.11-rc3.
thanks,
Takashi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-06 11:41 ` Takashi Iwai
@ 2024-08-12 6:53 ` Wolfram Sang
2024-08-12 7:04 ` Takashi Iwai
0 siblings, 1 reply; 16+ messages in thread
From: Wolfram Sang @ 2024-08-12 6:53 UTC (permalink / raw)
To: Takashi Iwai
Cc: Richard Fitzgerald, Mark Brown, tiwai, mika.westerberg,
linux-sound, linux-spi, linux-i2c, linux-kernel, patches
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
> > Yes, you can pull i2c/for-current. Maybe I can also retrofit an
> > immutable branch for you. I'd think, though, that it is easiest to wait
> > for 6.11-rc3 which will include the I2C part of this series. Or?
>
> Yeah, it's fine, I can wait for 6.11-rc3.
Done. Said commit is included in rc3 now. Thanks, guys!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-12 6:53 ` Wolfram Sang
@ 2024-08-12 7:04 ` Takashi Iwai
0 siblings, 0 replies; 16+ messages in thread
From: Takashi Iwai @ 2024-08-12 7:04 UTC (permalink / raw)
To: Wolfram Sang
Cc: Takashi Iwai, Richard Fitzgerald, Mark Brown, tiwai,
mika.westerberg, linux-sound, linux-spi, linux-i2c, linux-kernel,
patches
On Mon, 12 Aug 2024 08:53:20 +0200,
Wolfram Sang wrote:
>
>
> > > Yes, you can pull i2c/for-current. Maybe I can also retrofit an
> > > immutable branch for you. I'd think, though, that it is easiest to wait
> > > for 6.11-rc3 which will include the I2C part of this series. Or?
> >
> > Yeah, it's fine, I can wait for 6.11-rc3.
>
> Done. Said commit is included in rc3 now. Thanks, guys!
Thanks!
Takashi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-05 19:40 ` Mark Brown
@ 2024-08-12 7:19 ` Takashi Iwai
0 siblings, 0 replies; 16+ messages in thread
From: Takashi Iwai @ 2024-08-12 7:19 UTC (permalink / raw)
To: Mark Brown
Cc: Richard Fitzgerald, tiwai, wsa+renesas, mika.westerberg,
linux-sound, linux-spi, linux-i2c, linux-kernel, patches
On Mon, 05 Aug 2024 21:40:05 +0200,
Mark Brown wrote:
>
> On Fri, Aug 02, 2024 at 04:22:12PM +0100, Richard Fitzgerald wrote:
> > Add support for HP G12 laptops that use CS35L54 or CS35L56 amplifiers
> > with Realtek HDA codecs. Some of these use the same SSID for models with
> > CS35L54 and models with CS35L56 so the ACPI entries are examined to
> > determine which amp is present.
>
> The following changes since commit a0c04bd55a467aee3eb647555343ad6971106e86:
>
> Merge tag 'kbuild-fixes-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild (2024-07-28 14:02:48 -0700)
>
> are available in the Git repository at:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-acpi-lookup-dummy
>
> for you to fetch changes up to 90ec3a8a7fd0d43026fcca979713e077d4883b56:
>
> spi: Add empty versions of ACPI functions (2024-08-02 18:51:59 +0100)
>
> ----------------------------------------------------------------
> spi: Add empty versions of ACPI lookup functions
>
> A patch from Richard Fitzgerald adding dummy versions of the ACPI lookup
> functions for SPI:
>
> Provide empty versions of acpi_spi_count_resources(),
> acpi_spi_device_alloc() and acpi_spi_find_controller_by_adev()
> if the real functions are not being built.
>
> This commit fixes two problems with the original definitions:
>
> 1) There wasn't an empty version of these functions
> 2) The #if only depended on CONFIG_ACPI. But the functions are implemented
> in the core spi.c so CONFIG_SPI_MASTER must also be enabled for the real
> functions to exist.
Pulled now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
` (5 preceding siblings ...)
2024-08-05 19:40 ` Mark Brown
@ 2024-08-12 7:20 ` Takashi Iwai
6 siblings, 0 replies; 16+ messages in thread
From: Takashi Iwai @ 2024-08-12 7:20 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: tiwai, broonie, wsa+renesas, mika.westerberg, linux-sound,
linux-spi, linux-i2c, linux-kernel, patches
On Fri, 02 Aug 2024 17:22:12 +0200,
Richard Fitzgerald wrote:
>
> Add support for HP G12 laptops that use CS35L54 or CS35L56 amplifiers
> with Realtek HDA codecs. Some of these use the same SSID for models with
> CS35L54 and models with CS35L56 so the ACPI entries are examined to
> determine which amp is present.
>
> To avoid having to #ifdef around this code we've fixed the definitions
> of SPI and I2C functions that were not correctly supplying dummy functions
> when the real functions are not in the build.
>
> Changes since V1:
> Added I2C and SPI patches to provide dummy functions.
>
> Richard Fitzgerald (2):
> spi: Add empty versions of ACPI functions
> i2c: Fix conditional for substituting empty ACPI functions
>
> Simon Trimmer (1):
> ALSA: hda/realtek: Add support for new HP G12 laptops
Now all changes are merged to sound git tree for-linus branch.
thanks,
Takashi
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-08-12 7:19 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
2024-08-02 15:22 ` [PATCH v2 1/3] spi: Add empty versions of ACPI functions Richard Fitzgerald
2024-08-02 15:22 ` [PATCH v2 2/3] i2c: Fix conditional for substituting empty " Richard Fitzgerald
2024-08-04 14:34 ` Wolfram Sang
2024-08-02 15:22 ` [PATCH v2 3/3] ALSA: hda/realtek: Add support for new HP G12 laptops Richard Fitzgerald
2024-08-02 21:49 ` (subset) [PATCH v2 0/3] ALSA: " Mark Brown
2024-08-05 8:02 ` Takashi Iwai
2024-08-06 11:06 ` Richard Fitzgerald
2024-08-06 11:19 ` Takashi Iwai
2024-08-06 11:29 ` Wolfram Sang
2024-08-06 11:41 ` Takashi Iwai
2024-08-12 6:53 ` Wolfram Sang
2024-08-12 7:04 ` Takashi Iwai
2024-08-05 19:40 ` Mark Brown
2024-08-12 7:19 ` Takashi Iwai
2024-08-12 7:20 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).