From patchwork Thu Jun 27 03:51:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13713783 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2051.outbound.protection.outlook.com [40.107.114.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E15917C68; Thu, 27 Jun 2024 03:51:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719460320; cv=fail; b=G7TJ4iAd//R43eXdbCayTSGk8PkFtCSzaAedyU3/hwbMQ9XWrzMYavuD4RA0gRAIjAOZj/+akygRZtbnOkwdriWeZEG6/by+kmZrQHk5MGuUwG5Wg+VIHfNEDYFBWAumb2CDfJLQsjT77T5a3Zc4CWKNx/Mzmv2ioef8OHriM30= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719460320; c=relaxed/simple; bh=SLS1CWCqSr1KT0jarvABGJUcajTXzs1N06amFRN6lms=; h=Message-ID:To:In-Reply-To:References:From:Subject:Content-Type: Date:MIME-Version; b=g9gJKj9U8B5QO4ImM/vyL9x6IekK7osstL866ODRhvKqfLhTNy9i+Z+kmNVleCWCdveGQG/8zB6ld8F3Bg/mVs8vEauXF1RIA9N0dO79V4sDkPYqvHKAcmUtoYSZnLh0VyQMVWUrFTbgP30uNTiIigUb5PyLoLJrVyeQoIBm2AA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=QR2Ke1PF; arc=fail smtp.client-ip=40.107.114.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="QR2Ke1PF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QFuQBI1E0b6iEVFdEgbdmuYTK7MeqV5e95EdbZcgsKocTp+GVs3Odm2FIVIfa8jkCkbvLmv9/cTWXt7ZRK1x3dCr3X23R6YQ7y3CGCfbw+44PStAuwnFzSNoHV8bX3BdVSXKPOCXDQjmcYuLDt/YOQZ+i9T4EPfZ8C3SjyyTWUUr1drB7ATGfSp2ZvyaIg1zTVX40WHTyDWfObrwldY4ZWRW8UjHhBMmZ2U8ONefQekoGG+hRTdqzyE4grBxx2Sl9dTXgC5Ei3d/Qa0ncqKxMavHZRbPakUXAurkb1R/2Tc8sHu4F+/74FKbajxuZmIeWdFc4N+f11KuOV6jGUtCTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M+ON5YZwxAql9zKiPem8aDn6uZ0654n6tV/b5ssNI6g=; b=lOJx6LFaxaVyjzxzHw8bydJBOr81yjZJhnzgBYyIN85H4gFjtU/f4I/nFGvU54Lgl4aVnARns+pgZTNYYYl4dc1CUxZzE6V7yxzHcRHju1L/Rfv15Hqdsk5r69R3AEzNkaB7Q/MJhYNE658tRH3JLc2YWk+lAJkyj+SE1lkbRhw2ENC1yerdBOF0CAPfYRa3A/aZ7WBXJTMyRK9jtL6mmPATIhAEa5+a8o0UKQPqRevNm4dDlXNYv0dUMJceZYjGLbhf6g5HXFw/dEvwnEreCaytTK8A5LvXcKkaStnwjo/SySZQp2otXKm5o6KGZ5mKGoIlgSE4gZ2drqxTtGIYkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M+ON5YZwxAql9zKiPem8aDn6uZ0654n6tV/b5ssNI6g=; b=QR2Ke1PFTvxXt1pE3Opy67NwZJP3qMMZQO6afWPjnObotjC51pMF5jHHc/8SuNJA9f7V6RB56F4+qdodcAt7kkgtCPDTdiwqolOYKjv1orvo0wszv/QoIOtKBcIuzT1Ge0Q9PyrLKovGXWkSPBgjka3+nJyFAcY5XgGhfCY+PZk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OS3PR01MB5782.jpnprd01.prod.outlook.com (2603:1096:604:c7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.35; Thu, 27 Jun 2024 03:51:54 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7698.025; Thu, 27 Jun 2024 03:51:54 +0000 Message-ID: <87a5j7qbzd.wl-kuninori.morimoto.gx@renesas.com> To: Alexandre Belloni , Conor Dooley , Jaroslav Kysela , Krzysztof Kozlowski , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Rob Herring , Takashi Iwai , devicetree@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87bk3nqc0e.wl-kuninori.morimoto.gx@renesas.com> References: <87bk3nqc0e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/2] ASoC: simple-audio-mux: enable to select MUX names Date: Thu, 27 Jun 2024 03:51:52 +0000 X-ClientProxiedBy: TYCP286CA0347.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:7c::7) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB5782:EE_ X-MS-Office365-Filtering-Correlation-Id: f46c7ed7-47b7-4311-3bff-08dc965c7adb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|7416014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: 3KOX1HB7YnGu5OPz7I4jCR6vEnPYAsNTcPTu+ACw6oZY4nmVXYaaJXd8IBmrFywgpuylMRzv9o1/3PddOeOwkn8pez0/KxsdaGseBaMqJMMp/j21ztmh9Opb4cW3X9SEh77o0ILSZ7WuCQvHnzClDpVwfi/8s99hN0pKPqGwovlKDzgElN1uBmZWZCcadYiCNbMROAk8DV9DzuBHX9iGhBi8z9Oc8crBFlwX2dDiHf4n3tixDwyUGScbAPbVEXgseN9qMk/HTpjCaQ196kaXeC7D8v7ncuKC33Yhc1riSZFSIl1tIwk+kkjR3+I8fka5FeJrIOBkfcsxq2swnU0uB3DeXcHS6BS3fHjEhEsi3SubvzjeiN7vjFWaK1MOD22a2kTtZV0YJu16bEsK8z0TcTG49ja8ZGYdkHbE+gNWUnn1LDV/+k6sTCK3BGJrS22yQVQ7aEgFtDfaQ9qyuBaUMM7tS3fJSz3GkXdIg6Tm1G6NqVfFsF3U0SDtw2lYDBd+F66RmVc3tCEHyz/7okVTIkpKHR+6B6gfI0sHArHLLPUnzNTor6lbaf2WUF0sb8FEfAoN7kAc+bdKLJBDYq4eX96Mjy8SADUYTARSJsro/Z3KH2Q8Y++JC4NVtdC7sjxIRH/jbNhRFFJ2IzLo3CkvWlNYzVLMzPU0qc2VdqWUFxCGT822eaaMp6tODZgT+eQXBp84+/dcHAbKlllIbjH2SZwyQo7O9I5SGD+FFK5dPALwrDC10CpxR0Jwl24s2XCT/0KtmEe7fjE+OWietPVxY9QZibhUUiH32PxlqVQ0IlBG0GXuEvqyw15OtwtNSNGX6heNy5cZwtuFwlwBNPSajzfCh8mkNNHFCqoOyPgV+IRkWE4zPA1LVDwMmKSh1V6vGs3p9HNi9jwo0kHlYbJcBs5DGmVxOpNjBUX8L7igX7ICEULW3QghrHywztZAM8dAK4WrgGv7ijS4pykGHbQU/sMPaYlFUaNkh7cU3q+sGHeHLJLQZ4vLIoaQ0Tt+ni5D9TRPcHAXqeI4MaIZocAVkCEOdyw4OxF8kYMaEoByk+PwFm6sRX1DY6VpLbJ+yXSYHUuduURQ7MAdA42B9mo9Pcm/ngJmfpzSoYbxu40/keEOlUkORzI0ZoXWz5gHiadNptwDkKBziExMo1lzi5E3yBIMOsnmYmdazKAwUnKgWmQE7AGWZRVe2AbgDhw6MzMDs4roJWdOwwUu1huGSgiljNQv/SN8dKNEMphneDuKZCs2xty/yslpeDgrCCeApEUUbTpZNqzjqhmTkEQrAqVj0JPsEQr4yfX+V6/YAXWr8V53dBHNbZCo1ckEW0XsRGeihJwYriPuJ87Gj7FOrueTtvuwVnSIH37PCdPcwPSJXEiZwmpkgf9xAENnQiDIym/DE9yeWFJ/41omqGi8JNuK65K6gqkcTQ8lvfj1nlt4+F4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(7416014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS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zk8rgnU7pyiKgbZojXOaBtfKCwYv3Lkm6SiDxZePH4AJPWzg7PRvNImSlcU/faYRcu3+J+mzZQiDL9OCuoRAP8qQ6btXc0GqBlQQkT//SiPSg2PTHeeUY+Qx4MSqo5tHdfDu9T63aPqH3RBg7uM/2McQlniguV8dv4ftscLAW4cY4LS8iuZuKeaKmV2iM/xTVnvt3QAkeVmR0Kkd9q+klKHkxartQmyyGVIaWc/MlcRhMdk42/X8BcY7dLHJ3Rm/+uoCQbi9SGfJS24RvM7AkFcZ1qLcK6vwI5lkSH4wTewouCoILTra/hmO77I9GAlu46aMpcDENX0Y/Mcyo7W0iEn7y4IXVm3XC3QBv5a1Kr6Sj1AUeziG0+Tvt1WI3XXt+diPys9zU30xQiItm80gfkcVCBs5HRmmXcvobEFB9FZJ6Zp6+hVoUUesHf1ot2cPPsf6ZrXgtOK9dMnmg17+0YHfdwW1t5N4/sklnMZjimUW6pRgndYkQgglfhbKGuZpoSN86uHr+a8+CyxahRqRLsvne8O52b4esAJb3tX20VqyFFQ9iP8GaYLKMSWcHjvwCRCBPOVjgCq5DvdQwOzHSgKVf+ZmrGwS9ztJunV1MI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: f46c7ed7-47b7-4311-3bff-08dc965c7adb X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 03:51:53.7502 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Psax+BhExUAJTa4TpmhVcJsl+s6kIbU3CpMjY5z5tWRAm/KhYt25kzJPQEVjvGhN6mMtweFelSl44+29AU1zcAHWzFCwWFA7Wh2dmEC0n2SN2CepviQ6sV1PidLY+slX X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB5782 Current simple-audio-mux selects MUX by "Input 1" or "Input 2", it is not user friendly. Adds new "mux-names" property and enable to select MUX by own names. Original > amixer set "MUX" "Input 1" Use mux-names sound_mux: mux { compatible = "simple-audio-mux"; mux-gpios = <...>; mux-names = "Device_A", "Device_B"; }; > amixer set "MUX" "Device_A" Signed-off-by: Kuninori Morimoto --- sound/soc/codecs/simple-mux.c | 55 +++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/sound/soc/codecs/simple-mux.c b/sound/soc/codecs/simple-mux.c index bf67de12d20b..41f982078043 100644 --- a/sound/soc/codecs/simple-mux.c +++ b/sound/soc/codecs/simple-mux.c @@ -9,12 +9,21 @@ #include #include +#define MUX_TEXT_SIZE 2 +#define MUX_WIDGET_SIZE 4 +#define MUX_ROUTE_SIZE 3 struct simple_mux { struct gpio_desc *gpiod_mux; unsigned int mux; + const char *mux_texts[MUX_TEXT_SIZE]; + struct soc_enum mux_enum; + struct snd_kcontrol_new mux_mux; + struct snd_soc_dapm_widget mux_widgets[MUX_WIDGET_SIZE]; + struct snd_soc_dapm_route mux_routes[MUX_ROUTE_SIZE]; + struct snd_soc_component_driver mux_driver; }; -static const char * const simple_mux_texts[] = { +static const char * const simple_mux_texts[MUX_TEXT_SIZE] = { "Input 1", "Input 2" }; @@ -66,30 +75,23 @@ static unsigned int simple_mux_read(struct snd_soc_component *component, static const struct snd_kcontrol_new simple_mux_mux = SOC_DAPM_ENUM_EXT("Muxer", simple_mux_enum, simple_mux_control_get, simple_mux_control_put); -static const struct snd_soc_dapm_widget simple_mux_dapm_widgets[] = { +static const struct snd_soc_dapm_widget simple_mux_dapm_widgets[MUX_WIDGET_SIZE] = { SND_SOC_DAPM_INPUT("IN1"), SND_SOC_DAPM_INPUT("IN2"), - SND_SOC_DAPM_MUX("MUX", SND_SOC_NOPM, 0, 0, &simple_mux_mux), + SND_SOC_DAPM_MUX("MUX", SND_SOC_NOPM, 0, 0, &simple_mux_mux), // see simple_mux_probe() SND_SOC_DAPM_OUTPUT("OUT"), }; -static const struct snd_soc_dapm_route simple_mux_dapm_routes[] = { +static const struct snd_soc_dapm_route simple_mux_dapm_routes[MUX_ROUTE_SIZE] = { { "OUT", NULL, "MUX" }, - { "MUX", "Input 1", "IN1" }, - { "MUX", "Input 2", "IN2" }, -}; - -static const struct snd_soc_component_driver simple_mux_component_driver = { - .dapm_widgets = simple_mux_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(simple_mux_dapm_widgets), - .dapm_routes = simple_mux_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(simple_mux_dapm_routes), - .read = simple_mux_read, + { "MUX", "Input 1", "IN1" }, // see simple_mux_probe() + { "MUX", "Input 2", "IN2" }, // see simple_mux_probe() }; static int simple_mux_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; struct simple_mux *priv; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -103,7 +105,30 @@ static int simple_mux_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(priv->gpiod_mux), "Failed to get 'mux' gpio"); - return devm_snd_soc_register_component(dev, &simple_mux_component_driver, NULL, 0); + /* Copy default settings */ + memcpy(&priv->mux_texts, &simple_mux_texts, sizeof(priv->mux_texts)); + memcpy(&priv->mux_enum, &simple_mux_enum, sizeof(priv->mux_enum)); + memcpy(&priv->mux_mux, &simple_mux_mux, sizeof(priv->mux_mux)); + memcpy(&priv->mux_widgets, &simple_mux_dapm_widgets, sizeof(priv->mux_widgets)); + memcpy(&priv->mux_routes, &simple_mux_dapm_routes, sizeof(priv->mux_routes)); + + priv->mux_driver.dapm_widgets = priv->mux_widgets; + priv->mux_driver.num_dapm_widgets = MUX_WIDGET_SIZE; + priv->mux_driver.dapm_routes = priv->mux_routes; + priv->mux_driver.num_dapm_routes = MUX_ROUTE_SIZE; + priv->mux_driver.read = simple_mux_read; + + /* Overwrite text ("Input 1", "Input 2") if property exists */ + of_property_read_string_array(np, "mux-names", priv->mux_texts, MUX_TEXT_SIZE); + + /* switch to use priv data instead of default */ + priv->mux_enum.texts = priv->mux_texts; + priv->mux_mux.private_value = (unsigned long)&priv->mux_enum; + priv->mux_widgets[2].kcontrol_news = &priv->mux_mux; + priv->mux_routes[1].control = priv->mux_texts[0]; // "Input 1" + priv->mux_routes[2].control = priv->mux_texts[1]; // "Input 2" + + return devm_snd_soc_register_component(dev, &priv->mux_driver, NULL, 0); } #ifdef CONFIG_OF From patchwork Thu Jun 27 03:52:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13713784 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2088.outbound.protection.outlook.com [40.107.114.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFEDC1C2AD; Thu, 27 Jun 2024 03:52:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719460335; cv=fail; b=d8QAxYykq6ntsSA4pj/HYlMmE5tXp0b+i/qjUZqgSIo7xjI98HhWY05tCNU+ohLBETXha4dAm0wzG5O/dHrgg7htRiXcWcYxmpmtKwXWVxYO98BH4V7ze/BgOa7l8eIouyQv46oZgvrZScGpq9gXo2JzIeYsbOyR3CNzchpdmkg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719460335; c=relaxed/simple; bh=CfimTb1EHnsb4+4k4dgpom5ojoyLgAXCG4OoAJTqsy4=; h=Message-ID:To:In-Reply-To:References:From:Subject:Content-Type: Date:MIME-Version; b=AUJqn7kIyEbTZdPNqdkCy1QAOOHhm0eYg8Hu301JE4KIlraHnYU88tKNwPIFr4XMCRl2gkNGkvftFgbmbrb9kXsZFfDClYOFUOqhhMHB3a1ZUmzyyrS/aGDWQ1wsjUA3IsbAjmG2Cy+TChITNl9AWWfeaSFUrQB3846qy6Vh56A= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=gfqjZ95m; arc=fail smtp.client-ip=40.107.114.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="gfqjZ95m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sc9VZj+C2JzeRO6LADaj+rjoLkLJEPIG551b92WG2aUmNCDnLIhaLF/UalaCgNIsAtH9nzLnZ9Hm/PN4zHtSoZlYV7YXZ6ndFM07Z2BuZtv565/p6gDlthrTgH9MX5p9KzxI7OtwO5WzGBSZdrHqyMurgK3+j1h1g7xahNO9HJj8YA0hgztvQfzrkELUBPcAIzxrnKVq2g+elNBk4q2Zzucd5+ztoVXsUkVxZCVhPD0wZtRbRtTG1Rz+tAtrpTogIo41Rj1dHXRZw38Cq2uNJHXSQywl82n7WArpNAhVALgCEf+iF2wwcOPH+Qu1bp0dB0Z//3jyhNTFVLebTQPYQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rM2DfJuMHrl1e7FP+nknzfcN6G4dSbxhgsU9WOrnPic=; b=e5F7N37nKi8EpiHbhFsT8YIm3ScAla3y7j7XYtT2BmSetAFh9cXqX/BFQK41/WExR4OWpI+YnRoFMTiZ+K0Sivn6VTW9UCVoAIaEKK6ho1fTvy9aOjvKEz7wx5sLo6pC/od/MGWbyKhyiSDeJn+qObfsUe416eV9l2ylAReVRIEv5xVW3QfZkWOrkx10gHuB3fQEhYFh2pf/Om9Xz9QRhF65sxCH3rZFxJF2HWaRhMLRpamU0G3Ocfjz9xsdHfq6BMt089jzbAeNUNXbeFhrCtrLl71rARxc8gLAb32k0lVvGIlwn50cJp7B7bm6eCMsih8syKB5BhXbamkpaHZEmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rM2DfJuMHrl1e7FP+nknzfcN6G4dSbxhgsU9WOrnPic=; b=gfqjZ95mH4zNzlzaOLxFa3gi6hBxC1t/lCX6SPvXQuG6IOQlJqX2mhQE4wgIlLDUTLhupCe3MIiEJBA7uSDx5ufrRsfSkrp+DOjS0WqEVT8QhAol0oJy2JF8iwzfrngitYbRBdLnTVhf5xVhduWG+4DU+Yo0K7SDlde7OrlHGQI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OS3PR01MB5782.jpnprd01.prod.outlook.com (2603:1096:604:c7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.35; Thu, 27 Jun 2024 03:52:10 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7698.025; Thu, 27 Jun 2024 03:52:10 +0000 Message-ID: <878qyrqbyt.wl-kuninori.morimoto.gx@renesas.com> To: Alexandre Belloni , Conor Dooley , Jaroslav Kysela , Krzysztof Kozlowski , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Rob Herring , Takashi Iwai , devicetree@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87bk3nqc0e.wl-kuninori.morimoto.gx@renesas.com> References: <87bk3nqc0e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/2] ASoC: dt-bindings: simple-audio-mux: add mux-names property Date: Thu, 27 Jun 2024 03:52:10 +0000 X-ClientProxiedBy: TYWPR01CA0041.jpnprd01.prod.outlook.com (2603:1096:400:17f::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB5782:EE_ X-MS-Office365-Filtering-Correlation-Id: 3572b850-2650-4948-9d81-08dc965c85c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|7416014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: raSBGYcmnhuSNjD4u+NfMLxGD5JW1HbqmpE+jkxNDAMOlZBvMcLhoeczP17+eT5T9M5NmTwccnA5AFY7xHlAiDP7HKeCN1OK9/iKXBBeeB4xUfpZFW7HySwjB1SNggtK1IquNW+k6pcMSQr1TAG/VYTqmBjl07ukqlqVBNUro0swB6LyYzRWVxU6y40ecVfPkqfcse423+jLbpqAx0sLbLMc5RJLOZmoAr1hcafhOa1xtxLoex6vPO6eVXd6oy/9/NO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Ax/BkjKDlUKoouqthrPec83pm1xA6fkbicdB4hdtP2xOm6dzt8K92lR89y78o5hLTe+NkbDlzZZCQlmpH8KSBj64Fv7HaKxRJ/vFm9gJpwgabhxB/2AA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(7416014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hXTDB0dgmVJfb/PTrbk1CrXZ4NvI0KaKsRgC8gePllHUKFHRiiF5hox6xu58b/Sxzi+lp83oRnStrSUsIo9omJrRa8u8omrOdSqlPBhO/Kn0cklWasAHoAH5Iz1EHvKHjoyFGeBt8S+Zov+D1oqz+bLfUp4ocLm4pobfSrWD17C9sWtZmU8diTI9Zral2e+LAZc1r2rB2tFW2OSr88snnrgGFQMf/7XuWkrmAaH7/GsJOeHkxZmfxQtZKCogrvlhCRu4kSMX0kRd9jCoE28tEsD3PEFCXBo+PnXYLP9YAjSogOV23CfZTeafPsngLTp66hi52sf7Ueqf+qiycvCN/Z+Ky+q8moGZEYnQLEVRm5nzgMU8LXO8FU35yeoudcI3T94qj7e+0lKjkfU0UhHHuQHKowNJUjw6S7goYbcIJPqzAKb+sdQU/UglUl7z3UCi/oNY5RS5lrAvNXKAODboFfjE4u2lUBcMKivR2ul2Y6xnKrBuY+2PTMQf920JDrGZ8ITGEbSoysGtn/vOwrbvxvJTQZDpcqoiV44CvM8oyHEYKEPYX2GQp5/j5xqAcVi6CEti7zHVGQ7g3Orw+UjIItE5/n4N//ZLGl5X8hb9er7I54w1UBZtT72rquhD2GBhhTkXVmYSAFJ/pDmxwAgf/qT5F2O4kCMSxMm+kjx2UqE6kLdipqfw6+IgaUantUPYdOlsUUxpBqoB52OTtf45AA4ZtdX2Bxww0i1q9It1+vCST2praATRUmkf4M7cgwE95SLPEaKMaL1O78txbdt7skZ9UvRZ1oaKPIxRzS8FkFiEaUQSRnRIo6Gynx5we8CYLI705q0uV4A+yx7CfM81+z9GZ+A25CLq3s2YdwbzmDVwWZiWYymeQ+yq0bKr4vAf5Nc7M+mmm+8xfOCM7qtA+IUFmR34a3kEXDhylrquuKDdgJ4MEM9Xz9Y0mwDhveHS8c38hmiEPXnl2rAcvwbQ0dneqRDIftjHzD6y86rbpV3/03UrzPwAmsdfHKNVpNi2zS0+kl27N9HY/zZFsSoulFYRGdPj78sEuju4h+q/hit+2RiMUR/ytyF9hrLoWg3IaIPcIOmWjrb8o+QJY6OwG9qEGc/Bum45Cp+X+kV3por4SS2v0rKE/ZSagBfVNemrHZfHiAFt0vb4nJhNq1h4p2CatPNWL12Lg0BUodmf7R+Zb7JeYW3i5FV7T1IwhHqKdor8UJVjsuHM25FRexIWQvElyak6jjop6NIqLHxAtJNYgDesyAsjiJdJokFjdrlWN+e5GiWIWtkGwVfa534KHy/10j6KnXATaAPgcVD4gx2wq1+WxY+UpUrCceqbGk6XDqDERHx+oXTQxjVuMVI3c2eA3PY6d4MzOqsI+9L+7XUw4GL0DU6qBhSN/8CUjA/tCCw1XFPiyryFsCM+yqFl9ATh5P5KnZHuIc5NxJPTFnWDwBnispt0EOre4v1Tv8p2gJkS1LS3HVMWEJNHJVvZgIx1sOSfmt+dDxLgMRj6fXjjkqTduUyMfoCaYQ0TE7GoXFcZRB6GSOKDXf6fSkAqtGm2+rjVKYyvleiD+vDMG72xfKVy0zTjDRKeTNUc9FxN8mIhO47XCmN8CQBdhxTJ2/JFofupP9/fr07BKyJ1c+c= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3572b850-2650-4948-9d81-08dc965c85c4 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 03:52:10.6130 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KxjhsNMBe3GUfGHy4B+kZlGr9yx0spIFN1wV8IWOOkRC7oQo3YoWWgzm4EYXh5T/6f9Noz7i6SUYERWN67MqDI2+woaGsBNsmB42ClKMPAWcwmVS0OMh6K8St0CYQzeq X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB5782 Current simple-audio-mux selects MUX by "Input 1" or "Input 2", it is not user friendly. Adds new "mux-names" property and enable to select MUX by own names. Signed-off-by: Kuninori Morimoto --- Documentation/devicetree/bindings/sound/simple-audio-mux.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml index 9f319caf3db7..6e4018936887 100644 --- a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml +++ b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml @@ -24,6 +24,10 @@ properties: description: | GPIOs used to select the input line. + mux-names: + description: | + Name of multiplexers. default is "Input 1", "Input 2" + sound-name-prefix: true required: