From patchwork Mon May 19 07:58:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Richter X-Patchwork-Id: 4200101 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90FA29F1CD for ; Mon, 19 May 2014 07:59:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A436620274 for ; Mon, 19 May 2014 07:59:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1CB112025B for ; Mon, 19 May 2014 07:59:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E28722625EF; Mon, 19 May 2014 09:59:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id BA1B826515C; Mon, 19 May 2014 09:58:56 +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 472CE265162; Mon, 19 May 2014 09:58:55 +0200 (CEST) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by alsa0.perex.cz (Postfix) with ESMTP id 46FCC261ABF for ; Mon, 19 May 2014 09:58:18 +0200 (CEST) X-Envelope-From: stefanr@s5r6.in-berlin.de Received: from kant ([83.221.231.67]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id s4J7wHeo032288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 19 May 2014 09:58:17 +0200 Date: Mon, 19 May 2014 09:58:16 +0200 From: Stefan Richter To: Takashi Sakamoto Message-ID: <20140519095816.21acbc71@kant> In-Reply-To: <1400420198-24312-1-git-send-email-o-takashi@sakamocchi.jp> References: <1400420198-24312-1-git-send-email-o-takashi@sakamocchi.jp> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Cc: alsa-devel@alsa-project.org, clemens@ladisch.de, ffado-devel@lists.sf.net Subject: Re: [alsa-devel] [RFC][PATCH 00/13 v1] Enhancement for Dice driver 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On May 18 Takashi Sakamoto wrote: > Takashi Sakamoto (13): > dice: Rename structure and its members > dice: Move file to its own directory > dice: Split transaction functionality into a file > dice: Split stream functionality into a file > dice: Split PCM functionality into a file > dice: Split hwdep functionality into a file > dice: Split proc functionality into a file > dice: Add new functions for limitation of PCM parameters > dice: Change the way to start stream > dice: Add support for duplex streams with synchronization > dice: Support for non SYT-Match sampling clock source mode > dice: Add support for PCM capture > dice: Add support for MIDI capture/playback Patch 02/12 apparently didn't get through to the mailinglist. It is this one, https://github.com/takaswie/sound/commit/ad9a912161a3b6d2e48d19e185b50d4619ea5a53 right? From ad9a912161a3b6d2e48d19e185b50d4619ea5a53 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Fri, 16 May 2014 22:11:47 +0900 Subject: [PATCH] dice: Move file to its own directory In followed commits, dice driver is split into several files. For easily managing these files, this commit adds subdirectory and move file into the directory. Signed-off-by: Takashi Sakamoto --- sound/firewire/Makefile | 3 +-- sound/firewire/dice/Makefile | 2 ++ sound/firewire/{ => dice}/dice-interface.h | 0 sound/firewire/{ => dice}/dice.c | 15 ++++++++------- 4 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 sound/firewire/dice/Makefile rename sound/firewire/{ => dice}/dice-interface.h (100%) rename sound/firewire/{ => dice}/dice.c (99%) diff --git a/sound/firewire/Makefile b/sound/firewire/Makefile index e297995cf7f7..edbe61d9ad1b 100644 --- a/sound/firewire/Makefile +++ b/sound/firewire/Makefile @@ -1,11 +1,10 @@ snd-firewire-lib-objs := lib.o iso-resources.o packets-buffer.o \ fcp.o cmp.o amdtp.o -snd-dice-objs := dice.o snd-isight-objs := isight.o snd-scs1x-objs := scs1x.o obj-$(CONFIG_SND_FIREWIRE_LIB) += snd-firewire-lib.o -obj-$(CONFIG_SND_DICE) += snd-dice.o +obj-$(CONFIG_SND_DICE) += dice/ obj-$(CONFIG_SND_ISIGHT) += snd-isight.o obj-$(CONFIG_SND_SCS1X) += snd-scs1x.o obj-$(CONFIG_SND_FIREWORKS) += fireworks/ diff --git a/sound/firewire/dice/Makefile b/sound/firewire/dice/Makefile new file mode 100644 index 000000000000..af05d7e9119a --- /dev/null +++ b/sound/firewire/dice/Makefile @@ -0,0 +1,2 @@ +snd-dice-objs := dice.o +obj-m += snd-dice.o diff --git a/sound/firewire/dice-interface.h b/sound/firewire/dice/dice-interface.h similarity index 100% rename from sound/firewire/dice-interface.h rename to sound/firewire/dice/dice-interface.h diff --git a/sound/firewire/dice.c b/sound/firewire/dice/dice.c similarity index 99% rename from sound/firewire/dice.c rename to sound/firewire/dice/dice.c index d18e7a68155d..cf8dc05c1596 100644 --- a/sound/firewire/dice.c +++ b/sound/firewire/dice/dice.c @@ -26,9 +26,9 @@ #include #include #include -#include "amdtp.h" -#include "iso-resources.h" -#include "lib.h" +#include "../amdtp.h" +#include "../iso-resources.h" +#include "../lib.h" #include "dice-interface.h" @@ -133,7 +133,7 @@ static inline u64 global_address(struct snd_dice *dice, unsigned int offset) return DICE_PRIVATE_SPACE + dice->global_offset + offset; } -// TODO: rx index +/* TODO: rx index */ static inline u64 rx_address(struct snd_dice *dice, unsigned int offset) { return DICE_PRIVATE_SPACE + dice->rx_offset + offset; @@ -710,13 +710,14 @@ static long dice_hwdep_read(struct snd_hwdep *hwdep, char __user *buf, event.lock_status.status = dice->dev_lock_count > 0; dice->dev_lock_changed = false; - count = min(count, (long)sizeof(event.lock_status)); + count = min_t(long, count, sizeof(event.lock_status)); } else { - event.dice_notification.type = SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION; + event.dice_notification.type = + SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION; event.dice_notification.notification = dice->notification_bits; dice->notification_bits = 0; - count = min(count, (long)sizeof(event.dice_notification)); + count = min_t(long, count, sizeof(event.dice_notification)); } spin_unlock_irq(&dice->lock);