Skip to content

Commit

Permalink
Fixed whitespaces.
Browse files Browse the repository at this point in the history
Signed-off-by: Naresh Nayak <[email protected]>
  • Loading branch information
nayakned committed Jun 25, 2024
1 parent ec39788 commit 568382d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions include/avtp/aaf/CommonStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of COVESA nor the names of its contributors may be
* * Neither the name of COVESA nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
Expand Down Expand Up @@ -50,7 +50,7 @@ typedef enum {
AVTP_AAF_COMMON_STREAM_FIELD_SUBTYPE,
AVTP_AAF_COMMON_STREAM_FIELD_SV,
AVTP_AAF_COMMON_STREAM_FIELD_VERSION,
AVTP_AAF_COMMON_STREAM_FIELD_MR,
AVTP_AAF_COMMON_STREAM_FIELD_MR,
AVTP_AAF_COMMON_STREAM_FIELD_TV,
AVTP_AAF_COMMON_STREAM_FIELD_SEQUENCE_NUM,
AVTP_AAF_COMMON_STREAM_FIELD_TU,
Expand Down
26 changes: 13 additions & 13 deletions include/avtp/aaf/PcmStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of COVESA, Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived from
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Expand Down Expand Up @@ -45,19 +45,19 @@ typedef enum {
AVTP_AAF_PCM_STREAM_FIELD_SUBTYPE,
AVTP_AAF_PCM_STREAM_FIELD_SV,
AVTP_AAF_PCM_STREAM_FIELD_VERSION,
AVTP_AAF_PCM_STREAM_FIELD_MR,
AVTP_AAF_PCM_STREAM_FIELD_MR,
AVTP_AAF_PCM_STREAM_FIELD_TV,
AVTP_AAF_PCM_STREAM_FIELD_SEQUENCE_NUM,
AVTP_AAF_PCM_STREAM_FIELD_TU,
AVTP_AAF_PCM_STREAM_FIELD_STREAM_ID,
AVTP_AAF_PCM_STREAM_FIELD_AVTP_TIMESTAMP,
AVTP_AAF_PCM_STREAM_FIELD_FORMAT,
AVTP_AAF_PCM_STREAM_FIELD_NSR,
AVTP_AAF_PCM_STREAM_FIELD_CHANNELS_PER_FRAME,
AVTP_AAF_PCM_STREAM_FIELD_BIT_DEPTH,
AVTP_AAF_PCM_STREAM_FIELD_STREAM_DATA_LENGTH,
AVTP_AAF_PCM_STREAM_FIELD_NSR,
AVTP_AAF_PCM_STREAM_FIELD_CHANNELS_PER_FRAME,
AVTP_AAF_PCM_STREAM_FIELD_BIT_DEPTH,
AVTP_AAF_PCM_STREAM_FIELD_STREAM_DATA_LENGTH,
AVTP_AAF_PCM_STREAM_FIELD_SP,
AVTP_AAF_PCM_STREAM_FIELD_EVT,
AVTP_AAF_PCM_STREAM_FIELD_EVT,
AVTP_AAF_PCM_STREAM_FIELD_MAX
} Avtp_AafPcmStreamFields_t;

Expand All @@ -72,16 +72,16 @@ typedef enum {
} Avtp_AafFormat_t;

typedef enum {
AVTP_AAF_PCM_NSR_USER = 0,
AVTP_AAF_PCM_NSR_8KHZ,
AVTP_AAF_PCM_NSR_16KHZ,
AVTP_AAF_PCM_NSR_USER = 0,
AVTP_AAF_PCM_NSR_8KHZ,
AVTP_AAF_PCM_NSR_16KHZ,
AVTP_AAF_PCM_NSR_32KHZ,
AVTP_AAF_PCM_NSR_44_1KHZ,
AVTP_AAF_PCM_NSR_48KHZ,
AVTP_AAF_PCM_NSR_88_2KHZ,
AVTP_AAF_PCM_NSR_96KHZ,
AVTP_AAF_PCM_NSR_176_4KHZ,
AVTP_AAF_PCM_NSR_192KHZ,
AVTP_AAF_PCM_NSR_192KHZ,
AVTP_AAF_PCM_NSR_24KHZ,
} Avtp_AafNsr_t;

Expand Down Expand Up @@ -152,7 +152,7 @@ int Avtp_AafPcmStream_SetField(Avtp_AafPcmStream_t* pdu, Avtp_AafPcmStreamFields
* -EINVAL: If any argument is invalid.
*/
int avtp_aaf_pdu_get(void *pdu,
Avtp_AafPcmStreamFields_t field, uint64_t *val);
Avtp_AafPcmStreamFields_t field, uint64_t *val);

/**
* @deprecated
Expand All @@ -166,7 +166,7 @@ int avtp_aaf_pdu_get(void *pdu,
* -EINVAL: If any argument is invalid.
*/
int avtp_aaf_pdu_set(void *pdu, Avtp_AafPcmStreamFields_t field,
uint64_t val);
uint64_t val);

/**
* @deprecated
Expand Down
44 changes: 22 additions & 22 deletions src/avtp/aaf/PcmStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

static const Avtp_FieldDescriptor_t Avtp_AafPcmStreamFieldDesc[AVTP_AAF_PCM_STREAM_FIELD_MAX] =
{
[AVTP_AAF_PCM_STREAM_FIELD_SUBTYPE] = { .quadlet = 0, .offset = 0, .bits = 8 },
[AVTP_AAF_PCM_STREAM_FIELD_SUBTYPE] = { .quadlet = 0, .offset = 0, .bits = 8 },
[AVTP_AAF_PCM_STREAM_FIELD_SV] = { .quadlet = 0, .offset = 8, .bits = 1 },
[AVTP_AAF_PCM_STREAM_FIELD_VERSION] = { .quadlet = 0, .offset = 9, .bits = 3 },
[AVTP_AAF_PCM_STREAM_FIELD_MR] = { .quadlet = 0, .offset = 12, .bits = 1 },
Expand All @@ -47,28 +47,28 @@ static const Avtp_FieldDescriptor_t Avtp_AafPcmStreamFieldDesc[AVTP_AAF_PCM_STRE
[AVTP_AAF_PCM_STREAM_FIELD_STREAM_ID] = { .quadlet = 1, .offset = 0, .bits = 64 },
[AVTP_AAF_PCM_STREAM_FIELD_AVTP_TIMESTAMP] = { .quadlet = 3, .offset = 0, .bits = 32 },
[AVTP_AAF_PCM_STREAM_FIELD_FORMAT] = { .quadlet = 4, .offset = 0, .bits = 8 },
[AVTP_AAF_PCM_STREAM_FIELD_NSR] = { .quadlet = 4, .offset = 8, .bits = 4 },
[AVTP_AAF_PCM_STREAM_FIELD_CHANNELS_PER_FRAME] = { .quadlet = 4, .offset = 14, .bits = 10 },
[AVTP_AAF_PCM_STREAM_FIELD_BIT_DEPTH] = { .quadlet = 4, .offset = 24, .bits = 8 },
[AVTP_AAF_PCM_STREAM_FIELD_NSR] = { .quadlet = 4, .offset = 8, .bits = 4 },
[AVTP_AAF_PCM_STREAM_FIELD_CHANNELS_PER_FRAME] = { .quadlet = 4, .offset = 14, .bits = 10 },
[AVTP_AAF_PCM_STREAM_FIELD_BIT_DEPTH] = { .quadlet = 4, .offset = 24, .bits = 8 },
[AVTP_AAF_PCM_STREAM_FIELD_STREAM_DATA_LENGTH] = { .quadlet = 5, .offset = 0, .bits = 16 },
[AVTP_AAF_PCM_STREAM_FIELD_SP] = { .quadlet = 5, .offset = 19, .bits = 1 },
[AVTP_AAF_PCM_STREAM_FIELD_EVT] = { .quadlet = 5, .offset = 20, .bits = 4 },
};

int Avtp_AafPcmStream_Init(Avtp_AafPcmStream_t* pdu)
{
int res;
int res;

if (!pdu) {
return -EINVAL;
}

memset(pdu, 0, sizeof(Avtp_AafPcmStream_t));
res = Avtp_AafPcmStream_SetField(pdu, AVTP_AAF_PCM_STREAM_FIELD_SUBTYPE, AVTP_SUBTYPE_AAF);
if (res < 0) return res;
if (res < 0) return res;

res = Avtp_AafPcmStream_SetField(pdu, AVTP_AAF_PCM_STREAM_FIELD_SV, 1);
if (res < 0) return res;
if (res < 0) return res;

return 0;
}
Expand All @@ -88,33 +88,33 @@ int Avtp_AafPcmStream_SetField(Avtp_AafPcmStream_t* pdu, Avtp_AafPcmStreamFields
*****************************************************************************/

int avtp_aaf_pdu_get(void *pdu,
Avtp_AafPcmStreamFields_t field, uint64_t *val)
Avtp_AafPcmStreamFields_t field, uint64_t *val)
{
return Avtp_AafPcmStream_GetField((Avtp_AafPcmStream_t*)pdu, field, val);
return Avtp_AafPcmStream_GetField((Avtp_AafPcmStream_t*)pdu, field, val);
}

int avtp_aaf_pdu_set(void *pdu, Avtp_AafPcmStreamFields_t field,
uint64_t val)
uint64_t val)
{
return Avtp_AafPcmStream_SetField((Avtp_AafPcmStream_t*)pdu, field, val);
return Avtp_AafPcmStream_SetField((Avtp_AafPcmStream_t*)pdu, field, val);
}

int avtp_aaf_pdu_init(void *pdu)
{
int res;
int res;

if (!pdu)
return -EINVAL;
if (!pdu)
return -EINVAL;

memset(pdu, 0, sizeof(Avtp_AafPcmStream_t));
memset(pdu, 0, sizeof(Avtp_AafPcmStream_t));

res = Avtp_AafPcmStream_SetField(pdu, AVTP_AAF_PCM_STREAM_FIELD_SUBTYPE, AVTP_SUBTYPE_AAF);
if (res < 0)
return res;
res = Avtp_AafPcmStream_SetField(pdu, AVTP_AAF_PCM_STREAM_FIELD_SUBTYPE, AVTP_SUBTYPE_AAF);
if (res < 0)
return res;

res = Avtp_AafPcmStream_SetField(pdu, AVTP_AAF_PCM_STREAM_FIELD_SV, 1);
if (res < 0)
return res;
res = Avtp_AafPcmStream_SetField(pdu, AVTP_AAF_PCM_STREAM_FIELD_SV, 1);
if (res < 0)
return res;

return 0;
return 0;
};

0 comments on commit 568382d

Please sign in to comment.