lkml.org 
[lkml]   [2014]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2 1/4] ASoC: simple-card: add asoc_simple_card_fmt_master() to simplify the code.
On 09/02/2014 04:08 PM, Jean-Francois Moine wrote:
> On Tue, 02 Sep 2014 15:51:41 +0530
> Varka Bhadram <varkabhadram@gmail.com> wrote:
>
>>> + switch (((np == bitclkmaster) << 4) | (np == framemaster)) {
>>> + case 0x11:
>>> + return SND_SOC_DAIFMT_CBS_CFS;
>>> + case 0x10:
>>> + return SND_SOC_DAIFMT_CBS_CFM;
>>> + case 0x01:
>>> + return SND_SOC_DAIFMT_CBM_CFS;
>>> + default:
>>> + return SND_SOC_DAIFMT_CBM_CFM;
>>> + }
>>> +
>>> + /* Shouldn't be here */
>>> + return -EINVAL;
>>> +}
>> It will be nice if we declare the switch case numbers as macros (specific name)...
> I don't see which macros: the values are just 2 booleans.
>
I am talking about 0x11, 0x10, 0x01 values.. We can give any understandable
names to those...?


--
Regards,
Varka Bhadram.



\
 
 \ /
  Last update: 2014-09-02 13:21    [W:0.058 / U:1.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site