From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [PATCH 08/19] ASoC: kirkwood: Don't set unused struct snd_pcm_hardware fields Date: Fri, 20 Dec 2013 19:29:43 +0100 Message-ID: <52B48C97.8070208@metafoo.de> References: <1387545625-19240-1-git-send-email-lars@metafoo.de> <1387545625-19240-8-git-send-email-lars@metafoo.de> <20131220190506.2adb7a52@armhf> <52B47BF9.9030408@metafoo.de> <20131220201313.0fdf477e@armhf> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-out-044.synserver.de (smtp-out-137.synserver.de [212.40.185.137]) by alsa0.perex.cz (Postfix) with ESMTP id 1D870261B25 for ; Fri, 20 Dec 2013 20:28:41 +0100 (CET) In-Reply-To: <20131220201313.0fdf477e@armhf> 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 To: Jean-Francois Moine Cc: alsa-devel@alsa-project.org, Mark Brown , Liam Girdwood List-Id: alsa-devel@alsa-project.org On 12/20/2013 08:13 PM, Jean-Francois Moine wrote: > On Fri, 20 Dec 2013 18:18:49 +0100 > Lars-Peter Clausen wrote: > >> On 12/20/2013 07:05 PM, Jean-Francois Moine wrote: >>> On Fri, 20 Dec 2013 14:20:14 +0100 >>> Lars-Peter Clausen wrote: >>> >>>> The ASoC core assumes that the PCM component of the ASoC card transparently >>>> moves data around and does not impose any restrictions on the memory layout or >>>> the transfer speed. It ignores all fields from the snd_pcm_hardware struct for >>>> the PCM driver that are related to this. Setting these fields in the PCM driver >>>> might suggest otherwise though, so rather not set them. >>>> >>>> Signed-off-by: Lars-Peter Clausen >>>> Cc: Jean-Francois Moine >>>> --- >>>> sound/soc/kirkwood/kirkwood-dma.c | 16 ---------------- >>>> 1 file changed, 16 deletions(-) >>>> >>>> diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c >>>> index 4af1936..aac22fc 100644 >>>> --- a/sound/soc/kirkwood/kirkwood-dma.c >>>> +++ b/sound/soc/kirkwood/kirkwood-dma.c >>> [snip] >>>> @@ -43,12 +33,6 @@ static struct snd_pcm_hardware kirkwood_dma_snd_hw = { >>>> SNDRV_PCM_INFO_MMAP_VALID | >>>> SNDRV_PCM_INFO_BLOCK_TRANSFER | >>>> SNDRV_PCM_INFO_PAUSE), >>>> - .formats = KIRKWOOD_FORMATS, >>>> - .rates = KIRKWOOD_RATES, >>>> - .rate_min = 8000, >>>> - .rate_max = 384000, >>>> - .channels_min = 1, >>>> - .channels_max = 8, >>>> .buffer_bytes_max = KIRKWOOD_SND_MAX_BUFFER_BYTES, >>>> .period_bytes_min = KIRKWOOD_SND_MIN_PERIOD_BYTES, >>>> .period_bytes_max = KIRKWOOD_SND_MAX_PERIOD_BYTES, >>> >>> Lars, >>> >>> You removed too many things. The 'formats' field is mandatory. >> >> No it is not. While snd_soc_set_runtime_hwparams() uses it it is later >> overwritten again in soc_pcm_init_runtime_hw(). > > I have a DPCM system and soc_pcm_init_runtime_hw() is not called > (either 'dynamic' or 'no_pcm' is set in the DAI links). > Ok, I see dpcm_set_fe_runtime() does things slightly different.