Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5601128ybh; Wed, 7 Aug 2019 08:31:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIGlwsqa+PaNeQVbpgof3lM5zOk3tgPDo76AOXs5x067uP9pXlC795fdepU5hCK5ZqUwXa X-Received: by 2002:a17:902:ff10:: with SMTP id f16mr8429185plj.141.1565191885772; Wed, 07 Aug 2019 08:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565191885; cv=none; d=google.com; s=arc-20160816; b=XlCapwU/Rf/Oerod9pFE5yvwDxVmqiwBOQ3BGZPCURUatdoK2XVNoa+YaehAygjQgM ZZ2/Do/6qaeKy5f6isvu0NSWAescyxN75C/7oK2Lbs1013eZSR5Atzi2m5o+DCxbwNfr DAUN1NOVCiNTudglSgz8CJHC58FXj0kuVLII3GVE2yXuVvhz2zkgI0sxUhSayqJTD2Ha X6juonkpYW/rWGWqMIa9oDYGNCnZouz05HNIfG46T9BI2o76xh9XGCKrdUtiJE+18/om d/zW4XnePkDa6UTHK96mw9Pnc7p61HUV5UT8jq0lkA92A1KmGGhGnG5PFMifXXoFczf/ /Cvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=J2AxcJjTu4Em2coCWWa3ZaD+BRTicwzIxGa7Qvvd3rw=; b=MXBnFVXW76CoP1VtA/X7sUVBwR2iVc6925pIjW46Z6pZku37rLYhf0TRVEKi2jKkgz 5P5wDWGh1itNNIaII4bXdXzeQRGjAvmXQoDlWqvG6yzsUyN+hTrxqFT6Ajxc4j/zMsQt Qe+0DYqzRHbAlcsuRXqBTDObLidzQubVbiF3YVNV072KF/fPl0SDETjH1bT3TgVX3GMu KXtKjORbCGD+Nyp0Slb4fDlYtEcAlalUr7hIwaae5oTFhK6aTgx2SfPsCjlY+BpLDOVy b41hoDz1eeABkXiEpjCLs9rFd/Uu16xP3QVBfFnvkd5viHH6Tm9ls+rjTMHc92QwzFza vF4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pko8c1D1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si49015544pld.221.2019.08.07.08.31.09; Wed, 07 Aug 2019 08:31:25 -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=pass header.i=@gmail.com header.s=20161025 header.b=pko8c1D1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388602AbfHGP2j (ORCPT + 99 others); Wed, 7 Aug 2019 11:28:39 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34180 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387827AbfHGP2j (ORCPT ); Wed, 7 Aug 2019 11:28:39 -0400 Received: by mail-wm1-f66.google.com with SMTP id e8so1612599wme.1; Wed, 07 Aug 2019 08:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=J2AxcJjTu4Em2coCWWa3ZaD+BRTicwzIxGa7Qvvd3rw=; b=pko8c1D1aNeK/Wvm+bO/5XEEt4y6uMaXC6vj+i+eNuI9tg6Uie6LjG7sAOcNEHYoOk mYHbOpwvmIGq91Ky9OIaoq465kLZkBefxD2SuHoGpQ1wdbxLSizqITWpsjPzP/XQKLrQ nDSvlTxMLqD5kUrn6FftauflqcjP4FXSt6T+d34I32aGNTctXvhgAbt/cFgv2HSiVHrO lGjRV7s1wjwkbHTgciB7d23c+3ylZPOmAIY+p017qY3Ll2rcCkpZhVm8ONKBZd8irT7e lIGabt0+pkI1YymwB+hZnffI/I8eDAYfYVLI6aFrMvsuYQqyO35K4yiJJKj1bt3fGasB mouw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=J2AxcJjTu4Em2coCWWa3ZaD+BRTicwzIxGa7Qvvd3rw=; b=Ul6oef+sR/lj72Dn8WRVsv9ncZ6BVbb59RSun0oI5CJ0aDRnJ7/5UL7BFdDDQ5Twkx +1qCZTIcjZmM8FlK24GcU96c12NWa30umd3l9EdPb0/29E9McJnD2cBUzZhDb6WUxT+g pv3VmrKzESjtQsNYRcUlYN2/6LcjRmgAY6MWcVaRM6lsuPAo+JarFdYqX6/y/cd75ugj CA046X/eR8ot4uyt05sALBclHieMDqc8kYDDXvN7Ed9CWGyY/i241rY8yrh3MaNnCSKq QVJ4jh867ji8W51tYI7g4ZcA/aF8FwsZ2xAlF7fDb3hFnJCPrCVYejhiu7ojHCEHHfM8 Kyyg== X-Gm-Message-State: APjAAAUjOZAiKV6gIDVyXXK/fmTpg6FBbA3weUpDqOruC7DWbIQOK0M5 jxVrqqxGJ1ijm1Pq/iEywiHFARABejcrwEep/5E= X-Received: by 2002:a7b:c051:: with SMTP id u17mr496286wmc.25.1565191716999; Wed, 07 Aug 2019 08:28:36 -0700 (PDT) MIME-Version: 1.0 References: <20190723084104.12639-1-daniel.baluta@nxp.com> <20190723084104.12639-4-daniel.baluta@nxp.com> <85b4a2c4-761e-bdcf-f05e-2fb16c06f11e@linux.intel.com> In-Reply-To: <85b4a2c4-761e-bdcf-f05e-2fb16c06f11e@linux.intel.com> From: Daniel Baluta Date: Wed, 7 Aug 2019 18:28:25 +0300 Message-ID: Subject: Re: [Sound-open-firmware] [PATCH v2 3/5] ASoC: SOF: Add DT DSP device support To: Pierre-Louis Bossart Cc: Daniel Baluta , Marco Felsch , Shawn Guo , Mark Rutland , Aisheng Dong , Peng Fan , Anson Huang , Devicetree List , "S.j. Wang" , Linux Kernel Mailing List , Paul Olaru , Rob Herring , dl-linux-imx , Pengutronix Kernel Team , Leonard Crestez , Fabio Estevam , linux-arm-kernel , sound-open-firmware@alsa-project.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 7, 2019 at 6:22 PM Pierre-Louis Bossart wrote: > > > >>>> +static int sof_dt_probe(struct platform_device *pdev) > >>>> +{ > >>>> + struct device *dev =3D &pdev->dev; > >>>> + const struct sof_dev_desc *desc; > >>>> + /*TODO: create a generic snd_soc_xxx_mach */ > >>>> + struct snd_soc_acpi_mach *mach; > >>> > >>> I wonder if you really need to use the same structures. For Intel we = get > >>> absolutely zero info from the firmware so rely on an ACPI codec ID as= a > >>> key to find information on which firmware and topology to use, and wh= ich > >>> machine driver to load. You could have all this information in a DT b= lob? > >> > >> Yes. I see your point. I will still need to make a generic structure f= or > >> snd_soc_acpi_mach so that everyone can use sof_nocodec_setup function. > >> > >> Maybe something like this: > >> > >> struct snd_soc_mach { > >> union { > >> struct snd_soc_acpi_mach acpi_mach; > >> struct snd_soc_of_mach of_mach; > >> } > >> }; > >> > >> and then change the prototype of sof_nocodec_setup. > > > > Hi Pierre, > > > > I fixed all the comments except the one above. Replacing snd_soc_acpi_m= ach > > with a generic snd_soc_mach is not trivial task. > > > > I wonder if it is acceptable to get the initial patches as they are > > now and later switch to > > generic ACPI/OF abstraction. > > > > Asking this because for the moment on the i.MX side I have only > > implemented no codec > > version and we don't probe any of the machine drivers we have. > > > > So, there is this only one member of snd_soc_acpi_mach that imx > > version is making use of: > > > > mach->drv_name =3D "sof-nocodec"; > > > > That's all. > > > > I think the change as it is now is very clean and non-intrusive. Later > > we will get options to > > read firmware name and stuff from DT. > > > > Anyhow, I don't think we can get rid of snd_dev_desc structure on > > i.MX. This will be used > > to store the information read from DT: > > > > static struct sof_dev_desc sof_of_imx8qxp_desc =3D { > > =C2=BB .default_fw_path =3D "imx/sof", > > =C2=BB .default_tplg_path =3D "imx/sof-tplg", > > =C2=BB .nocodec_fw_filename =3D "sof-imx8.ri", > > =C2=BB .nocodec_tplg_filename =3D "sof-imx8-nocodec.tplg", > > =C2=BB .ops =3D &sof_imx8_ops, > > }; > > > > For the moment we will only use the default values. > > Yes, that's fine for now. If you don't have a real machine driver then > there's nothing urgent to change. > > Is the new version on GitHub? Not yet, will push it today and ping you.