From patchwork Wed May 2 10:16:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 10375433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B49CD60541 for ; Wed, 2 May 2018 10:27:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5E5728D77 for ; Wed, 2 May 2018 10:27:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A52028D7E; Wed, 2 May 2018 10:27:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC46F28D82 for ; Wed, 2 May 2018 10:27:31 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4741A26764A; Wed, 2 May 2018 12:17:29 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 227702675FA; Wed, 2 May 2018 12:17:26 +0200 (CEST) Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by alsa0.perex.cz (Postfix) with ESMTP id E11022675DF for ; Wed, 2 May 2018 12:17:23 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id k11-v6so9181684pgo.10 for ; Wed, 02 May 2018 03:17:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5E85dVBv4WvEVS9NqdRsXdMBr9V6fxdWo/geOCQKvl0=; b=MzhUi4+X2Uahx7sTswtnjLiCYfgAmZmdDvKnj5Tw9wwuyU6G4oxtt13eVoLcmGbjYf 2ZE/NOYAnvkw6/SsMgX4S6jLLiyXbhFTgXRc8O43Rwku9pPKrG7tNc+xV+NdSo7uLINW YHZ/aXNfEWno+DytTH4bLgUXsMAjDjMBWXTb371Yc0xw1XRL7UIdAbAQf/kn1A7fQk3k 3pMZYqwiOWsJi1THBWws/V+je5ua4d6H+wjH5xoVRSUXAOlEgURpYrzGV4eLVnPD+kfv BYV9zA8NFD72vaxY/eaPc0iMSwdHtzHdxhOZTA6VNg4j+p9OHFYf0mfxw0ROSs0/yimX LnKQ== X-Gm-Message-State: ALQs6tBmbBjb6+QYfKR/dQdocGhJkNXbPjHTU7CN4J+CBTTIjHJQxySJ v0vn2y/bntQKjW73aQbdWKU= X-Google-Smtp-Source: AB8JxZqbHq7HmiSM/+ZcASLHcDvbTTMm2XVway8tzYnUDjAd2J02yNanEWWLswhdoqIwG61Xx6HTlg== X-Received: by 10.98.74.80 with SMTP id x77mr18849810pfa.142.1525256243184; Wed, 02 May 2018 03:17:23 -0700 (PDT) Received: from localhost.localdomain (i196238.dynamic.ppp.asahi-net.or.jp. [61.125.196.238]) by smtp.gmail.com with ESMTPSA id 81sm22153688pfl.92.2018.05.02.03.17.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 May 2018 03:17:22 -0700 (PDT) From: Takashi Sakamoto To: clemens@ladisch.de, tiwai@suse.de Date: Wed, 2 May 2018 19:16:39 +0900 Message-Id: <20180502101651.26173-2-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180502101651.26173-1-o-takashi@sakamocchi.jp> References: <20180502101651.26173-1-o-takashi@sakamocchi.jp> Cc: alsa-devel@alsa-project.org, ffado-devel@lists.sourceforge.net Subject: [alsa-devel] [PATCH v3 01/13] ALSA: dice: add cache of stream formats X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP A previous commit 6f688268b3f4 ('ALSA: dice: purge generating channel cache') purged cache of stream formats. DICE interface originally has no feature to assist drivers to retrieve available formats for all of supported sampling transmission frequencies, without changing the frequency actually. For later release of Dice ASICs such as TCD2210, Dice interface has extended protocol and can support the feature. This assists drivers to retrieve available stream formats. This commit is a first step to regain the cache to generate PCM rules for all of supported sampling transmission frequencies. Signed-off-by: Takashi Sakamoto --- sound/firewire/dice/dice.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/firewire/dice/dice.h b/sound/firewire/dice/dice.h index da00e75e09d4..8f68976930c5 100644 --- a/sound/firewire/dice/dice.h +++ b/sound/firewire/dice/dice.h @@ -63,6 +63,13 @@ */ #define MAX_STREAMS 2 +enum snd_dice_rate_mode { + SND_DICE_RATE_MODE_LOW = 0, + SND_DICE_RATE_MODE_MIDDLE, + SND_DICE_RATE_MODE_HIGH, + SND_DICE_RATE_MODE_COUNT, +}; + struct snd_dice { struct snd_card *card; struct fw_unit *unit; @@ -80,6 +87,10 @@ struct snd_dice { unsigned int rsrv_offset; unsigned int clock_caps; + unsigned int tx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT]; + unsigned int rx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT]; + unsigned int tx_midi_ports[MAX_STREAMS]; + unsigned int rx_midi_ports[MAX_STREAMS]; struct fw_address_handler notification_handler; int owner_generation;