The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/sound/pcm/matrix_map.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

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

Cache object: af96349b2fc23415a0df0a84ee3cf922


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.