[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4df03448f7919187a8a056d3f10415ab@serbinski.com>
Date: Mon, 10 Feb 2020 09:50:17 -0500
From: Adam Serbinski <adam@...binski.com>
To: Mark Brown <broonie@...nel.org>
Cc: Srini Kandagatla <srinivas.kandagatla@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Andy Gross <agross@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Liam Girdwood <lgirdwood@...il.com>,
Patrick Lai <plai@...eaurora.org>,
Banajit Goswami <bgoswami@...eaurora.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/8] ASoC: qdsp6: q6afe: add support to pcm ports
On 2020-02-10 08:31, Mark Brown wrote:
> On Sun, Feb 09, 2020 at 10:47:42AM -0500, Adam Serbinski wrote:
>
>>
>> +#define AFE_API_VERSION_PCM_CONFIG 0x1
>> +/* Enumeration for the auxiliary PCM synchronization signal
>> + * provided by an external source.
>> + */
>> +
>> +#define AFE_PORT_PCM_SYNC_SRC_EXTERNAL 0x0
>> +/* Enumeration for the auxiliary PCM synchronization signal
>> + * provided by an internal source.
>> + */
>
> This is a *weird* commenting style for these #defines and it's not
> consistent within the block, I'm seeing at least 3 different styles.
I will clean up the commenting.
>> + default:
>> + break;
>> + }
>
> Why is this not returning an error on unsupported values?
Only to be consistent with the pre-existing implementation for i2s
ports.
I will add an error return.
>
>> +
>> + switch (cfg->sample_rate) {
>> + case 8000:
>> + pcfg->pcm_cfg.frame_setting = AFE_PORT_PCM_BITS_PER_FRAME_128;
>> + break;
>> + case 16000:
>> + pcfg->pcm_cfg.frame_setting = AFE_PORT_PCM_BITS_PER_FRAME_64;
>> + break;
>> + }
>
> Same here.
I will also add the error return here.
Powered by blists - more mailing lists