1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 // 3 // This file is provided under a dual BSD/GPLv2 license. When using or 4 // redistributing this file, you may do so under either license. 5 // 6 // Copyright(c) 2018 Intel Corporation. All rights reserved. 7 // 8 // Authors: Keyon Jie <yang.jie@linux.intel.com> 9 // 10 11 #include <sound/pcm_params.h> 12 #include <sound/hdaudio_ext.h> 13 #include "../sof-priv.h" 14 #include "../sof-audio.h" 15 #include "hda.h" 16 17 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) 18 19 struct hda_pipe_params { 20 u32 ch; 21 u32 s_freq; 22 u32 s_fmt; 23 u8 linktype; 24 snd_pcm_format_t format; 25 int link_index; 26 int stream; 27 unsigned int link_bps; 28 }; 29 30 /* 31 * This function checks if the host dma channel corresponding 32 * to the link DMA stream_tag argument is assigned to one 33 * of the FEs connected to the BE DAI. 34 */ 35 static bool hda_check_fes(struct snd_soc_pcm_runtime *rtd, 36 int dir, int stream_tag) 37 { 38 struct snd_pcm_substream *fe_substream; 39 struct hdac_stream *fe_hstream; 40 struct snd_soc_dpcm *dpcm; 41 42 for_each_dpcm_fe(rtd, dir, dpcm) { 43 fe_substream = snd_soc_dpcm_get_substream(dpcm->fe, dir); 44 fe_hstream = fe_substream->runtime->private_data; 45 if (fe_hstream->stream_tag == stream_tag) 46 return true; 47 } 48 49 return false; 50 } 51 52 static struct hdac_ext_stream * 53 hda_link_stream_assign(struct hdac_bus *bus, 54 struct snd_pcm_substream *substream) 55 { 56 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 57 struct sof_intel_hda_stream *hda_stream; 58 const struct sof_intel_dsp_desc *chip; 59 struct snd_sof_dev *sdev; 60 struct hdac_ext_stream *res = NULL; 61 struct hdac_stream *hstream = NULL; 62 63 int stream_dir = substream->stream; 64 65 if (!bus->ppcap) { 66 dev_err(bus->dev, "stream type not supported\n"); 67 return NULL; 68 } 69 70 spin_lock_irq(&bus->reg_lock); 71 list_for_each_entry(hstream, &bus->stream_list, list) { 72 struct hdac_ext_stream *hext_stream = 73 stream_to_hdac_ext_stream(hstream); 74 if (hstream->direction != substream->stream) 75 continue; 76 77 hda_stream = hstream_to_sof_hda_stream(hext_stream); 78 sdev = hda_stream->sdev; 79 chip = get_chip_info(sdev->pdata); 80 81 /* check if link is available */ 82 if (!hext_stream->link_locked) { 83 /* 84 * choose the first available link for platforms that do not have the 85 * PROCEN_FMT_QUIRK set. 86 */ 87 if (!(chip->quirks & SOF_INTEL_PROCEN_FMT_QUIRK)) { 88 res = hext_stream; 89 break; 90 } 91 92 if (hstream->opened) { 93 /* 94 * check if the stream tag matches the stream 95 * tag of one of the connected FEs 96 */ 97 if (hda_check_fes(rtd, stream_dir, 98 hstream->stream_tag)) { 99 res = hext_stream; 100 break; 101 } 102 } else { 103 res = hext_stream; 104 105 /* 106 * This must be a hostless stream. 107 * So reserve the host DMA channel. 108 */ 109 hda_stream->host_reserved = 1; 110 break; 111 } 112 } 113 } 114 115 if (res) { 116 /* 117 * Decouple host and link DMA. The decoupled flag 118 * is updated in snd_hdac_ext_stream_decouple(). 119 */ 120 if (!res->decoupled) 121 snd_hdac_ext_stream_decouple_locked(bus, res, true); 122 123 res->link_locked = 1; 124 res->link_substream = substream; 125 } 126 spin_unlock_irq(&bus->reg_lock); 127 128 return res; 129 } 130 131 static int hda_link_dma_params(struct hdac_ext_stream *hext_stream, 132 struct hda_pipe_params *params) 133 { 134 struct hdac_stream *hstream = &hext_stream->hstream; 135 unsigned char stream_tag = hstream->stream_tag; 136 struct hdac_bus *bus = hstream->bus; 137 struct hdac_ext_link *link; 138 unsigned int format_val; 139 140 snd_hdac_ext_stream_decouple(bus, hext_stream, true); 141 snd_hdac_ext_link_stream_reset(hext_stream); 142 143 format_val = snd_hdac_calc_stream_format(params->s_freq, params->ch, 144 params->format, 145 params->link_bps, 0); 146 147 dev_dbg(bus->dev, "format_val=%d, rate=%d, ch=%d, format=%d\n", 148 format_val, params->s_freq, params->ch, params->format); 149 150 snd_hdac_ext_link_stream_setup(hext_stream, format_val); 151 152 if (hext_stream->hstream.direction == SNDRV_PCM_STREAM_PLAYBACK) { 153 list_for_each_entry(link, &bus->hlink_list, list) { 154 if (link->index == params->link_index) 155 snd_hdac_ext_link_set_stream_id(link, 156 stream_tag); 157 } 158 } 159 160 hext_stream->link_prepared = 1; 161 162 return 0; 163 } 164 165 /* Update config for the DAI widget */ 166 static struct sof_ipc_dai_config *hda_dai_update_config(struct snd_soc_dapm_widget *w, 167 int channel) 168 { 169 struct snd_sof_widget *swidget = w->dobj.private; 170 struct sof_ipc_dai_config *config; 171 struct snd_sof_dai *sof_dai; 172 173 if (!swidget) 174 return NULL; 175 176 sof_dai = swidget->private; 177 178 if (!sof_dai || !sof_dai->dai_config) { 179 dev_err(swidget->scomp->dev, "error: No config for DAI %s\n", w->name); 180 return NULL; 181 } 182 183 config = &sof_dai->dai_config[sof_dai->current_config]; 184 185 /* update config with stream tag */ 186 config->hda.link_dma_ch = channel; 187 188 return config; 189 } 190 191 static int hda_link_dai_widget_update(struct sof_intel_hda_stream *hda_stream, 192 struct snd_soc_dapm_widget *w, 193 int channel, bool widget_setup) 194 { 195 struct snd_sof_dev *sdev = hda_stream->sdev; 196 struct sof_ipc_dai_config *config; 197 198 config = hda_dai_update_config(w, channel); 199 if (!config) { 200 dev_err(sdev->dev, "error: no config for DAI %s\n", w->name); 201 return -ENOENT; 202 } 203 204 /* set up/free DAI widget and send DAI_CONFIG IPC */ 205 if (widget_setup) 206 return hda_ctrl_dai_widget_setup(w, SOF_DAI_CONFIG_FLAGS_2_STEP_STOP); 207 208 return hda_ctrl_dai_widget_free(w, SOF_DAI_CONFIG_FLAGS_NONE); 209 } 210 211 static int hda_link_hw_params(struct snd_pcm_substream *substream, 212 struct snd_pcm_hw_params *params, 213 struct snd_soc_dai *dai) 214 { 215 struct hdac_stream *hstream = substream->runtime->private_data; 216 struct hdac_bus *bus = hstream->bus; 217 struct hdac_ext_stream *hext_stream; 218 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 219 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 220 struct sof_intel_hda_stream *hda_stream; 221 struct hda_pipe_params p_params = {0}; 222 struct snd_soc_dapm_widget *w; 223 struct hdac_ext_link *link; 224 int stream_tag; 225 int ret; 226 227 /* get stored dma data if resuming from system suspend */ 228 hext_stream = snd_soc_dai_get_dma_data(dai, substream); 229 if (!hext_stream) { 230 hext_stream = hda_link_stream_assign(bus, substream); 231 if (!hext_stream) 232 return -EBUSY; 233 234 snd_soc_dai_set_dma_data(dai, substream, (void *)hext_stream); 235 } 236 237 stream_tag = hdac_stream(hext_stream)->stream_tag; 238 239 hda_stream = hstream_to_sof_hda_stream(hext_stream); 240 241 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 242 w = dai->playback_widget; 243 else 244 w = dai->capture_widget; 245 246 /* set up the DAI widget and send the DAI_CONFIG with the new tag */ 247 ret = hda_link_dai_widget_update(hda_stream, w, stream_tag - 1, true); 248 if (ret < 0) 249 return ret; 250 251 link = snd_hdac_ext_bus_get_link(bus, codec_dai->component->name); 252 if (!link) 253 return -EINVAL; 254 255 /* set the hdac_stream in the codec dai */ 256 snd_soc_dai_set_stream(codec_dai, hdac_stream(hext_stream), substream->stream); 257 258 p_params.s_fmt = snd_pcm_format_width(params_format(params)); 259 p_params.ch = params_channels(params); 260 p_params.s_freq = params_rate(params); 261 p_params.stream = substream->stream; 262 p_params.link_index = link->index; 263 p_params.format = params_format(params); 264 265 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 266 p_params.link_bps = codec_dai->driver->playback.sig_bits; 267 else 268 p_params.link_bps = codec_dai->driver->capture.sig_bits; 269 270 return hda_link_dma_params(hext_stream, &p_params); 271 } 272 273 static int hda_link_pcm_prepare(struct snd_pcm_substream *substream, 274 struct snd_soc_dai *dai) 275 { 276 struct hdac_ext_stream *hext_stream = 277 snd_soc_dai_get_dma_data(dai, substream); 278 struct snd_sof_dev *sdev = 279 snd_soc_component_get_drvdata(dai->component); 280 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 281 int stream = substream->stream; 282 283 if (hext_stream->link_prepared) 284 return 0; 285 286 dev_dbg(sdev->dev, "hda: prepare stream dir %d\n", substream->stream); 287 288 return hda_link_hw_params(substream, &rtd->dpcm[stream].hw_params, 289 dai); 290 } 291 292 static int hda_link_dai_config_pause_push_ipc(struct snd_soc_dapm_widget *w) 293 { 294 struct snd_sof_widget *swidget = w->dobj.private; 295 struct snd_soc_component *component = swidget->scomp; 296 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); 297 struct sof_ipc_dai_config *config; 298 struct snd_sof_dai *sof_dai; 299 struct sof_ipc_reply reply; 300 int ret; 301 302 sof_dai = swidget->private; 303 304 if (!sof_dai || !sof_dai->dai_config) { 305 dev_err(sdev->dev, "No config for DAI %s\n", w->name); 306 return -EINVAL; 307 } 308 309 config = &sof_dai->dai_config[sof_dai->current_config]; 310 311 /* set PAUSE command flag */ 312 config->flags = FIELD_PREP(SOF_DAI_CONFIG_FLAGS_CMD_MASK, SOF_DAI_CONFIG_FLAGS_PAUSE); 313 314 ret = sof_ipc_tx_message(sdev->ipc, config->hdr.cmd, config, config->hdr.size, 315 &reply, sizeof(reply)); 316 if (ret < 0) 317 dev_err(sdev->dev, "DAI config for %s failed during pause push\n", w->name); 318 319 return ret; 320 } 321 322 static int hda_link_pcm_trigger(struct snd_pcm_substream *substream, 323 int cmd, struct snd_soc_dai *dai) 324 { 325 struct hdac_ext_stream *hext_stream = 326 snd_soc_dai_get_dma_data(dai, substream); 327 struct sof_intel_hda_stream *hda_stream; 328 struct snd_soc_pcm_runtime *rtd; 329 struct snd_soc_dapm_widget *w; 330 struct hdac_ext_link *link; 331 struct hdac_stream *hstream; 332 struct hdac_bus *bus; 333 int stream_tag; 334 int ret; 335 336 hstream = substream->runtime->private_data; 337 bus = hstream->bus; 338 rtd = asoc_substream_to_rtd(substream); 339 340 link = snd_hdac_ext_bus_get_link(bus, asoc_rtd_to_codec(rtd, 0)->component->name); 341 if (!link) 342 return -EINVAL; 343 344 hda_stream = hstream_to_sof_hda_stream(hext_stream); 345 346 dev_dbg(dai->dev, "In %s cmd=%d\n", __func__, cmd); 347 348 w = snd_soc_dai_get_widget(dai, substream->stream); 349 350 switch (cmd) { 351 case SNDRV_PCM_TRIGGER_START: 352 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 353 snd_hdac_ext_link_stream_start(hext_stream); 354 break; 355 case SNDRV_PCM_TRIGGER_SUSPEND: 356 case SNDRV_PCM_TRIGGER_STOP: 357 snd_hdac_ext_link_stream_clear(hext_stream); 358 359 /* 360 * free DAI widget during stop/suspend to keep widget use_count's balanced. 361 */ 362 ret = hda_link_dai_widget_update(hda_stream, w, DMA_CHAN_INVALID, false); 363 if (ret < 0) 364 return ret; 365 366 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 367 stream_tag = hdac_stream(hext_stream)->stream_tag; 368 snd_hdac_ext_link_clear_stream_id(link, stream_tag); 369 } 370 371 hext_stream->link_prepared = 0; 372 break; 373 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 374 snd_hdac_ext_link_stream_clear(hext_stream); 375 376 ret = hda_link_dai_config_pause_push_ipc(w); 377 if (ret < 0) 378 return ret; 379 break; 380 default: 381 return -EINVAL; 382 } 383 return 0; 384 } 385 386 static int hda_link_hw_free(struct snd_pcm_substream *substream, 387 struct snd_soc_dai *dai) 388 { 389 unsigned int stream_tag; 390 struct sof_intel_hda_stream *hda_stream; 391 struct hdac_bus *bus; 392 struct hdac_ext_link *link; 393 struct hdac_stream *hstream; 394 struct snd_soc_pcm_runtime *rtd; 395 struct hdac_ext_stream *hext_stream; 396 struct snd_soc_dapm_widget *w; 397 int ret; 398 399 hstream = substream->runtime->private_data; 400 bus = hstream->bus; 401 rtd = asoc_substream_to_rtd(substream); 402 hext_stream = snd_soc_dai_get_dma_data(dai, substream); 403 404 if (!hext_stream) { 405 dev_dbg(dai->dev, 406 "%s: hext_stream is not assigned\n", __func__); 407 return -EINVAL; 408 } 409 410 hda_stream = hstream_to_sof_hda_stream(hext_stream); 411 412 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 413 w = dai->playback_widget; 414 else 415 w = dai->capture_widget; 416 417 /* free the link DMA channel in the FW and the DAI widget */ 418 ret = hda_link_dai_widget_update(hda_stream, w, DMA_CHAN_INVALID, false); 419 if (ret < 0) 420 return ret; 421 422 link = snd_hdac_ext_bus_get_link(bus, asoc_rtd_to_codec(rtd, 0)->component->name); 423 if (!link) 424 return -EINVAL; 425 426 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 427 stream_tag = hdac_stream(hext_stream)->stream_tag; 428 snd_hdac_ext_link_clear_stream_id(link, stream_tag); 429 } 430 431 snd_soc_dai_set_dma_data(dai, substream, NULL); 432 snd_hdac_ext_stream_release(hext_stream, HDAC_EXT_STREAM_TYPE_LINK); 433 hext_stream->link_prepared = 0; 434 435 /* free the host DMA channel reserved by hostless streams */ 436 hda_stream->host_reserved = 0; 437 438 return 0; 439 } 440 441 static const struct snd_soc_dai_ops hda_link_dai_ops = { 442 .hw_params = hda_link_hw_params, 443 .hw_free = hda_link_hw_free, 444 .trigger = hda_link_pcm_trigger, 445 .prepare = hda_link_pcm_prepare, 446 }; 447 448 #endif 449 450 /* only one flag used so far to harden hw_params/hw_free/trigger/prepare */ 451 struct ssp_dai_dma_data { 452 bool setup; 453 }; 454 455 static int ssp_dai_setup_or_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai, 456 bool setup) 457 { 458 struct snd_soc_component *component; 459 struct snd_sof_widget *swidget; 460 struct snd_soc_dapm_widget *w; 461 struct sof_ipc_fw_version *v; 462 struct snd_sof_dev *sdev; 463 464 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 465 w = dai->playback_widget; 466 else 467 w = dai->capture_widget; 468 469 swidget = w->dobj.private; 470 component = swidget->scomp; 471 sdev = snd_soc_component_get_drvdata(component); 472 v = &sdev->fw_ready.version; 473 474 /* DAI_CONFIG IPC during hw_params is not supported in older firmware */ 475 if (v->abi_version < SOF_ABI_VER(3, 18, 0)) 476 return 0; 477 478 if (setup) 479 return hda_ctrl_dai_widget_setup(w, SOF_DAI_CONFIG_FLAGS_NONE); 480 481 return hda_ctrl_dai_widget_free(w, SOF_DAI_CONFIG_FLAGS_NONE); 482 } 483 484 static int ssp_dai_startup(struct snd_pcm_substream *substream, 485 struct snd_soc_dai *dai) 486 { 487 struct ssp_dai_dma_data *dma_data; 488 489 dma_data = kzalloc(sizeof(*dma_data), GFP_KERNEL); 490 if (!dma_data) 491 return -ENOMEM; 492 493 snd_soc_dai_set_dma_data(dai, substream, dma_data); 494 495 return 0; 496 } 497 498 static int ssp_dai_setup(struct snd_pcm_substream *substream, 499 struct snd_soc_dai *dai, 500 bool setup) 501 { 502 struct ssp_dai_dma_data *dma_data; 503 int ret = 0; 504 505 dma_data = snd_soc_dai_get_dma_data(dai, substream); 506 if (!dma_data) { 507 dev_err(dai->dev, "%s: failed to get dma_data\n", __func__); 508 return -EIO; 509 } 510 511 if (dma_data->setup != setup) { 512 ret = ssp_dai_setup_or_free(substream, dai, setup); 513 if (!ret) 514 dma_data->setup = setup; 515 } 516 return ret; 517 } 518 519 static int ssp_dai_hw_params(struct snd_pcm_substream *substream, 520 struct snd_pcm_hw_params *params, 521 struct snd_soc_dai *dai) 522 { 523 /* params are ignored for now */ 524 return ssp_dai_setup(substream, dai, true); 525 } 526 527 static int ssp_dai_prepare(struct snd_pcm_substream *substream, 528 struct snd_soc_dai *dai) 529 { 530 /* 531 * the SSP will only be reconfigured during resume operations and 532 * not in case of xruns 533 */ 534 return ssp_dai_setup(substream, dai, true); 535 } 536 537 static int ssp_dai_trigger(struct snd_pcm_substream *substream, 538 int cmd, struct snd_soc_dai *dai) 539 { 540 if (cmd != SNDRV_PCM_TRIGGER_SUSPEND) 541 return 0; 542 543 return ssp_dai_setup(substream, dai, false); 544 } 545 546 static int ssp_dai_hw_free(struct snd_pcm_substream *substream, 547 struct snd_soc_dai *dai) 548 { 549 return ssp_dai_setup(substream, dai, false); 550 } 551 552 static void ssp_dai_shutdown(struct snd_pcm_substream *substream, 553 struct snd_soc_dai *dai) 554 { 555 struct ssp_dai_dma_data *dma_data; 556 557 dma_data = snd_soc_dai_get_dma_data(dai, substream); 558 if (!dma_data) { 559 dev_err(dai->dev, "%s: failed to get dma_data\n", __func__); 560 return; 561 } 562 snd_soc_dai_set_dma_data(dai, substream, NULL); 563 kfree(dma_data); 564 } 565 566 static const struct snd_soc_dai_ops ssp_dai_ops = { 567 .startup = ssp_dai_startup, 568 .hw_params = ssp_dai_hw_params, 569 .prepare = ssp_dai_prepare, 570 .trigger = ssp_dai_trigger, 571 .hw_free = ssp_dai_hw_free, 572 .shutdown = ssp_dai_shutdown, 573 }; 574 575 /* 576 * common dai driver for skl+ platforms. 577 * some products who use this DAI array only physically have a subset of 578 * the DAIs, but no harm is done here by adding the whole set. 579 */ 580 struct snd_soc_dai_driver skl_dai[] = { 581 { 582 .name = "SSP0 Pin", 583 .ops = &ssp_dai_ops, 584 .playback = { 585 .channels_min = 1, 586 .channels_max = 8, 587 }, 588 .capture = { 589 .channels_min = 1, 590 .channels_max = 8, 591 }, 592 }, 593 { 594 .name = "SSP1 Pin", 595 .ops = &ssp_dai_ops, 596 .playback = { 597 .channels_min = 1, 598 .channels_max = 8, 599 }, 600 .capture = { 601 .channels_min = 1, 602 .channels_max = 8, 603 }, 604 }, 605 { 606 .name = "SSP2 Pin", 607 .ops = &ssp_dai_ops, 608 .playback = { 609 .channels_min = 1, 610 .channels_max = 8, 611 }, 612 .capture = { 613 .channels_min = 1, 614 .channels_max = 8, 615 }, 616 }, 617 { 618 .name = "SSP3 Pin", 619 .ops = &ssp_dai_ops, 620 .playback = { 621 .channels_min = 1, 622 .channels_max = 8, 623 }, 624 .capture = { 625 .channels_min = 1, 626 .channels_max = 8, 627 }, 628 }, 629 { 630 .name = "SSP4 Pin", 631 .ops = &ssp_dai_ops, 632 .playback = { 633 .channels_min = 1, 634 .channels_max = 8, 635 }, 636 .capture = { 637 .channels_min = 1, 638 .channels_max = 8, 639 }, 640 }, 641 { 642 .name = "SSP5 Pin", 643 .ops = &ssp_dai_ops, 644 .playback = { 645 .channels_min = 1, 646 .channels_max = 8, 647 }, 648 .capture = { 649 .channels_min = 1, 650 .channels_max = 8, 651 }, 652 }, 653 { 654 .name = "DMIC01 Pin", 655 .capture = { 656 .channels_min = 1, 657 .channels_max = 4, 658 }, 659 }, 660 { 661 .name = "DMIC16k Pin", 662 .capture = { 663 .channels_min = 1, 664 .channels_max = 4, 665 }, 666 }, 667 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) 668 { 669 .name = "iDisp1 Pin", 670 .ops = &hda_link_dai_ops, 671 .playback = { 672 .channels_min = 1, 673 .channels_max = 8, 674 }, 675 }, 676 { 677 .name = "iDisp2 Pin", 678 .ops = &hda_link_dai_ops, 679 .playback = { 680 .channels_min = 1, 681 .channels_max = 8, 682 }, 683 }, 684 { 685 .name = "iDisp3 Pin", 686 .ops = &hda_link_dai_ops, 687 .playback = { 688 .channels_min = 1, 689 .channels_max = 8, 690 }, 691 }, 692 { 693 .name = "iDisp4 Pin", 694 .ops = &hda_link_dai_ops, 695 .playback = { 696 .channels_min = 1, 697 .channels_max = 8, 698 }, 699 }, 700 { 701 .name = "Analog CPU DAI", 702 .ops = &hda_link_dai_ops, 703 .playback = { 704 .channels_min = 1, 705 .channels_max = 16, 706 }, 707 .capture = { 708 .channels_min = 1, 709 .channels_max = 16, 710 }, 711 }, 712 { 713 .name = "Digital CPU DAI", 714 .ops = &hda_link_dai_ops, 715 .playback = { 716 .channels_min = 1, 717 .channels_max = 16, 718 }, 719 .capture = { 720 .channels_min = 1, 721 .channels_max = 16, 722 }, 723 }, 724 { 725 .name = "Alt Analog CPU DAI", 726 .ops = &hda_link_dai_ops, 727 .playback = { 728 .channels_min = 1, 729 .channels_max = 16, 730 }, 731 .capture = { 732 .channels_min = 1, 733 .channels_max = 16, 734 }, 735 }, 736 #endif 737 }; 738