From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754175AbbJOGur (ORCPT ); Thu, 15 Oct 2015 02:50:47 -0400 Received: from lucky1.263xmail.com ([211.157.147.131]:47676 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753384AbbJOGup (ORCPT ); Thu, 15 Oct 2015 02:50:45 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: linux-spi@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <0355fe04a21d86c052ada798f7a0a09e> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH v6 09/10] snd: dmaengine-pcm: add snd_dmaengine_pcm_get_caps interface To: Vinod Koul References: <1444872865-2169-1-git-send-email-shawn.lin@rock-chips.com> <1444872998-2548-1-git-send-email-shawn.lin@rock-chips.com> <20151015040500.GB27370@localhost> Cc: shawn.lin@rock-chips.com, Heiko Stuebner , Jaroslav Kysela , Takashi Iwai , Mark Brown , Lars-Peter Clausen , Doug Anderson , Olof Johansson , Sonny Rao , Addy Ke , Boojin Kim , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, linux-spi@vger.kernel.org From: Shawn Lin Message-ID: <561F4CB8.1000500@rock-chips.com> Date: Thu, 15 Oct 2015 14:50:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151015040500.GB27370@localhost> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/10/15 12:05, Vinod Koul wrote: > On Thu, Oct 15, 2015 at 09:36:38AM +0800, Shawn Lin wrote: >> +int snd_dmaengine_pcm_get_caps(struct device *dev, struct dma_slave_caps *caps) >> +{ >> + struct snd_soc_platform *platform; >> + struct dmaengine_pcm *pcm; >> + int ret = -ENODEV; >> + >> + platform = snd_soc_lookup_platform(dev); >> + if (!platform) >> + return ret; >> + >> + pcm = soc_platform_to_pcm(platform); >> + >> + if (pcm->chan) >> + ret = dma_get_slave_caps(pcm->chan[0], caps); >> + >> + return ret; >> +} >> +EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_get_caps); > > I don't see the need of this wrapper if you are not going to use this inside > common code.. Why not read this in driver, anyway you setting taht up in > next patch okay, I will read it in driver directly. Thanks. > -- Best Regards Shawn Lin