Skip to content

Commit bca7bf4

Browse files
singalsukv2019i
authored andcommitted
Audio: Mux: Code formatting changes
These style changes improve code readability. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 84ecf46 commit bca7bf4

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

src/audio/mux/mux.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
static const struct comp_driver comp_mux;
3434

3535
LOG_MODULE_REGISTER(muxdemux, CONFIG_SOF_LOG_LEVEL);
36+
3637
#if CONFIG_IPC_MAJOR_3
3738
/* c607ff4d-9cb6-49dc-b678-7da3c63ea557 */
3839
DECLARE_SOF_RT_UUID("mux", mux_uuid, 0xc607ff4d, 0x9cb6, 0x49dc,
@@ -46,7 +47,7 @@ DECLARE_TR_CTX(mux_tr, SOF_UUID(mux_uuid), LOG_LEVEL_INFO);
4647

4748
/* c4b26868-1430-470e-a089-15d1c77f851a */
4849
DECLARE_SOF_RT_UUID("demux", demux_uuid, 0xc4b26868, 0x1430, 0x470e,
49-
0xa0, 0x89, 0x15, 0xd1, 0xc7, 0x7f, 0x85, 0x1a);
50+
0xa0, 0x89, 0x15, 0xd1, 0xc7, 0x7f, 0x85, 0x1a);
5051

5152
DECLARE_TR_CTX(demux_tr, SOF_UUID(demux_uuid), LOG_LEVEL_INFO);
5253

@@ -561,8 +562,7 @@ static void mux_prepare_active_look_up(struct comp_dev *dev,
561562
(sink->channels - 1)))
562563
continue;
563564

564-
cd->active_lookup.copy_elem[active_elem] =
565-
cd->lookup[0].copy_elem[elem];
565+
cd->active_lookup.copy_elem[active_elem] = cd->lookup[0].copy_elem[elem];
566566
active_elem++;
567567
cd->active_lookup.num_elems = active_elem;
568568
}

src/audio/mux/mux_generic.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,13 @@ static uint32_t mux_calc_frames_without_wrap_s32(struct comp_dev *dev,
280280
* sink buffer (mux has one sink buffer), so dest min_frames
281281
* calculation based only on lookup table first element is sufficient.
282282
*/
283-
ptr = (int32_t *)lookup->copy_elem[0].dest -
284-
lookup->copy_elem[0].out_ch;
283+
ptr = (int32_t *)lookup->copy_elem[0].dest - lookup->copy_elem[0].out_ch;
285284
min_frames = audio_stream_frames_without_wrap(sink, ptr);
286285

287286
for (elem = 0; elem < lookup->num_elems; elem++) {
288287
source = sources[lookup->copy_elem[elem].stream_id];
289288

290-
ptr = (int32_t *)lookup->copy_elem[elem].src -
291-
lookup->copy_elem[elem].in_ch;
289+
ptr = (int32_t *)lookup->copy_elem[elem].src - lookup->copy_elem[elem].in_ch;
292290
frames = audio_stream_frames_without_wrap(source, ptr);
293291

294292
min_frames = (frames < min_frames) ? frames : min_frames;
@@ -311,12 +309,10 @@ static uint32_t demux_calc_frames_without_wrap_s32(struct comp_dev *dev,
311309
* each copy_elem refers to the same sink/source buffer, so min_frames
312310
* calculation based only on lookup table first element is sufficient.
313311
*/
314-
ptr = (int32_t *)lookup->copy_elem[0].dest -
315-
lookup->copy_elem[0].out_ch;
312+
ptr = (int32_t *)lookup->copy_elem[0].dest - lookup->copy_elem[0].out_ch;
316313
min_frames = audio_stream_frames_without_wrap(sink, ptr);
317314

318-
ptr = (int32_t *)lookup->copy_elem[0].src -
319-
lookup->copy_elem[0].in_ch;
315+
ptr = (int32_t *)lookup->copy_elem[0].src - lookup->copy_elem[0].in_ch;
320316
frames = audio_stream_frames_without_wrap(source, ptr);
321317

322318
min_frames = (frames < min_frames) ? frames : min_frames;
@@ -503,8 +499,7 @@ void mux_prepare_look_up_table(struct comp_dev *dev)
503499
/* MUX component has only one sink */
504500
cd->lookup[0].copy_elem[idx].in_ch = j;
505501
cd->lookup[0].copy_elem[idx].out_ch = k;
506-
cd->lookup[0].copy_elem[idx].stream_id =
507-
i;
502+
cd->lookup[0].copy_elem[idx].stream_id = i;
508503
cd->lookup[0].num_elems = ++idx;
509504
}
510505
}
@@ -529,8 +524,7 @@ void demux_prepare_look_up_table(struct comp_dev *dev)
529524
/* DEMUX component has only one source */
530525
cd->lookup[i].copy_elem[idx].in_ch = k;
531526
cd->lookup[i].copy_elem[idx].out_ch = j;
532-
cd->lookup[i].copy_elem[idx].stream_id =
533-
i;
527+
cd->lookup[i].copy_elem[idx].stream_id = i;
534528
cd->lookup[i].num_elems = ++idx;
535529
}
536530
}

0 commit comments

Comments
 (0)