From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CC5BC0219E for ; Mon, 10 Feb 2025 15:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ObXXfoJwEZxAv50qWTc/zQnx88aZKByAVESS99av8o0=; b=aLqTxrSgTCd5uS tL+rsuQZbj5wAMIuJZMDhFzKTOOcEY62Hlq4I4JlrW3Zy56QNkylZzBVSX6Vd1J0F8D9DIX9EpBUq MFNdsz7a+IOFTOqs69vLnANj4Vs7nI2mE2yq+8cnS/HiGTnpsyXvJtr9NW37n9qypSEBvaIjV0LEq O/TcE9EW6caOAQ9VTmcS/Y/xb7gnIDlvEv37gicohLTvUgNZDQViKAL7Y5a5t16FPDd+6g3GP+3+A Lcjg/ljOtF0x2j1PdKaMmJ+ZbkGYRYdb/exygQuNBllt9GAR9RvkgrN2HlLnGj4jWEwekRmSjnneC G78GKgkedOZEU9Y+2mjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1thVJ9-00000000EHc-3psh; Mon, 10 Feb 2025 15:02:47 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1thVI9-00000000Dyk-1dKt for linux-amlogic@lists.infradead.org; Mon, 10 Feb 2025 15:01:46 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-ab7a342ef4eso428536166b.0 for ; Mon, 10 Feb 2025 07:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1739199704; x=1739804504; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GWn8LoEHwMNZQ9TBj9gyzvn+gEM+LQNUFBCn0O8RbT0=; b=TuCPoZmrZdSKH0Mo8FeR7yyTACZDaYS/lo0OHNyAM1aA3fO76sKIC+yTMVrBrHeGx8 ySBWCZXspPjb5x3ShM74Ylq3xLu4HYXePHURI2Rhu+9Qf8Rz5GE8DySRnH6mgvTdglPa 2PXW4/cjt4D/lF60nh8ROPW1D+X1FbmHVyl5pfyJSjvjbB1dU16/5YSi05b49umYvSot 4bpbHumlUtJ+B41V+xy58EjdA4S5oKUPOr8eswxbYKpYPWsBCbCOh+ys51dEDamVu2x5 HMBFjIlpdi/BV/Pbm9jjPoAaCaNneeJ18YEiKEfMBiksjb6qopLs6DGaTmsIJCNTmvpS dKYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739199704; x=1739804504; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GWn8LoEHwMNZQ9TBj9gyzvn+gEM+LQNUFBCn0O8RbT0=; b=QwZV/BjOYXMxgF7eyHEP6tjDf52JTAjuMS59NbALsHc6RZ7BtP5T4y25pk6ytrK4dU KJu112yyF8IiXzJANV6kcaJBbpvP9w+6XRxGnH2Pr0OxNBUbBkb+V9mpV3BkGQD0ljA7 vJebxShZaq8EurMxryCvI1oBYZdgnf+sL0PA8RcGrCYVDDjxzkecCx9nOU3+ozKT66or zqPEOTJJe4Ms2KeY8k0xEFk1UoCaNaO0feMcMskjUAtU5JT7UuXb/sg35ZFLXk3fzr5w guXSfIbCIra/gtjziFyirGJKLKzFFDPzn0yCaKJXBMtfa9A2wzlM3bPB9oK/1d2TGNn4 Y4NQ== X-Forwarded-Encrypted: i=1; AJvYcCV2nFBKDVcpqnPPPNL5jW+Cgt3XbMTDl13P9GDF7CIt+JiFPMdwMdupnD4NSMI+T/D7K9Wy8dGS5Pq9qB78@lists.infradead.org X-Gm-Message-State: AOJu0Yxz/2Jn3T6D7qQ3X3OjuHVUhLbdgkKh9acx1j/lhT4/hw2/GjFy tOCPCq5T3rVymWL5qMl5RIezA/dZQ/90LMnadn1yGHVFlhZ3rBZZpfCKGevUXKgVT4ItCOAI7Ph tt1fIFw== X-Gm-Gg: ASbGncs/C/LT0aeVqAafjDqB579/8c2T8kyEKJ5CwYbJa8TUcP22Ng7Vp6J+Ez0NGaD wzjkEsUKt8tN6kazIc0vUVEGytjlWv3oCLpBquBaCGVyJgcFw8oAaSK0GoHVp/+OGGibfsN5hL3 ZzKbf2U8Ofr1boqQEJG7oxFXqVGyAvBsFCTyRId4/68rI7QcNs5cPE0o5OBkHGsYjS84H68h83b AZ62JTz/PalhuW2Cy+7xRp5qEYe8mI5dJdjDDQJIpIAHXtWNXvjuvqhrc/Z5c9xwQxT8I0AFUtf glDLMcF4XZNvquaiqr05Zw9zgSvw X-Google-Smtp-Source: AGHT+IEIeHQTJ8/QtRwBWcSl9TO92kHxG7avnOm8/eWBRmULID8JOaosNQ6nHBBvafmVZG0xlTQNtg== X-Received: by 2002:a17:907:6eac:b0:aa6:5910:49af with SMTP id a640c23a62f3a-ab789b1f93cmr1478824566b.24.1739199698834; Mon, 10 Feb 2025 07:01:38 -0800 (PST) Received: from localhost.localdomain ([151.41.218.186]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab7bec717f7sm250400466b.81.2025.02.10.07.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2025 07:01:38 -0800 (PST) From: Valerio Setti To: jbrunet@baylibre.com, neil.armstrong@linaro.org, khilman@baylibre.com, martin.blumenstingl@googlemail.com, linux-amlogic@lists.infradead.org, linux-sound@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Valerio Setti Subject: [PATCH RFC 4/6] ASoC: meson: add support for AUDIN in gx-card Date: Mon, 10 Feb 2025 16:01:27 +0100 Message-Id: <20250210150129.40248-5-vsetti@baylibre.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250210150129.40248-1-vsetti@baylibre.com> References: <20250210150129.40248-1-vsetti@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250210_070145_433932_7C4F5866 X-CRM114-Status: GOOD ( 13.04 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Extend the gx-card module in order to support the audio input capabilities provided by AUDIN driver. Signed-off-by: Valerio Setti --- sound/soc/meson/gx-card.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c index b408cc2bbc91..c59bb18b0951 100644 --- a/sound/soc/meson/gx-card.c +++ b/sound/soc/meson/gx-card.c @@ -67,7 +67,8 @@ static int gx_card_parse_i2s(struct snd_soc_card *card, static int gx_card_cpu_identify(struct snd_soc_dai_link_component *c, char *match) { - if (of_device_is_compatible(c->of_node, DT_PREFIX "aiu")) { + if ((of_device_is_compatible(c->of_node, DT_PREFIX "aiu")) || + (of_device_is_compatible(c->of_node, DT_PREFIX "audin"))) { if (strstr(c->dai_name, match)) return 1; } @@ -96,6 +97,8 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np, if (gx_card_cpu_identify(dai_link->cpus, "FIFO")) return meson_card_set_fe_link(card, dai_link, np, true); + else if (gx_card_cpu_identify(dai_link->cpus, "TODDR")) + return meson_card_set_fe_link(card, dai_link, np, false); ret = meson_card_set_be_link(card, dai_link, np); if (ret) @@ -107,8 +110,11 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np, dai_link->num_c2c_params = 1; } else { dai_link->no_pcm = 1; - /* Check if the cpu is the i2s encoder and parse i2s data */ - if (gx_card_cpu_identify(dai_link->cpus, "I2S Encoder")) + /* Check if the cpu is the i2s encoder|decoder and parse + * i2s data + */ + if (gx_card_cpu_identify(dai_link->cpus, "I2S Encoder") || + gx_card_cpu_identify(dai_link->cpus, "I2S Decoder")) ret = gx_card_parse_i2s(card, np, index); } -- 2.39.5 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CA6C247DF0 for ; Mon, 10 Feb 2025 15:01:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739199714; cv=none; b=KKmX8mPKE6020Sd6+56y1k7GW00VPovhQ/2ICd9O6yXZf1EvDN15kSe4L4SEAflquGy6x2771gN+0q7k79grd+ype4DzMM61FgNBKa5e1alTxEuw3ISknJEVbLwYw0VNsIAdH5i0Id+l8u7oNKrDK4fpbHXSe0OUosz1zIwBRLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739199714; c=relaxed/simple; bh=fRXm9P99TfVqw7/aWzdwF95S/kIUYPn5PkUQougaaW8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MtAsgPjUbpjMpjLkj0xIF/8UMTU4BXM7ISKd4wU0Cw2IiXYPHLx3GeYVlB8STPhJMLl9QeJ8LpzO16WMsYgyxbt5KSKPqqJybvUeF8ZwVwMyC95g8DHEM0YSb2xFKgSJ1E2/kFuTGl7R4MbzVkU4Rjw3CqMQ1cA45nJFNzDBVjk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=KpWp80lN; arc=none smtp.client-ip=209.85.208.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="KpWp80lN" Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-307d9a13782so39273651fa.2 for ; Mon, 10 Feb 2025 07:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1739199710; x=1739804510; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GWn8LoEHwMNZQ9TBj9gyzvn+gEM+LQNUFBCn0O8RbT0=; b=KpWp80lNEQDJq2ZktxgUIIQTTD3mHBjp+ovLSrUZduI6eHbXuqJy2pqfCBKl0JhR4i YrPtYhgIP26GHxD/kemZ6Z0xn8vz8Z6Z8AiNQ5EzS5EHJJgdEIdxl07U/Zndg8/uLHNA Qm1HCxmgXg7k6CiGOpPZe2xTQHzdiajQ9LOM7gGLlmbLRoVaOL4NgJzGIQVJmlrPkyLL iezdsoWBoyVFrOV8MOOOs1rQ5HzfVgV7jLlYBGFceLb1eBTseJfSjhc5nsmuFY42/jlH AQhqw4YiJuMyMP4Pw7VumCnshrU3kQbEK/utIdH9/3AWuyljYVsxLvwB8BxIJNsy/eDp uA/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739199710; x=1739804510; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GWn8LoEHwMNZQ9TBj9gyzvn+gEM+LQNUFBCn0O8RbT0=; b=wdH78HGh3NhksS6Q8PpE3MchtCNqxvrnVjMWUrd6tyZsR/MEejmhgZskSJHvfOAxox qtHdERc6HKw/dMpt704ks6ng/r2Vy/6q6DbN9/WYnE5yydl4B3tpPpTJFrEGFPOyrVMi uFqTMonb98TtbUD8pU1KZkYVyHkQVzu4HmP/ycdu89YgxvTdv6USOWl1I//6jg6YQGgi hcbjphWeKKLlxaQgEbWD2fbsHcZvA3RVyQSGXxtQ9nh4rUo9C10vT0X9brtTYpByM4tT hcl8L4R7Ei3QnIrVS58+pD5974BO/10Y5ObkNw4XhLm8g8vvfKV35m5kIwj66Msf5TIP JcIg== X-Forwarded-Encrypted: i=1; AJvYcCVofr9phW8OW462Pbf0lJjzLlbv8GmrH/Km6v6l07ACOR/rgPPcBVRhSAwt9s2xAOzkPgS+SGaNRY/6/Q==@vger.kernel.org X-Gm-Message-State: AOJu0Yw42oTJ/PHxt9iokxBtq9YrHBfDtWsYqGpSx0qvTRUq6UBxcQo0 YWS7w6WLkWqQYv4fvsmnPTgmE7/nLeHepdc6ClzM+i1NqpYQQIxsm2dEpx6apekf4i1M5yJDoVQ TqNR5mA== X-Gm-Gg: ASbGnctdArG3hya3pmP4q6sc6jE2XB2AO74XVcSTyDqOxt9ToCtbpbk1COcds647r53 DYPslcLg7Io25tzCLDSIJSMdAAl9FZntZxWvZQmgl7FB7GcMdCew7BcqCdvJG20akoQ1oV8miUA Gq9xY868dCeQ4zV+szwb1iS6sjftX5eU8jcE2NDFm7FSJ8bSoDbguvWcGxqTdEeCAOy40+xwxZs zt3tCBmRyuLh5T8JNO5VWSvCiNjhHOljARmCpqteRx+xH4O1bX91wBuFr4yz32QzKM1oSbDRVuf U6MVoMzp39/AHIR/eaBnOyYy+Dkh X-Google-Smtp-Source: AGHT+IEIeHQTJ8/QtRwBWcSl9TO92kHxG7avnOm8/eWBRmULID8JOaosNQ6nHBBvafmVZG0xlTQNtg== X-Received: by 2002:a17:907:6eac:b0:aa6:5910:49af with SMTP id a640c23a62f3a-ab789b1f93cmr1478824566b.24.1739199698834; Mon, 10 Feb 2025 07:01:38 -0800 (PST) Received: from localhost.localdomain ([151.41.218.186]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab7bec717f7sm250400466b.81.2025.02.10.07.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2025 07:01:38 -0800 (PST) From: Valerio Setti To: jbrunet@baylibre.com, neil.armstrong@linaro.org, khilman@baylibre.com, martin.blumenstingl@googlemail.com, linux-amlogic@lists.infradead.org, linux-sound@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Valerio Setti Subject: [PATCH RFC 4/6] ASoC: meson: add support for AUDIN in gx-card Date: Mon, 10 Feb 2025 16:01:27 +0100 Message-Id: <20250210150129.40248-5-vsetti@baylibre.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250210150129.40248-1-vsetti@baylibre.com> References: <20250210150129.40248-1-vsetti@baylibre.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Extend the gx-card module in order to support the audio input capabilities provided by AUDIN driver. Signed-off-by: Valerio Setti --- sound/soc/meson/gx-card.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c index b408cc2bbc91..c59bb18b0951 100644 --- a/sound/soc/meson/gx-card.c +++ b/sound/soc/meson/gx-card.c @@ -67,7 +67,8 @@ static int gx_card_parse_i2s(struct snd_soc_card *card, static int gx_card_cpu_identify(struct snd_soc_dai_link_component *c, char *match) { - if (of_device_is_compatible(c->of_node, DT_PREFIX "aiu")) { + if ((of_device_is_compatible(c->of_node, DT_PREFIX "aiu")) || + (of_device_is_compatible(c->of_node, DT_PREFIX "audin"))) { if (strstr(c->dai_name, match)) return 1; } @@ -96,6 +97,8 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np, if (gx_card_cpu_identify(dai_link->cpus, "FIFO")) return meson_card_set_fe_link(card, dai_link, np, true); + else if (gx_card_cpu_identify(dai_link->cpus, "TODDR")) + return meson_card_set_fe_link(card, dai_link, np, false); ret = meson_card_set_be_link(card, dai_link, np); if (ret) @@ -107,8 +110,11 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np, dai_link->num_c2c_params = 1; } else { dai_link->no_pcm = 1; - /* Check if the cpu is the i2s encoder and parse i2s data */ - if (gx_card_cpu_identify(dai_link->cpus, "I2S Encoder")) + /* Check if the cpu is the i2s encoder|decoder and parse + * i2s data + */ + if (gx_card_cpu_identify(dai_link->cpus, "I2S Encoder") || + gx_card_cpu_identify(dai_link->cpus, "I2S Decoder")) ret = gx_card_parse_i2s(card, np, index); } -- 2.39.5