Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1012989pxa; Fri, 28 Aug 2020 00:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztla2lcjebSc0/FzQTEB8CvO7owCHvpHt+NR/6ntw2RcPXDjmxzThRmC26vwLrrqnO/HoD X-Received: by 2002:aa7:cb0e:: with SMTP id s14mr542529edt.225.1598600956979; Fri, 28 Aug 2020 00:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598600956; cv=none; d=google.com; s=arc-20160816; b=mkr4I/H5zcj80V9AhRzWih8Mr8B+d+Xk8NFauqrh21A7t2uEW3g3sse7SI5SqAT8ov Bh8z87W09CE8VcOxlkecq8cV+Xd660Vx0gmvCBGlgTqRpg98I1TK9c9t7P8Xwku4SzsB c5A/bD+BGzSPFvWBd4wvLEQJC6Z5AlUMFEL7KPJnGEKis34w5su8Qtky+G12KAsIe0jL 76UVInufFV4ut9q0sDFmrNVKWgQ6hM2EIST85aDTO+8mQ6Pi5MpbLqjni96uSgIG5WT4 tNNN1P+p9kuS01GquTgDdONa469QtKltMDKf5dunWM7dg1IH0uLHlYKI9bmS/etYpy2J STgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=A7JbY+86Vm/LFzBzU+NRGYmiQEoXlK9NxEqm22h3VLg=; b=M9ivVobuxeblQGtg8Q3gWnW0jmG3hKJLIaHhzuUFpKN36LLfh1G8jflZXZ1/g1ITKg AXptu2jfL+Z5BqjQ6dkbe8JPLNcltcWQyQKIaQDRvBFK/SSV4YZ1ZnPyZhh3HD0FZTEo 1TEHTpEl+qQhi0TzwYuDd2l1rgGuKspAtdRj+tTQaa3bIzJP2tezwM306l4JF+8QQ1Rs QcRP9OQ334EHxEQeEsfPKLc3BQQ8tK4xygB8DtXvCVTUDSDUF+jvnHpdjqkic9+DL/OR J+fLRRyEY8C4fFeiN8fFCUOjYCarEV5IqLOztPdhi4thmUjcknTATU98bsiP/JYs6//Z bi7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pbww8oqm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t21si85290edi.213.2020.08.28.00.48.54; Fri, 28 Aug 2020 00:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pbww8oqm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728357AbgH1Hpt (ORCPT + 99 others); Fri, 28 Aug 2020 03:45:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:40838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726566AbgH1Hps (ORCPT ); Fri, 28 Aug 2020 03:45:48 -0400 Received: from localhost (unknown [122.171.38.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F3CDD206EB; Fri, 28 Aug 2020 07:45:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598600748; bh=/YlQq3kq0scE8VOOqA9neEBCKThA211wcq3Ihbr6a8Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pbww8oqmOt9a4DplZPurSROVGyyNuGnD1BkYUy3UmRwQjlX94Nn5MDdbp0Ghx/GCx bIfpyWE7amwwYs8tyIwiIcrLyTGZ3F+rNV27azj2jIyh9q0xYfWsxscDNNHWB+FN/4 XisAOqb3R4iWKmdJ7saU5dQahEpCuuyRCZgZL4TA= Date: Fri, 28 Aug 2020 13:15:44 +0530 From: Vinod Koul To: "Liao, Bard" Cc: Bard Liao , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" , "tiwai@suse.de" , "broonie@kernel.org" , "gregkh@linuxfoundation.org" , "jank@cadence.com" , "srinivas.kandagatla@linaro.org" , "rander.wang@linux.intel.com" , "ranjani.sridharan@linux.intel.com" , "hui.wang@canonical.com" , "pierre-louis.bossart@linux.intel.com" , "Kale, Sanyog R" , "Lin, Mengdong" Subject: Re: [PATCH 07/11] soundwire: intel: Only call sdw stream APIs for the first cpu_dai Message-ID: <20200828074544.GM2639@vkoul-mobl> References: <20200818024120.20721-1-yung-chuan.liao@linux.intel.com> <20200818024120.20721-8-yung-chuan.liao@linux.intel.com> <20200826094636.GB2639@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28-08-20, 01:47, Liao, Bard wrote: > > snd_pcm_substream *substream, > > > goto err; > > > } > > > > > > - ret = sdw_prepare_stream(dma->stream); > > > + /* > > > + * All cpu dais belong to a stream. To ensure sdw_prepare_stream > > > + * is called once per stream, we should call it only when > > > + * dai = first_cpu_dai. > > > + */ > > > + if (first_cpu_dai == dai) > > > + ret = sdw_prepare_stream(dma->stream); > > > > Hmmm why not use the one place which is unique in the card to call this, > > hint machine dais are only called once. > > Yes, we can call it in machine driver. But, shouldn't it belong to platform > level? The point is that if we move the stuff to machine driver, it will > force people to implement these stuff on their own Intel machine driver. nothing stops anyone from doing that right! machine driver is another component so it can be moved there as well -- ~Vinod