- /* Hmmm, let's choose PCM format */
- /* We tell the Output Unit what format we're going to supply data to it.
- * This is necessary if you're providing data through an input callback
- * AND you want the DefaultOutputUnit to do any format conversions
- * necessary from your format to the device's format.
+ powd->sample_rate = conf->sample_rate_arg;
+ powd->channels = conf->channels_arg;
+ if (!conf->sample_rate_given) {
+ int32_t rate;
+ get_btr_sample_rate(btrn, &rate);
+ powd->sample_rate = rate;
+ }
+ if (!conf->channels_given) {
+ int32_t ch;
+ get_btr_channels(btrn, &ch);
+ powd->channels = ch;
+ }
+ /*
+ * Choose PCM format. We tell the Output Unit what format we're going
+ * to supply data to it. This is necessary if you're providing data
+ * through an input callback AND you want the DefaultOutputUnit to do
+ * any format conversions necessary from your format to the device's
+ * format.