From patchwork Wed Mar 25 21:29:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11458705 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D88F992A for ; Wed, 25 Mar 2020 21:41:12 +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 D1E7B2070A for ; Wed, 25 Mar 2020 21:41:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="DHYgMC25" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1E7B2070A 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 747EF1669; Wed, 25 Mar 2020 22:40:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 747EF1669 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1585172469; bh=UqXLWmiBdmvKALSXkSOg4aH+KMNpSWqIBp0rpbVsFgw=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=DHYgMC25yBt06TuDuO1WHAM3fmo7rrUxlBN3uBmDk3TeLSyfskXD0awXvtyWa6/42 Fd8LXAw2RoydHQQGkPMvVFRfrjAaijE2mvm+6VLOr1my2/XcCUH82a2jYhtQhrItbN 4sf6MHSN8hqviEzRZvw2Wsr2Cj5AScX2ip0m+890= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E5D0EF80158; Wed, 25 Mar 2020 22:40:21 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 90284F8028E; Wed, 25 Mar 2020 22:34:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.4.0 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 C9674F8011E for ; Wed, 25 Mar 2020 22:29:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C9674F8011E IronPort-SDR: Hmu7xkYLJqHuy/XdCw0TH3qIajUpn9CuIWjrEhNQC6AO14HwWdR5tUeFKilbZNg6ePqZmkC/vx lerUXAwECQGg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2020 14:29:15 -0700 IronPort-SDR: ihiLkikGCbOfSbCBNNNW9tztEs9XwZeR83vBKt/tectMljWwxUHToaUsZR6rMv9zBlvAu0FRT5 7upLLSrxzKQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,305,1580803200"; d="scan'208";a="393759849" Received: from abeljans.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.251.233.195]) by orsmga004.jf.intel.com with ESMTP; 25 Mar 2020 14:29:14 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 0/2] ASoC: rt1308-sdw: configure amplifier with set_tdm_slot() Date: Wed, 25 Mar 2020 16:29:03 -0500 Message-Id: <20200325212905.28145-1-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: tiwai@suse.de, broonie@kernel.org, Pierre-Louis Bossart 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" When two (or more) amplifiers are on the same link, the integrator may: a) assign dedicated slots for each of the amplifiers. b) provide the same configuration to all amplifiers, and rely on additional controls/processing in the amplifier to generate different outputs. case a) was the initial direction for SoundWire and is required for amplifiers with limited capabilities, but to deal with orientation or 'posture' changes it's easier to implement case b) when the amplifier can deal with multiple channels. This patchset suggest the use of the set_tdm_slot() API to define which of the channels will be consumed by what amplifiers. This maps well with SoundWire's 'ChannelEnable' registers. The notion of slot_width is however irrelevant here and ignored, and SoundWire ports are typically single direction, so only one of the two masks shall be used. Pierre-Louis Bossart (2): ASoC: rt1308-sdw: add set_tdm_slot() support ASoC: rt1308-sdw: use slot and rx_mask to configure stream sound/soc/codecs/rt1308-sdw.c | 38 +++++++++++++++++++++++++++++++---- sound/soc/codecs/rt1308-sdw.h | 2 ++ 2 files changed, 36 insertions(+), 4 deletions(-)