- /*
- * If multiple receivers are given for this audio format, the
- * last one wins and we have to free the previous receiver
- * config here. Since we are iterating backwards, the winning
- * receiver arg is in fact the first one given.
- */
- if (afi[ret].receiver_conf)
- afi[ret].receiver->free_config(afi[ret].receiver_conf);
- afi[ret].receiver_conf = check_receiver_arg(recv_arg, &receiver_num);
- if (!afi[ret].receiver_conf) {
+ af_mask = ret;
+ FOR_EACH_AUDIO_FORMAT(j) {
+ a = afi + j;
+ if ((af_mask & (1 << j)) == 0) /* no match */
+ continue;
+ /*
+ * If multiple receivers are given for this audio format, the
+ * last one wins and we have to free the previous receiver
+ * config here. Since we are iterating backwards, the winning
+ * receiver arg is in fact the first one given.
+ */
+ if (a->receiver_conf)
+ a->receiver->free_config(a->receiver_conf);
+ a->receiver_conf = check_receiver_arg(recv_arg, &receiver_num);