1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2009 Ariff Abdullah <ariff@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $FreeBSD$ 29 */ 30 31 #ifndef _SND_MATRIX_MAP_H_ 32 #define _SND_MATRIX_MAP_H_ 33 34 /* 35 * Standard matrix maps: 36 * 37 * struct pcmchan_matrix { 38 * .id = Matrix identity (see matrix.h). Custom defined should use 39 * one of SND_CHN_MATRIX_MISC (for whatever purposes) or 40 * SND_CHN_MATRIX_DRV (hardware driver). 41 * .channels = Total number of channels, including whatever 'extended' 42 * (the X.ext notions, mostly LFE). 43 * .ext = Total number of extended channels (LFE). 44 * .map = { 45 * Sequences of channel type and interleave structure. 46 * [interleave offset] = { 47 * .type = channel type (see matrix.h). 48 * .members = Masks of channels that is acceptable as a 49 * member of this channel type. 50 * }, 51 * [total channels] = { 52 * .type = Maximum channels marker (SND_CHN_T_MAX). 53 * .members = 0 (no channels allowed here). 54 * }, 55 * }, 56 * .mask = Mask of channels that exist in this map. 57 * .offset = { 58 * channel offset that directly translate to the above interleave 59 * offset according to SND_CHN_T_* definitions. 60 * } 61 * }; 62 * 63 * Rule of thumb: Avoid using SND_CHN_T_* that is marked with XXX (matrix.h), 64 * or be prepared for the horror to come. 65 * 66 */ 67 68 #define SND_CHN_MATRIX_MAP_1_0 { \ 69 .id = SND_CHN_MATRIX_1_0, \ 70 .channels = 1, \ 71 .ext = 0, \ 72 .map = { \ 73 /* Mono, center, etc. */ \ 74 [0] = { \ 75 .type = SND_CHN_T_FL, \ 76 .members = \ 77 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 78 SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF | \ 79 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 80 SND_CHN_T_MASK_BC | SND_CHN_T_MASK_SL | \ 81 SND_CHN_T_MASK_SR \ 82 }, \ 83 [1] = { \ 84 .type = SND_CHN_T_MAX, \ 85 .members = 0 \ 86 } \ 87 }, \ 88 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 89 SND_CHN_T_MASK_FC, \ 90 .offset = { 0, 0, 0, 0, 0, 0, -1, -1, 0, \ 91 0, 0, -1, -1, -1, -1, -1, -1, -1 } \ 92 } 93 94 #define SND_CHN_MATRIX_MAP_2_0 { \ 95 .id = SND_CHN_MATRIX_2_0, \ 96 .channels = 2, \ 97 .ext = 0, \ 98 .map = { \ 99 /* Left */ \ 100 [0] = { \ 101 .type = SND_CHN_T_FL, \ 102 .members = \ 103 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FC | \ 104 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BL | \ 105 SND_CHN_T_MASK_BC | SND_CHN_T_MASK_SL \ 106 }, \ 107 /* Right */ \ 108 [1] = { \ 109 .type = SND_CHN_T_FR, \ 110 .members = \ 111 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_FC | \ 112 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BR | \ 113 SND_CHN_T_MASK_BC | SND_CHN_T_MASK_SR \ 114 }, \ 115 [2] = { \ 116 .type = SND_CHN_T_MAX, \ 117 .members = 0 \ 118 } \ 119 }, \ 120 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR, \ 121 .offset = { 0, 1, -1, -1, -1, -1, -1, -1, -1, \ 122 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 123 } 124 125 #define SND_CHN_MATRIX_MAP_2_1 { \ 126 .id = SND_CHN_MATRIX_2_1, \ 127 .channels = 3, \ 128 .ext = 1, \ 129 .map = { \ 130 /* Left */ \ 131 [0] = { \ 132 .type = SND_CHN_T_FL, \ 133 .members = \ 134 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FC | \ 135 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BC | \ 136 SND_CHN_T_MASK_SL \ 137 }, \ 138 /* Right */ \ 139 [1] = { \ 140 .type = SND_CHN_T_FR, \ 141 .members = \ 142 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_FC | \ 143 SND_CHN_T_MASK_BR | SND_CHN_T_MASK_BC | \ 144 SND_CHN_T_MASK_SR \ 145 }, \ 146 /* LFE */ \ 147 [2] = { \ 148 .type = SND_CHN_T_LF, \ 149 .members = SND_CHN_T_MASK_LF \ 150 }, \ 151 [3] = { \ 152 .type = SND_CHN_T_MAX, \ 153 .members = 0 \ 154 } \ 155 }, \ 156 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 157 SND_CHN_T_MASK_LF, \ 158 .offset = { 0, 1, -1, 2, -1, -1, -1, -1, -1, \ 159 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 160 } 161 162 #define SND_CHN_MATRIX_MAP_3_0 { /* 3 channels default */ \ 163 .id = SND_CHN_MATRIX_3_0, \ 164 .channels = 3, \ 165 .ext = 0, \ 166 .map = { \ 167 /* Left */ \ 168 [0] = { \ 169 .type = SND_CHN_T_FL, \ 170 .members = \ 171 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FC | \ 172 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_SL \ 173 }, \ 174 /* Right */ \ 175 [1] = { \ 176 .type = SND_CHN_T_FR, \ 177 .members = \ 178 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_FC | \ 179 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_SR \ 180 }, \ 181 /* Rear Center */ \ 182 [2] = { \ 183 .type = SND_CHN_T_BC, \ 184 .members = \ 185 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BL | \ 186 SND_CHN_T_MASK_BR | SND_CHN_T_MASK_BC | \ 187 SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR \ 188 }, \ 189 [3] = { \ 190 .type = SND_CHN_T_MAX, \ 191 .members = 0 \ 192 } \ 193 }, \ 194 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 195 SND_CHN_T_MASK_BC, \ 196 .offset = { 0, 1, -1, -1, -1, -1, -1, -1, 2, \ 197 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 198 } 199 200 #define SND_CHN_MATRIX_MAP_3_1 { \ 201 .id = SND_CHN_MATRIX_3_1, \ 202 .channels = 4, \ 203 .ext = 1, \ 204 .map = { \ 205 /* Left */ \ 206 [0] = { \ 207 .type = SND_CHN_T_FL, \ 208 .members = \ 209 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FC | \ 210 SND_CHN_T_MASK_SL \ 211 }, \ 212 /* Right */ \ 213 [1] = { \ 214 .type = SND_CHN_T_FR, \ 215 .members = \ 216 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_FC | \ 217 SND_CHN_T_MASK_SR \ 218 }, \ 219 /* LFE */ \ 220 [2] = { \ 221 .type = SND_CHN_T_LF, \ 222 .members = SND_CHN_T_MASK_LF \ 223 }, \ 224 /* Rear Center */ \ 225 [3] = { \ 226 .type = SND_CHN_T_BC, \ 227 .members = \ 228 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 229 SND_CHN_T_MASK_BC | \ 230 SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR \ 231 }, \ 232 [4] = { \ 233 .type = SND_CHN_T_MAX, \ 234 .members = 0 \ 235 } \ 236 }, \ 237 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 238 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BC, \ 239 .offset = { 0, 1, -1, 2, -1, -1, -1, -1, 3, \ 240 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 241 } 242 243 #define SND_CHN_MATRIX_MAP_4_0 { \ 244 .id = SND_CHN_MATRIX_4_0, \ 245 .channels = 4, \ 246 .ext = 0, \ 247 .map = { \ 248 /* Left */ \ 249 [0] = { \ 250 .type = SND_CHN_T_FL, \ 251 .members = \ 252 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FC | \ 253 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_SL \ 254 }, \ 255 /* Right */ \ 256 [1] = { \ 257 .type = SND_CHN_T_FR, \ 258 .members = \ 259 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_FC | \ 260 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_SR \ 261 }, \ 262 /* Rear Left */ \ 263 [2] = { \ 264 .type = SND_CHN_T_BL, \ 265 .members = \ 266 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BL | \ 267 SND_CHN_T_MASK_BC | SND_CHN_T_MASK_SL \ 268 }, \ 269 /* Rear Right */ \ 270 [3] = { \ 271 .type = SND_CHN_T_BR, \ 272 .members = \ 273 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BR | \ 274 SND_CHN_T_MASK_BC | SND_CHN_T_MASK_SR \ 275 }, \ 276 [4] = { \ 277 .type = SND_CHN_T_MAX, \ 278 .members = 0 \ 279 } \ 280 }, \ 281 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 282 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR, \ 283 .offset = { 0, 1, -1, -1, 2, 3, -1, -1, -1, \ 284 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 285 } 286 287 #define SND_CHN_MATRIX_MAP_4_1 { \ 288 .id = SND_CHN_MATRIX_4_1, \ 289 .channels = 5, \ 290 .ext = 1, \ 291 .map = { \ 292 /* Left */ \ 293 [0] = { \ 294 .type = SND_CHN_T_FL, \ 295 .members = \ 296 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FC | \ 297 SND_CHN_T_MASK_SL \ 298 }, \ 299 /* Right */ \ 300 [1] = { \ 301 .type = SND_CHN_T_FR, \ 302 .members = \ 303 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_FC | \ 304 SND_CHN_T_MASK_SR \ 305 }, \ 306 /* Rear Left */ \ 307 [2] = { \ 308 .type = SND_CHN_T_BL, \ 309 .members = \ 310 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BC | \ 311 SND_CHN_T_MASK_SL \ 312 }, \ 313 /* Rear Right */ \ 314 [3] = { \ 315 .type = SND_CHN_T_BR, \ 316 .members = \ 317 SND_CHN_T_MASK_BR | SND_CHN_T_MASK_BC | \ 318 SND_CHN_T_MASK_SR \ 319 }, \ 320 /* LFE */ \ 321 [4] = { \ 322 .type = SND_CHN_T_LF, \ 323 .members = SND_CHN_T_MASK_LF \ 324 }, \ 325 [5] = { \ 326 .type = SND_CHN_T_MAX, \ 327 .members = 0 \ 328 } \ 329 }, \ 330 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 331 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 332 SND_CHN_T_MASK_LF, \ 333 .offset = { 0, 1, -1, 4, 2, 3, -1, -1, -1, \ 334 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 335 } 336 337 #define SND_CHN_MATRIX_MAP_5_0 { /* 5 channels default */ \ 338 .id = SND_CHN_MATRIX_5_0, \ 339 .channels = 5, \ 340 .ext = 0, \ 341 .map = { \ 342 /* Left */ \ 343 [0] = { \ 344 .type = SND_CHN_T_FL, \ 345 .members = \ 346 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_LF | \ 347 SND_CHN_T_MASK_SL \ 348 }, \ 349 /* Right */ \ 350 [1] = { \ 351 .type = SND_CHN_T_FR, \ 352 .members = \ 353 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_LF | \ 354 SND_CHN_T_MASK_SR \ 355 }, \ 356 /* Rear Left */ \ 357 [2] = { \ 358 .type = SND_CHN_T_BL, \ 359 .members = \ 360 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BL | \ 361 SND_CHN_T_MASK_BC | SND_CHN_T_MASK_SL \ 362 }, \ 363 /* Rear Right */ \ 364 [3] = { \ 365 .type = SND_CHN_T_BR, \ 366 .members = \ 367 SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BR | \ 368 SND_CHN_T_MASK_BC | SND_CHN_T_MASK_SR \ 369 }, \ 370 /* Center */ \ 371 [4] = { \ 372 .type = SND_CHN_T_FC, \ 373 .members = SND_CHN_T_MASK_FC \ 374 }, \ 375 [5] = { \ 376 .type = SND_CHN_T_MAX, \ 377 .members = 0 \ 378 } \ 379 }, \ 380 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 381 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 382 SND_CHN_T_MASK_FC, \ 383 .offset = { 0, 1, 4, -1, 2, 3, -1, -1, -1, \ 384 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 385 } 386 387 #define SND_CHN_MATRIX_MAP_5_1 { /* 6 channels default */ \ 388 .id = SND_CHN_MATRIX_5_1, \ 389 .channels = 6, \ 390 .ext = 1, \ 391 .map = { \ 392 /* Left */ \ 393 [0] = { \ 394 .type = SND_CHN_T_FL, \ 395 .members = \ 396 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_SL \ 397 }, \ 398 /* Right */ \ 399 [1] = { \ 400 .type = SND_CHN_T_FR, \ 401 .members = \ 402 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_SR \ 403 }, \ 404 /* Rear Left */ \ 405 [2] = { \ 406 .type = SND_CHN_T_BL, \ 407 .members = \ 408 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BC | \ 409 SND_CHN_T_MASK_SL \ 410 }, \ 411 /* Rear Right */ \ 412 [3] = { \ 413 .type = SND_CHN_T_BR, \ 414 .members = \ 415 SND_CHN_T_MASK_BR | SND_CHN_T_MASK_BC | \ 416 SND_CHN_T_MASK_SR \ 417 }, \ 418 /* Center */ \ 419 [4] = { \ 420 .type = SND_CHN_T_FC, \ 421 .members = SND_CHN_T_MASK_FC \ 422 }, \ 423 /* LFE */ \ 424 [5] = { \ 425 .type = SND_CHN_T_LF, \ 426 .members = SND_CHN_T_MASK_LF \ 427 }, \ 428 [6] = { \ 429 .type = SND_CHN_T_MAX, \ 430 .members = 0 \ 431 } \ 432 }, \ 433 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 434 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 435 SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF, \ 436 .offset = { 0, 1, 4, 5, 2, 3, -1, -1, -1, \ 437 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 438 } 439 440 #define SND_CHN_MATRIX_MAP_6_0 { \ 441 .id = SND_CHN_MATRIX_6_0, \ 442 .channels = 6, \ 443 .ext = 0, \ 444 .map = { \ 445 /* Left */ \ 446 [0] = { \ 447 .type = SND_CHN_T_FL, \ 448 .members = \ 449 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_LF | \ 450 SND_CHN_T_MASK_SL \ 451 }, \ 452 /* Right */ \ 453 [1] = { \ 454 .type = SND_CHN_T_FR, \ 455 .members = \ 456 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_LF | \ 457 SND_CHN_T_MASK_SR \ 458 }, \ 459 /* Rear Left */ \ 460 [2] = { \ 461 .type = SND_CHN_T_BL, \ 462 .members = \ 463 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_LF | \ 464 SND_CHN_T_MASK_SL \ 465 }, \ 466 /* Rear Right */ \ 467 [3] = { \ 468 .type = SND_CHN_T_BR, \ 469 .members = \ 470 SND_CHN_T_MASK_BR | SND_CHN_T_MASK_LF | \ 471 SND_CHN_T_MASK_SR \ 472 }, \ 473 /* Center */ \ 474 [4] = { \ 475 .type = SND_CHN_T_FC, \ 476 .members = SND_CHN_T_MASK_FC \ 477 }, \ 478 /* Rear Center */ \ 479 [5] = { \ 480 .type = SND_CHN_T_BC, \ 481 .members = SND_CHN_T_MASK_BC \ 482 }, \ 483 [6] = { \ 484 .type = SND_CHN_T_MAX, \ 485 .members = 0 \ 486 } \ 487 }, \ 488 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 489 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 490 SND_CHN_T_MASK_FC | SND_CHN_T_MASK_BC, \ 491 .offset = { 0, 1, 4, -1, 2, 3, -1, -1, 5, \ 492 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 493 } 494 495 #define SND_CHN_MATRIX_MAP_6_1 { \ 496 .id = SND_CHN_MATRIX_6_1, \ 497 .channels = 7, \ 498 .ext = 1, \ 499 .map = { \ 500 /* Left */ \ 501 [0] = { \ 502 .type = SND_CHN_T_FL, \ 503 .members = \ 504 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_SL \ 505 }, \ 506 /* Right */ \ 507 [1] = { \ 508 .type = SND_CHN_T_FR, \ 509 .members = \ 510 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_SR \ 511 }, \ 512 /* Rear Left */ \ 513 [2] = { \ 514 .type = SND_CHN_T_BL, \ 515 .members = \ 516 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_SL \ 517 }, \ 518 /* Rear Right */ \ 519 [3] = { \ 520 .type = SND_CHN_T_BR, \ 521 .members = \ 522 SND_CHN_T_MASK_BR | SND_CHN_T_MASK_SR \ 523 }, \ 524 /* Center */ \ 525 [4] = { \ 526 .type = SND_CHN_T_FC, \ 527 .members = SND_CHN_T_MASK_FC \ 528 }, \ 529 /* LFE */ \ 530 [5] = { \ 531 .type = SND_CHN_T_LF, \ 532 .members = SND_CHN_T_MASK_LF \ 533 }, \ 534 /* Rear Center */ \ 535 [6] = { \ 536 .type = SND_CHN_T_BC, \ 537 .members = SND_CHN_T_MASK_BC \ 538 }, \ 539 [7] = { \ 540 .type = SND_CHN_T_MAX, \ 541 .members = 0 \ 542 } \ 543 }, \ 544 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 545 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 546 SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF | \ 547 SND_CHN_T_MASK_BC, \ 548 .offset = { 0, 1, 4, 5, 2, 3, -1, -1, 6, \ 549 -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ 550 } 551 552 #define SND_CHN_MATRIX_MAP_7_0 { \ 553 .id = SND_CHN_MATRIX_7_0, \ 554 .channels = 7, \ 555 .ext = 0, \ 556 .map = { \ 557 /* Left */ \ 558 [0] = { \ 559 .type = SND_CHN_T_FL, \ 560 .members = \ 561 SND_CHN_T_MASK_FL | SND_CHN_T_MASK_LF \ 562 }, \ 563 /* Right */ \ 564 [1] = { \ 565 .type = SND_CHN_T_FR, \ 566 .members = \ 567 SND_CHN_T_MASK_FR | SND_CHN_T_MASK_LF \ 568 }, \ 569 /* Rear Left */ \ 570 [2] = { \ 571 .type = SND_CHN_T_BL, \ 572 .members = \ 573 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BC | \ 574 SND_CHN_T_MASK_LF \ 575 }, \ 576 /* Rear Right */ \ 577 [3] = { \ 578 .type = SND_CHN_T_BR, \ 579 .members = \ 580 SND_CHN_T_MASK_BR | SND_CHN_T_MASK_BC | \ 581 SND_CHN_T_MASK_LF \ 582 }, \ 583 /* Center */ \ 584 [4] = { \ 585 .type = SND_CHN_T_FC, \ 586 .members = \ 587 SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF \ 588 }, \ 589 /* Side Left */ \ 590 [5] = { \ 591 .type = SND_CHN_T_SL, \ 592 .members = \ 593 SND_CHN_T_MASK_SL | SND_CHN_T_MASK_LF \ 594 }, \ 595 /* Side Right */ \ 596 [6] = { \ 597 .type = SND_CHN_T_SR, \ 598 .members = \ 599 SND_CHN_T_MASK_SR | SND_CHN_T_MASK_LF \ 600 }, \ 601 [7] = { \ 602 .type = SND_CHN_T_MAX, \ 603 .members = 0 \ 604 } \ 605 }, \ 606 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 607 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 608 SND_CHN_T_MASK_FC | \ 609 SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR, \ 610 .offset = { 0, 1, 4, -1, 2, 3, -1, -1, -1, \ 611 5, 6, -1, -1, -1, -1, -1, -1, -1 } \ 612 } 613 614 #define SND_CHN_MATRIX_MAP_7_1 { \ 615 .id = SND_CHN_MATRIX_7_1, \ 616 .channels = 8, \ 617 .ext = 1, \ 618 .map = { \ 619 /* Left */ \ 620 [0] = { \ 621 .type = SND_CHN_T_FL, \ 622 .members = SND_CHN_T_MASK_FL \ 623 }, \ 624 /* Right */ \ 625 [1] = { \ 626 .type = SND_CHN_T_FR, \ 627 .members = SND_CHN_T_MASK_FR \ 628 }, \ 629 /* Rear Left */ \ 630 [2] = { \ 631 .type = SND_CHN_T_BL, \ 632 .members = \ 633 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BC \ 634 }, \ 635 /* Rear Right */ \ 636 [3] = { \ 637 .type = SND_CHN_T_BR, \ 638 .members = \ 639 SND_CHN_T_MASK_BR | SND_CHN_T_MASK_BC \ 640 }, \ 641 /* Center */ \ 642 [4] = { \ 643 .type = SND_CHN_T_FC, \ 644 .members = SND_CHN_T_MASK_FC \ 645 }, \ 646 /* LFE */ \ 647 [5] = { \ 648 .type = SND_CHN_T_LF, \ 649 .members = SND_CHN_T_MASK_LF \ 650 }, \ 651 /* Side Left */ \ 652 [6] = { \ 653 .type = SND_CHN_T_SL, \ 654 .members = SND_CHN_T_MASK_SL \ 655 }, \ 656 /* Side Right */ \ 657 [7] = { \ 658 .type = SND_CHN_T_SR, \ 659 .members = SND_CHN_T_MASK_SR \ 660 }, \ 661 [8] = { \ 662 .type = SND_CHN_T_MAX, \ 663 .members = 0 \ 664 } \ 665 }, \ 666 .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ 667 SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ 668 SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF | \ 669 SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR, \ 670 .offset = { 0, 1, 4, 5, 2, 3, -1, -1, -1, \ 671 6, 7, -1, -1, -1, -1, -1, -1, -1 } \ 672 } 673 674 #endif /* !_SND_MATRIX_MAP_H_ */ 675