+ struct alsa_write_args_info *conf = wn->conf;
+ if (bytes == 0) /* no data available */
+ return;
+ /* defaults */
+ pad->sample_rate = conf->sample_rate_arg;
+ pad->channels = conf->channels_arg;
+ if (!conf->sample_rate_given) { /* config option trumps btr_exec */
+ int32_t rate;
+ if (get_btr_sample_rate(btrn, &rate) >= 0)
+ pad->sample_rate = rate;
+ }
+ if (!conf->channels_given) {
+ int32_t ch;
+ if (get_btr_channels(btrn, &ch) >= 0)
+ pad->channels = ch;
+ }
+ PARA_INFO_LOG("%d channel(s), %dHz\n", pad->channels, pad->sample_rate);
+ ret = alsa_init(pad, wn->conf);
+ if (ret < 0)
+ goto err;
+ wn->min_iqs = pad->bytes_per_frame;