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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 1B889C10F29 for ; Tue, 17 Mar 2020 11:49: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 99EC9206EC for ; Tue, 17 Mar 2020 11:49: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="WxTIYsTg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99EC9206EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com 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 D406B183D; Tue, 17 Mar 2020 12:48:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D406B183D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1584445748; bh=376n0G/hUq2W2UMj+xgT4FoH2GQDkz9hCdBaxXLV5fU=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WxTIYsTg02PnhGW94vBiU3J0heaMGxPKj5hZtyCSG/LS03GJfiHT6Fyh7Y/5NR2Uq yPkP0t7JoK37u48ADIx9lt5i/JfVyHRKJro9kUwbfePO+5GzWBhK3hKjDZhF2jjyhI lio4kWkiJ+eKDy2iTnZ1uhTZwT7UcsaxR18mIA+Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D6CC1F80253; Tue, 17 Mar 2020 12:47:25 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7F946F80232; Tue, 17 Mar 2020 12:46:11 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9EACEF80058 for ; Tue, 17 Mar 2020 12:46:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9EACEF80058 IronPort-SDR: K50TogvVVhwL0JgVpvipBHd1guU0vVZQgdAEXntZE6aNphRRLwrsHihoJCknWMo5x+xwTMCHUH us4lPjpMBSEg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 04:46:03 -0700 IronPort-SDR: 3xBIbw4HL+3Ka+aa9aOOL7v1BynGHTPQpVXXDqq07GIrzY7sfJ9+OeIhHlLOg3ns12ZLvO5FTt gtr9SFMpYaUg== X-IronPort-AV: E=Sophos;i="5.70,564,1574150400"; d="scan'208";a="417517010" Received: from mgorski-mobl.ger.corp.intel.com (HELO [10.251.3.203]) ([10.251.3.203]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 04:46:02 -0700 Subject: Re: [PATCH] ucm2: hdadsp: add basic ucm config To: Jaroslav Kysela , alsa-devel@alsa-project.org References: <20200306113031.713-1-mateusz.gorski@linux.intel.com> <4e2e3345-81d0-c698-d589-d4db5faff288@perex.cz> <8cd9195d-6104-88ed-22ed-c3151334ee76@linux.intel.com> <1bd9d86c-e19f-183c-5355-5b7359c6e4c0@perex.cz> From: "Gorski, Mateusz" Message-ID: <7a44ec22-ed38-5ddd-0f04-097b2befd796@linux.intel.com> Date: Tue, 17 Mar 2020 12:45:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <1bd9d86c-e19f-183c-5355-5b7359c6e4c0@perex.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: pl Cc: cezary.rojewski@intel.com, tiwai@suse.com 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" >>>> Basic UCM configuration for HDA DSP generic enabling codec playback >>>> and >>>> capture on both HDA codec and DMIC ports. >>> >>> Could you describe for what Linux driver (source code) is this >>> configuration? >> >> >> This file is for Intel Skylake SST driver. Information added in v2. > > Ok, do we have this code in the vanilla linux kernel? Which .c file? > The driver name 'hdadsp' looks suspicious. We usually have a delimiter > in the driver name (like sof-hda-dsp). Yes, it is a part of Skylake driver, "hdadsp" is the name of sound card created on machine when using HDA generic machine driver. This machine driver is made of 2 .c files:     - skl_hda_dsp_common.c     - skl_hda_dsp_generic.c both are located in: sound/soc/intel/boards/ Example on production laptop: test@test-Swift-SF515-51T:/proc/asound$ cat cards  0 [hdadsp         ]: hda-dsp - hda-dsp                       WL-SwiftSF515_51T-V1.02-Guinness_WL > >>>> +ValueDefaults { >>>> +    PlaybackChannels "2" >>>> +    PlaybackPriority "1" >>>> +    CaptureChannels "2" >>>> +    CapturePriority "2" >>>> +} >>> >>> Remove PlaybackChannel and Priority defaults. The priorities should be >>> defined in the device section. > > I will check... > >> >> >> Thanks, moved to device section in v2. >> >> >>>> + >>>> +SectionDefaults [ >>>> +    cdev "hw:hdadsp" >>> >>> It should be "hw:${CardId}" for ucm2. >> >> >> Thanks, applied in v2. >> >> >>>> +    cset "name='codec0_out mo media0_in mi Switch' 1" >>>> +    cset "name='media0_out mo codec0_in mi Switch' 1" >>>> +    cset "name='mch_cap_out mo mch_cap_in mi Switch' 1" >>>> +] >>> >>> This file does not define any devices. Does pulseaudio work with this >>> configuration? >> >> >> Devices added in v2. Regarding pulseaudio - are there any guidelines on >> how to test UCM files with it? These UCM files were writted mainly based >> on existing ones for other cards. Of course basic tests were made. > > I wrote an ucm validator: > > https://github.com/alsa-project/alsa-tests/tree/master/python/ucm-validator > > > Just type 'make' in the ucm-validator directory, the alsa-info.sh > output should be added to the configs subtree. > > The PA should be used latest from gitlab with the volume control and > HDMI support. > >                     Jaroslav Thanks, used the validator on PATCH v2, it pointed out one more thing to be corrected. One thing that I've noticed - there are some problems when validating "included" files, for example: raise "aconfig.AlsaConfigError: unable to load config" error Mateusz