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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 EE19DC7619B for ; Mon, 17 Feb 2020 07:56:35 +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 7AEFF2064C for ; Mon, 17 Feb 2020 07:56:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="a2sVJiaD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AEFF2064C 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 886401672; Mon, 17 Feb 2020 08:55:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 886401672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1581926193; bh=HgRMyd/apHpNSrfpw1GBjSTMoYEAwdIfQ+jXR3XCR94=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=a2sVJiaDn8+zPUntTbaKb1LFg2867aMye2oKN2TKs7zKYbEHEf85fWYJzCKyrh6Ta 62+NuwWwzMDgKptgOU2ZNsBn14lwCW+g5VGtll5bmmuhbPBnbNprF9QtoR9BsKgcSl PQqwJGWaypRTU3+RLQSGAmumK9EpfZXVtkFfFkG0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 41699F800B6; Mon, 17 Feb 2020 08:55:12 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EFF13F80214; Mon, 17 Feb 2020 08:55:10 +0100 (CET) Received: from mx2.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 5BB70F800B6 for ; Mon, 17 Feb 2020 08:55:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5BB70F800B6 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DC919AAFD; Mon, 17 Feb 2020 07:55:06 +0000 (UTC) Date: Mon, 17 Feb 2020 08:55:05 +0100 Message-ID: From: Takashi Iwai To: Kuninori Morimoto In-Reply-To: <87wo8m9cwq.wl-kuninori.morimoto.gx@renesas.com> References: <87blpyarja.wl-kuninori.morimoto.gx@renesas.com> <87wo8m9cwq.wl-kuninori.morimoto.gx@renesas.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: Linux-ALSA , Mark Brown Subject: Re: [alsa-devel] [PATCH v3 10/18] ASoC: soc.h: add for_each_pcm_streams() 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 Mon, 17 Feb 2020 03:16:23 +0100, Kuninori Morimoto wrote: > > > From: Kuninori Morimoto > > ALSA SoC has SNDRV_PCM_STREAM_PLAYBACK/CAPTURE everywhere. > Having for_each_xxxx macro is useful. > This patch adds for_each_pcm_streams() for it. The subject prefix should be "ALSA" as it's ALSA-common code. Other than that, Acked-by: Takashi Iwai BTW, Mark, if you merge this series, please send the pull request earlier to me. I'm going to apply the similar cleanups in the whole rest ALSA code, and this change is needed at first. thanks, Takashi > Signed-off-by: Kuninori Morimoto > Reviewed-by: Ranjani Sridharan > --- > include/sound/pcm.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/sound/pcm.h b/include/sound/pcm.h > index f657ff08f317..2628246b76fa 100644 > --- a/include/sound/pcm.h > +++ b/include/sound/pcm.h > @@ -644,6 +644,11 @@ void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream, > #define snd_pcm_group_for_each_entry(s, substream) \ > list_for_each_entry(s, &substream->group->substreams, link_list) > > +#define for_each_pcm_streams(stream) \ > + for (stream = SNDRV_PCM_STREAM_PLAYBACK; \ > + stream <= SNDRV_PCM_STREAM_LAST; \ > + stream++) > + > /** > * snd_pcm_running - Check whether the substream is in a running state > * @substream: substream to check > -- > 2.17.1 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > https://mailman.alsa-project.org/mailman/listinfo/alsa-devel > _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel