Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9404772ybi; Wed, 10 Jul 2019 09:41:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyoc6hJOPUm5BBKt4HGXygGNmZs8Ejlx1fWMDXKFc7hA5WLiAj6sQfptKXSzny4VmjHrmP X-Received: by 2002:a17:902:7687:: with SMTP id m7mr40522776pll.310.1562776866304; Wed, 10 Jul 2019 09:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562776866; cv=none; d=google.com; s=arc-20160816; b=M6mF+qJchkFRPCcXSE+O84vdxEubckoHtL/v9MKXYKsvYccYeoqPebxXnZpg2sF34I 7OariO+ubUat9LFnv6NUoMA5tUMjUoovqit9EpW/1HLnCMvH0kDOQ21RA3IzQJfvIOQ0 NgrokSkIgjB9zESTOQMZyPVq3S+OuSnE5NxTYG2Dyw3DWbX0RLuubIBct9IdsgX4u9Og 4gIwlj7h22ObXZXiAG2pqRuL0T/DJ926CYiIe+vmF0HEwgrdOcKGQswkIjIIgyUNL8Mb 7Wyi0QKOHRlSiYZt84nTA78VG5/W+S0xNWB8j/G51Z3SvsFdFdy4b5TVhdBTJOJl36W0 DeqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=SgkufzQSTv6apsZUdNJaHjQjszSiq6lRFJLPOSo/AdU=; b=b6+Tphzv8mzSM5nM1M96zQ+Dd7HnWnR+7s9M/lMaFrDIuJ+2lOoq0/g309oLwZsGpu I+OzLD12rnxFcbhl/tcIrL7BWUSGC7lFTpX4LiCeARkYfo69ezlT4HqiP4VSfzvoGQUw Y0dGK2u7tMYcCJNCVZ5dl3IZz7IJIw6dbPx0GxqyKEHyrz6QNPpOHE4ft503mm6+r81h 3IjhILus1nwTbxYfD7c1PABgLRpfT+A0vt7YbdRF3lL50TjI2wlFiusGyKuStq2bvQ2u q1RcGNKKjqmU2Ur2jAT3hnvOPkNH84POvlRGmS+DluWJ9aDoEiae+5rYqbvT+CKNcmjX ng7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b="MPgH/N4l"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si2449080plq.299.2019.07.10.09.40.50; Wed, 10 Jul 2019 09:41:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b="MPgH/N4l"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727985AbfGJP10 (ORCPT + 99 others); Wed, 10 Jul 2019 11:27:26 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:46880 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727093AbfGJP1Z (ORCPT ); Wed, 10 Jul 2019 11:27:25 -0400 Received: by mail-ed1-f65.google.com with SMTP id d4so2550968edr.13 for ; Wed, 10 Jul 2019 08:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=SgkufzQSTv6apsZUdNJaHjQjszSiq6lRFJLPOSo/AdU=; b=MPgH/N4l+levG/VhKT8jjXObPZPdcPsPGW9l4OkxWmh5Mga2fY36xiK9/aWYGSDWoA bZRJFhK/XNZzPxm2cB6rV9EN2rfyFht230HqwAoiyw113/16g8xpwbQ4NmZqP/eQrGRT eHf2BSBk83dh088+VhXnml/jxzrTjM1zMyJMY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=SgkufzQSTv6apsZUdNJaHjQjszSiq6lRFJLPOSo/AdU=; b=Ac/L9PBMkB4ix+4udOauH9JjwjnCtNs3zMj1g+GK7t04n87QYxDIKK6t8NS2Dn7XRx WgirPr+5ezIK95D1k14HGlndUeCcVwan4yCYzYbeXGPLFotm8TnJy1GhSKBSY9N8Q0rF 7LjVtpABe50Y52GYc9e4oTi0blPkybEyWmtgsBzo3etfs9iF2MCI2nrpDHwtRQ01uy2p mq9yH6MIXGPnNu+7jl0XqJqJR84E8Ru0xJokhQlgeJ2agWXrT1pQ9xmrV8tN3EIWJktT xKO1pwr9PP93BVua3Arj2DDNO53eK7ZAZG66fD78BqCW/artxQGhkRUvZX5BycYxwX4U ea+A== X-Gm-Message-State: APjAAAX/2ZVkAh2pahWDRZVwWIj37+ErJCw08eoP3tlyTpVzqtOmJzXV IrS3EA3CkAKYshz9X8gjibSPOA== X-Received: by 2002:a17:906:12d7:: with SMTP id l23mr26929442ejb.282.1562772443347; Wed, 10 Jul 2019 08:27:23 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id q50sm811398edd.91.2019.07.10.08.27.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 08:27:22 -0700 (PDT) Date: Wed, 10 Jul 2019 17:27:20 +0200 From: Daniel Vetter To: Philippe CORNU Cc: Olivier MOYSAN , "a.hajda@samsung.com" , "narmstrong@baylibre.com" , "Laurent.pinchart@ideasonboard.com" , "jonas@kwiboo.se" , "jernej.skrabec@siol.net" , "airlied@linux.ie" , "daniel@ffwll.ch" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Benjamin GAIGNARD , Alexandre TORGUE , "linux-arm-kernel@lists.infradead.org" , "linux-stm32@st-md-mailman.stormreply.com" , "jsarha@ti.com" Subject: Re: [PATCH] drm/bridge: sii902x: add audio graph card support Message-ID: <20190710152720.GR15868@phenom.ffwll.local> Mail-Followup-To: Philippe CORNU , Olivier MOYSAN , "a.hajda@samsung.com" , "narmstrong@baylibre.com" , "Laurent.pinchart@ideasonboard.com" , "jonas@kwiboo.se" , "jernej.skrabec@siol.net" , "airlied@linux.ie" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Benjamin GAIGNARD , Alexandre TORGUE , "linux-arm-kernel@lists.infradead.org" , "linux-stm32@st-md-mailman.stormreply.com" , "jsarha@ti.com" References: <1562141052-26221-1-git-send-email-olivier.moysan@st.com> <7c17b3f2-afee-7548-7620-b67d11d09b24@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c17b3f2-afee-7548-7620-b67d11d09b24@st.com> X-Operating-System: Linux phenom 4.19.0-5-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 05, 2019 at 12:41:03PM +0000, Philippe CORNU wrote: > Hi Olivier, > and many thanks for your patch. > Good to have the audio graph card support, looks ok. > Reviewed-by: Philippe Cornu Since you have drm-misc commit rights I'm assuming you're going to push this too. Correct? -Daniel > Philippe :-) > > On 7/3/19 10:04 AM, Olivier Moysan wrote: > > Implement get_dai_id callback of audio HDMI codec > > to support ASoC audio graph card. > > HDMI audio output has to be connected to sii902x port 3. > > get_dai_id callback maps this port to ASoC DAI index 0. > > > > Signed-off-by: Olivier Moysan > > --- > > drivers/gpu/drm/bridge/sii902x.c | 23 +++++++++++++++++++++++ > > 1 file changed, 23 insertions(+) > > > > diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c > > index dd7aa466b280..daf9ef3cd817 100644 > > --- a/drivers/gpu/drm/bridge/sii902x.c > > +++ b/drivers/gpu/drm/bridge/sii902x.c > > @@ -158,6 +158,8 @@ > > > > #define SII902X_I2C_BUS_ACQUISITION_TIMEOUT_MS 500 > > > > +#define SII902X_AUDIO_PORT_INDEX 3 > > + > > struct sii902x { > > struct i2c_client *i2c; > > struct regmap *regmap; > > @@ -690,11 +692,32 @@ static int sii902x_audio_get_eld(struct device *dev, void *data, > > return 0; > > } > > > > +static int sii902x_audio_get_dai_id(struct snd_soc_component *component, > > + struct device_node *endpoint) > > +{ > > + struct of_endpoint of_ep; > > + int ret; > > + > > + ret = of_graph_parse_endpoint(endpoint, &of_ep); > > + if (ret < 0) > > + return ret; > > + > > + /* > > + * HDMI sound should be located at reg = <3> > > + * Return expected DAI index 0. > > + */ > > + if (of_ep.port == SII902X_AUDIO_PORT_INDEX) > > + return 0; > > + > > + return -EINVAL; > > +} > > + > > static const struct hdmi_codec_ops sii902x_audio_codec_ops = { > > .hw_params = sii902x_audio_hw_params, > > .audio_shutdown = sii902x_audio_shutdown, > > .digital_mute = sii902x_audio_digital_mute, > > .get_eld = sii902x_audio_get_eld, > > + .get_dai_id = sii902x_audio_get_dai_id, > > }; > > > > static int sii902x_audio_codec_init(struct sii902x *sii902x, > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch