Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 491C3C432C3 for ; Tue, 3 Dec 2019 21:46:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AB7320803 for ; Tue, 3 Dec 2019 21:46:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="igDHZNuv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AB7320803 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 35D231665; Tue, 3 Dec 2019 22:45:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 35D231665 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1575409568; bh=WqEyMCB/8BKTzG5cyyV8ncZPl2NyvyastdY0iyk9vi4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=igDHZNuvrHou22PZNNNiZjkLHNbeCXQ4tLwrNQhZYoz3DsTuwz/skMuEtGW7mOF+P CzZn277ERwK9DKQ1H2jUraMxPHa6G1aeIdEj8F8A/Bi4bTmypauzJIosFQaJpuskW2 LhVB9mBGSTVdNtDDpxmAN2cZO8P2zoabZKLRHXDg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 95415F800F0; Tue, 3 Dec 2019 22:45:17 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CA1ADF8015A; Tue, 3 Dec 2019 22:45:14 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 986DDF800B4 for ; Tue, 3 Dec 2019 22:45:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 986DDF800B4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9D718B3295; Tue, 3 Dec 2019 21:45:09 +0000 (UTC) Date: Tue, 03 Dec 2019 22:45:09 +0100 Message-ID: From: Takashi Iwai To: Pierre-Louis Bossart In-Reply-To: References: <20191203161908.7496-1-perex@perex.cz> <4bd562e7-64f6-1852-fe64-d280e91569c3@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: ALSA development , Mark Brown Subject: Re: [alsa-devel] [PATCH] ASoC: snd-sof-pci - add model parameter and pass it to HDA codec driver X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 03 Dec 2019 20:47:32 +0100, Pierre-Louis Bossart wrote: > > > >>> It may be useful to pass the specific model to the generic HDA codec > >>> routines like the legacy HDA driver (snd-hda-intel) allows. > >>> The model name "sofbus" is tricky anyway. > >> > >> Humm, I must admit I have never looked at this for the legacy driver, > >> and I am a bit confused on what this would be used for? > >> The legacy driver uses codec->modelname but I can't figure out this > >> part in hda_codec.c > >> > >> if (codec->bus->modelname) { > >> codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL); > >> > >> In theory there can be multiple codecs per bus (with different SDIs) > >> so using the bus->modelname for the codec->modelname looks odd. > > > > That's true. However, basically the model name is specific to the > > whole device, hence it's usually OK to pass to all codecs. The > > mismatched model name is just ignored (that's why the current code > > with model="sofbus" works). So you can think it a kind of quirk > > lookup with a system name given explicitly by user. > > > >> Is there an example of this being used for my education? > > > > You can find the list in Documentation/sound/hd-audio/models.rst > > and the usage in Documentation/sound/hd-audio/notes.rst. The > > documents are a bit outdated, though. > > ah, ok, thanks for the pointers. > > So if you have a new machine that's not explicitly handled by quirks > you can initially force existing tricks to be used, and in a second > step the quirk is extended to handle that machine, yes? Yes, that's the usual step. Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel