Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6418857ybh; Wed, 7 Aug 2019 23:44:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOtsQNfRXIZDlCpRr5TgwDY8Nil0Ojz7ywpQLoC2/6iSaZwpECRZGbL6R3HdADPJKgn0V5 X-Received: by 2002:a63:20a:: with SMTP id 10mr11204527pgc.226.1565246666998; Wed, 07 Aug 2019 23:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565246666; cv=none; d=google.com; s=arc-20160816; b=Adga4wNjhMh5EcXG+m2irLPYmWyg8Fyg81lXgxc/P3Jr6EJhlqJDpFfjuT5CdLKTis PSjYuZGs2D+pj9alS8N+I2N2RPKPKHAb1li/fJjxozZyXIDfS3Ovj1ALcUam+3HjLmTX uoy7F5dPQCeQz+mC2NPbC2DDoxNWebw90dxG+D1hlek8jR8BPmU1ZdLMz22zWmfvC7F3 jt2zew3ZzUNcMHJweURIDBc+jlgmFuR+T8dqTfoYZLAvba6UQ3Xs1JNC7KlCBgNFJVWH lcTBZKKOvfplXWr4XpfgmFvAzX2w1WikyizdbEjGbTIE0Q0uVSyrXlI4eKhDD2P+S76d bhsQ== 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=pmLe+2hh12AV2fWDLuCLoZwfalLPQvLzD4g62m50b0k=; b=HXft/ii/9+9XBqqgiKNU6I5dIB7eAoNzfneHO1XSwTTnO90uBLvRibgyHr3X8ZOnlW YbLrvXwWiXeriFpGb2YFOebKhRONQQWqJI2J5nv0hu64nL6HJqK9QXD70Ga68xuwWXAn ztPowjNjEpB2HhzrEIakWqRml2fuPh5v63REmaoNRAMdh7hG0Pd+Vr3OsebDRqgeho7C oVVowfFSLqeKpZcQrle19AxoCNAIs6u2GkDxt6/fFZXlyNvTS+RgvzrOHCpaIqZXmELI I6syD72rQrtVcds9mV3GcXKev4mkVRIj4SWOxrOhvJa818/CfZsISS/UtXZ1XM3Urr+c Bn+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CEHHtXeF; 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 a187si9723568pgc.524.2019.08.07.23.44.11; Wed, 07 Aug 2019 23:44:26 -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=CEHHtXeF; 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 S1731190AbfHHG1w (ORCPT + 99 others); Thu, 8 Aug 2019 02:27:52 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43727 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbfHHG1v (ORCPT ); Thu, 8 Aug 2019 02:27:51 -0400 Received: by mail-wr1-f66.google.com with SMTP id p13so19093560wru.10; Wed, 07 Aug 2019 23:27:50 -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=pmLe+2hh12AV2fWDLuCLoZwfalLPQvLzD4g62m50b0k=; b=CEHHtXeFjhD+tzAhZywdJN5LwSzFPBqCcPSeVgeVB0ZC8DV1HXnAJ6FiFTZsAFvsVn wdncjRt3iob6EbqT5FgWKKUJ+mD55V03FSv8G2E4O0KfIbzha6KDxSJO1QE7DqUl2Goy uSwk8JviSdCfCLYjlcNRnTddNDKJscCudG86FTGDWPEOMFmapV90N2vff9vf/4ichait OfP6P4oxvTaHHvCb1GV+2ko5/wBg+MmCPqbc33E98ssCFewIZrEM0Q0pGklNxnvPIUKP savgTzmYGDzDtiRd1TALzqoYIJ/jRrjeU9XCuM2iOdjZNAH0mtqNd/T8K7ILqvY9q6rD KPEw== 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=pmLe+2hh12AV2fWDLuCLoZwfalLPQvLzD4g62m50b0k=; b=N+wWq6jpZFv5/C8xQ7MyWfNctCcWAYZHYnucZs/1T6N5j/Unj1WBqP2V2KnK18j4z/ qMSYPDTDaUpoqVd2BUfUyFIterNuo/0P2YI/JBgsUsJNnUIc0QA6veijS/++yDehhFpm YzC6RJlyMTotTniTr6wyNOjMV7XXLwUfEEZMIZ2ZF6HYDlOl+xytEHRgwKn87AUzEVFX 5iTlOy+DW01OVox4mlLvJnO8i2PjpydhYlpZ1o4bdfCGZ8xrk/q2dcRG/kp9bLOVwIFE ta7hH7/5prylIuJDkrBh7WTnHxteSar0cJM+POOl5aLsq7/tYehkrVvEepuB6d6elCcr vhpw== X-Gm-Message-State: APjAAAXgcQAl6i709nrpBagUE59zAibfQb080zeiP16wZsHEsuy5Ykcx Mmc7Wo0HjaHYHDZWLev77kZSfUf5C5KlMrXiqYK2mGhdCyE= X-Received: by 2002:a5d:46cf:: with SMTP id g15mr15347063wrs.93.1565245669397; Wed, 07 Aug 2019 23:27:49 -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: From: Daniel Baluta Date: Thu, 8 Aug 2019 09:27:37 +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:28 PM Daniel Baluta wrot= e: > > 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 w= e 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 = which > > >>> machine driver to load. You could have all this information in a DT= blob? > > >> > > >> Yes. I see your point. I will still need to make a generic structure= for > > >> snd_soc_acpi_mach so that everyone can use sof_nocodec_setup functio= n. > > >> > > >> 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= _mach > > > 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. Late= r > > > 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. PR updated: https://github.com/thesofproject/linux/pull/1048