Lines Matching defs:layout
138 #define PICK_REORDER(layout)\
140 case FORMAT_I8: s->reorder_func = alsa_reorder_int8_out_ ##layout; break;\
141 case FORMAT_I16: s->reorder_func = alsa_reorder_int16_out_ ##layout; break;\
142 case FORMAT_I32: s->reorder_func = alsa_reorder_int32_out_ ##layout; break;\
143 case FORMAT_F32: s->reorder_func = alsa_reorder_f32_out_ ##layout; break;\
146 static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout, int out)
154 /* reordering is not needed for QUAD or 2_2 layout */
155 if (layout == AV_CH_LAYOUT_QUAD || layout == AV_CH_LAYOUT_2_2)
176 if (layout == AV_CH_LAYOUT_5POINT0_BACK || layout == AV_CH_LAYOUT_5POINT0)
178 else if (layout == AV_CH_LAYOUT_5POINT1_BACK || layout == AV_CH_LAYOUT_5POINT1)
180 else if (layout == AV_CH_LAYOUT_7POINT1)
197 uint64_t layout = ctx->streams[0]->codec->channel_layout;
293 if (channels > 2 && layout) {
294 if (find_reorder_func(s, *codec_id, layout, mode == SND_PCM_STREAM_PLAYBACK) < 0) {
296 av_get_channel_layout_string(name, sizeof(name), channels, layout);
297 av_log(ctx, AV_LOG_WARNING, "ALSA channel layout unknown or unimplemented for %s %s.\n",