* linux-next: manual merge of the sound-asoc tree with the origin tree
@ 2026-11-09 14:09 Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-11-09 14:09 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: Kees Cook, Kees Cook, Linux Kernel Mailing List,
Linux Next Mailing List, Vijendar Mukunda
[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]
Hi all,
Today's linux-next merge of the sound-asoc tree got a conflict in:
sound/soc/amd/acp/acp-sdw-sof-mach.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
7de8faa0fb6ed ("ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver")
from the sound-asoc tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc sound/soc/amd/acp/acp-sdw-sof-mach.c
index 8336eb5c82ea9,1d7487c872657..0000000000000
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@@ -374,16 -406,28 +406,28 @@@ static int mc_probe(struct platform_dev
struct snd_soc_card *card;
struct amd_mc_ctx *amd_ctx;
struct asoc_sdw_mc_private *ctx;
- int amp_num = 0, i;
+ int amp_num = 0, i, dmic_num;
int ret;
- amd_ctx = devm_kzalloc(&pdev->dev, sizeof(*amd_ctx), GFP_KERNEL);
+ amd_ctx = devm_kzalloc_obj(&pdev->dev, *amd_ctx);
if (!amd_ctx)
return -ENOMEM;
amd_ctx->acp_rev = mach->mach_params.subsystem_rev;
- amd_ctx->max_sdw_links = ACP63_SDW_MAX_LINKS;
+ switch (amd_ctx->acp_rev) {
+ case ACP7B_PCI_REV:
+ case ACP7F_PCI_REV:
+ amd_ctx->max_sdw_links = ACP7X_SDW_MAX_LINKS;
+ break;
+ default:
+ amd_ctx->max_sdw_links = ACP63_SDW_MAX_LINKS;
+ break;
+ }
+ if (mach->pdata) {
+ pdm_pdata = mach->pdata;
+ amd_ctx->pdm_sel = pdm_pdata->pdm_sel;
+ }
- ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
+ ctx = devm_kzalloc_obj(&pdev->dev, *ctx);
if (!ctx)
return -ENOMEM;
ctx->codec_info_list_count = asoc_sdw_get_codec_info_list_count();
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* linux-next: manual merge of the sound-asoc tree with the origin tree
@ 2026-11-09 14:10 Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-11-09 14:10 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: Dmitry Torokhov, Kees Cook, Kees Cook, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 6194 bytes --]
Hi all,
Today's linux-next merge of the sound-asoc tree got a conflict in:
sound/soc/codecs/twl4030.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
5c23fe26f1163 ("ASoC: codecs: twl4030: fix external mute GPIO lookup")
from the sound-asoc tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined sound/soc/codecs/twl4030.c
index e207721b99414,9541c8a5a24e8..0000000000000
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@@ -6,6 -6,7 +6,7 @@@
*/
#include <linux/delay.h>
+ #include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/init.h>
@@@ -13,9 -14,9 +14,9 @@@
#include <linux/mfd/twl4030-audio.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
- #include <linux/of.h>
#include <linux/pm.h>
#include <linux/platform_device.h>
+ #include <linux/property.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/initval.h>
@@@ -198,40 -199,53 +199,53 @@@ static void twl4030_codec_enable(struc
udelay(10);
}
- static void
- twl4030_get_board_param_values(struct twl4030_board_params *board_params,
- struct device_node *node)
+ static struct twl4030_board_params *twl4030_get_board_params(struct device *dev)
{
- of_property_read_u32(node, "ti,digimic_delay", &board_params->digimic_delay);
- of_property_read_u32(node, "ti,ramp_delay_value", &board_params->ramp_delay_value);
- of_property_read_u32(node, "ti,offset_cncl_path", &board_params->offset_cncl_path);
- board_params->hs_extmute = of_property_read_bool(node, "ti,hs_extmute");
+ struct twl4030_board_params *params;
+ int error;
- if (of_property_present(node, "ti,hs_extmute_gpio"))
- board_params->hs_extmute = 1;
- }
+ struct fwnode_handle *codec_node __free(fwnode_handle) =
+ device_get_named_child_node(dev->parent, "codec");
+ if (!codec_node)
+ return NULL;
- static struct twl4030_board_params*
- twl4030_get_board_params(struct device *dev)
- {
- struct twl4030_board_params *board_params = NULL;
- struct device_node *twl4030_codec_node = NULL;
+ params = devm_kzalloc(dev, sizeof(*params), GFP_KERNEL);
+ if (!params)
+ return ERR_PTR(-ENOMEM);
- twl4030_codec_node = of_get_child_by_name(dev->parent->of_node,
- "codec");
+ fwnode_property_read_u32(codec_node, "ti,digimic_delay",
+ ¶ms->digimic_delay);
+ fwnode_property_read_u32(codec_node, "ti,ramp_delay_value",
+ ¶ms->ramp_delay_value);
+ fwnode_property_read_u32(codec_node, "ti,offset_cncl_path",
+ ¶ms->offset_cncl_path);
- if (twl4030_codec_node) {
- board_params = devm_kzalloc_obj(dev,
- struct twl4030_board_params);
- if (!board_params) {
- of_node_put(twl4030_codec_node);
- return ERR_PTR(-ENOMEM);
- }
- twl4030_get_board_param_values(board_params, twl4030_codec_node);
- of_node_put(twl4030_codec_node);
+ /*
+ * Headset external mute can be controlled either via TWL4030's
+ * dedicated GPIO6/EXTMUTE pin (enabled by the boolean "ti,hs_extmute"
+ * property) or via a separate GPIO line ("ti,hs_extmute-gpios" or
+ * legacy "ti,hs_extmute_gpio"), which implies external mute is active.
+ */
+ params->hs_extmute = fwnode_property_read_bool(codec_node, "ti,hs_extmute");
+
+ /*
+ * This will attempt to parse "ti,hs_extmute-gpios" or
+ * "ti,hs_extmute_gpio".
+ */
+ params->hs_extmute_gpio = devm_fwnode_gpiod_get_optional(dev, codec_node,
+ "ti,hs_extmute",
+ GPIOD_OUT_LOW,
+ "hs_extmute");
+ error = PTR_ERR_OR_ZERO(params->hs_extmute_gpio);
+ if (error) {
+ dev_err_probe(dev, error, "Failed to get hs_extmute GPIO\n");
+ return ERR_PTR(error);
}
- return board_params;
+ if (params->hs_extmute_gpio)
+ params->hs_extmute = 1;
+
+ return params;
}
static int twl4030_get_hw_params(struct device *dev,
@@@ -243,30 -257,19 +257,19 @@@
if (IS_ERR(board_params))
return PTR_ERR(board_params);
- if (board_params && board_params->hs_extmute) {
- board_params->hs_extmute_gpio = devm_gpiod_get_optional(dev,
- "ti,hs_extmute",
- GPIOD_OUT_LOW);
- if (IS_ERR(board_params->hs_extmute_gpio))
- return dev_err_probe(dev,
- PTR_ERR(board_params->hs_extmute_gpio),
- "Failed to get hs_extmute GPIO\n");
+ if (board_params && board_params->hs_extmute &&
+ !board_params->hs_extmute_gpio) {
+ u8 pin_mux;
- if (board_params->hs_extmute_gpio) {
- gpiod_set_consumer_name(board_params->hs_extmute_gpio, "hs_extmute");
- } else {
- u8 pin_mux;
+ dev_info(dev, "use TWL4030 GPIO6\n");
- dev_info(dev, "use TWL4030 GPIO6\n");
-
- /* Set TWL4030 GPIO6 as EXTMUTE signal */
- twl_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux,
- TWL4030_PMBR1_REG);
- pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x03);
- pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x02);
- twl_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux,
- TWL4030_PMBR1_REG);
- }
+ /* Set TWL4030 GPIO6 as EXTMUTE signal */
+ twl_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux,
+ TWL4030_PMBR1_REG);
+ pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x03);
+ pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x02);
+ twl_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux,
+ TWL4030_PMBR1_REG);
}
twl4030->board_params = board_params;
@@@ -2191,7 -2194,7 +2194,7 @@@ static int twl4030_codec_probe(struct p
struct twl4030_priv *twl4030;
int ret;
- twl4030 = devm_kzalloc(&pdev->dev, sizeof(*twl4030), GFP_KERNEL);
+ twl4030 = devm_kzalloc_obj(&pdev->dev, *twl4030);
if (!twl4030)
return -ENOMEM;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-09 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 14:09 linux-next: manual merge of the sound-asoc tree with the origin tree Mark Brown
2026-11-09 14:10 Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®