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 AD0D3C433EF for ; Tue, 18 Jan 2022 20:19:28 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5gkVZPeSjLd2Es6Xhia5gzCK55a9GtECPdBv0W5SQow=; b=oi+xsxbE98/nNN EdGzMazpFfgMMxq6mNEX9DhFCPBaxvAUQFhJeDtqPjCs1w6a6klu7fk6NLg424lUFr1amEXSz+kDZ +ml1mZ3Kx8jNjiUqyEpEVktsJzNV1FX8CyGGC2y13aErPUSNmn7R5A6H0LowTYXa3bVQ0+4Xb7HaT y9ExTLnOIK/4aILJhkpIOZfah4pr/WjO2tsz0pGiVStD/6L+opVCEFe1HANW9za2y2yIJdyys4Wso ZBpsBNfVu1FW221aFXKtE+FpqlP1By5tO81akJRvKCBrrtpkxHS5qbjQL3KRNKCmtiCSfRoLg2pmw vF2VR0jYytsmgM63olLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9uvg-002rh8-0C; Tue, 18 Jan 2022 20:18:08 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9uvZ-002res-BB for linux-arm-kernel@lists.infradead.org; Tue, 18 Jan 2022 20:18:04 +0000 Received: by mail-pj1-x102e.google.com with SMTP id n16-20020a17090a091000b001b46196d572so373646pjn.5 for ; Tue, 18 Jan 2022 12:17:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fTJy6r2petxIyCqlCeqcI3j0J1mr0+L2iTxm9kuz7Xs=; b=inhbbrVy+Fl/lXwKK3g5gU174TWO3UbXPm6+kPhfHgNNQVApLzBtbDcGk4Xgom17AB i3YZWJdLTgR31k1+RKgfidYdZUqNPiFDDZAGoFHkdyc4Ob67KE7sURHRukbTSubzASSf maDQWVxRz4iuaY3PO0xLJR+1EQcEZT+I8Q6AQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fTJy6r2petxIyCqlCeqcI3j0J1mr0+L2iTxm9kuz7Xs=; b=3fAJbOPkGeo9Dp+CaJhmgZbu5pJKM7ZiWRXQTVhWKpMC4PLPMsRON54/41WmkUku8e GtxAkW40yeQo+noqLfn8xgM3NedpIr3sn/WwqC4PozI3a20XqCxJdGhgg2/HLSNR895b SlDkF+e+ExoJ2vvzcyTW44bTmo5zG59kERstsxO+3JToY3Q5tXc4qXL/3Bf78WzrJxg1 h6pbVUgMmS2K1MJtdMeRl8YNglBlCQCT5vC3eQngkaVjG5O0Dg/ItKlr78ZMG9bRf83g 2tSvTQ+Mxmg9u14RNNs+DIbVimMgIE4olCqtU1fimuUC0K7W+iQNDiKSBW+XSsnx5fqW jckA== X-Gm-Message-State: AOAM530t9rHxmE0+dbeWLRek6wpDwdMYLpqfzkIXnmtnAQHdPWhXgikH Wq5KdshnDMWwHwwDj54TK23hAUK+o9TltQ== X-Google-Smtp-Source: ABdhPJxiIurI5FHOTYvsCLYSQboCxGuQP/VrNeICLl1afrsd2ymXtXw5svEXZBZPdy/+GQJ6NoXhPA== X-Received: by 2002:a17:90b:4b8a:: with SMTP id lr10mr278353pjb.58.1642537079558; Tue, 18 Jan 2022 12:17:59 -0800 (PST) Received: from google.com ([2620:15c:202:201:e4bb:67e6:f0b5:1b92]) by smtp.gmail.com with ESMTPSA id ha11sm1170099pjb.3.2022.01.18.12.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 12:17:58 -0800 (PST) Date: Tue, 18 Jan 2022 12:17:55 -0800 From: Brian Norris To: Chen-Yu Tsai Cc: Heiko Stuebner , Liam Girdwood , Mark Brown , David Airlie , Daniel Vetter , linux-rockchip@lists.infradead.org, Lin Huang , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Rob Herring , Sandy Huang , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 3/3] ASoC: rk3399_gru_sound: Wire up DP jack detection Message-ID: References: <20220114230209.4091727-1-briannorris@chromium.org> <20220114150129.v2.3.I3c79b1466c14b02980071221e5b99283cd26ec77@changeid> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220118_121801_425853_2B003EF8 X-CRM114-Status: GOOD ( 24.20 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Chen-Yu, On Mon, Jan 17, 2022 at 05:01:52PM +0800, Chen-Yu Tsai wrote: > On Sat, Jan 15, 2022 at 7:03 AM Brian Norris wrote: > > > > Now that the cdn-dp driver supports plug-change callbacks, let's wire it > > up. > > > > Signed-off-by: Brian Norris > > --- > > > > (no changes since v1) > > > > sound/soc/rockchip/rk3399_gru_sound.c | 20 ++++++++++++++++++++ > > 1 file changed, 20 insertions(+) > > > > diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c > > index e2d52d8d0ff9..eeef3ed70037 100644 > > --- a/sound/soc/rockchip/rk3399_gru_sound.c > > +++ b/sound/soc/rockchip/rk3399_gru_sound.c > > @@ -164,6 +164,25 @@ static int rockchip_sound_da7219_hw_params(struct snd_pcm_substream *substream, > > return 0; > > } > > > > +static struct snd_soc_jack cdn_dp_card_jack; > > + > > +static int rockchip_sound_cdndp_init(struct snd_soc_pcm_runtime *rtd) > > +{ > > + struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; > > Using snd_soc_card_get_codec_dai() might be a better choice throughout this > driver. While it will work for the cdn_dp case, because it is the first DAI > in |rockchip_dais[]|, all the invocations for the other codecs are likely > returning the wrong DAI. I'll admit, I'm not very familiar with the ASoC object model, so you may well be correct that there's something fishy in here. But I did trace through the objects involved here, and we *are* getting the correct DAI for both this case and the DA7219 case (preexisting code). It looks like we actually have a new runtime for each of our static dai_links: devm_snd_soc_register_card() ... for_each_card_prelinks() snd_soc_add_pcm_runtime() So I think this is valid to keep as-is. > For this particular patch it works either way, so > > Reviewed-by: Chen-Yu Tsai Thanks for looking! Brian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel