Date: Fri, 16 Nov 2012 07:05:58 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243138 - head/sys/dev/sound/pcm Message-ID: <201211160705.qAG75w87037305@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Nov 16 07:05:57 2012 New Revision: 243138 URL: http://svnweb.freebsd.org/changeset/base/243138 Log: For some more completeness add matrixes for 3.1 and 7.0 channel setups. Modified: head/sys/dev/sound/pcm/channel.c head/sys/dev/sound/pcm/feeder_matrix.c head/sys/dev/sound/pcm/matrix.h head/sys/dev/sound/pcm/matrix_map.h Modified: head/sys/dev/sound/pcm/channel.c ============================================================================== --- head/sys/dev/sound/pcm/channel.c Fri Nov 16 06:40:40 2012 (r243137) +++ head/sys/dev/sound/pcm/channel.c Fri Nov 16 07:05:57 2012 (r243138) @@ -1037,12 +1037,14 @@ static const struct { { "2.0", "2", "stereo", SND_CHN_MATRIX_2_0 }, { "2.1", NULL, NULL, SND_CHN_MATRIX_2_1 }, { "3.0", "3", NULL, SND_CHN_MATRIX_3_0 }, + { "3.1", NULL, NULL, SND_CHN_MATRIX_3_1 }, { "4.0", "4", "quad", SND_CHN_MATRIX_4_0 }, { "4.1", NULL, NULL, SND_CHN_MATRIX_4_1 }, { "5.0", "5", NULL, SND_CHN_MATRIX_5_0 }, { "5.1", "6", NULL, SND_CHN_MATRIX_5_1 }, { "6.0", NULL, NULL, SND_CHN_MATRIX_6_0 }, { "6.1", "7", NULL, SND_CHN_MATRIX_6_1 }, + { "7.0", NULL, NULL, SND_CHN_MATRIX_7_0 }, { "7.1", "8", NULL, SND_CHN_MATRIX_7_1 }, { NULL, NULL, NULL, SND_CHN_MATRIX_UNKNOWN } }; Modified: head/sys/dev/sound/pcm/feeder_matrix.c ============================================================================== --- head/sys/dev/sound/pcm/feeder_matrix.c Fri Nov 16 06:40:40 2012 (r243137) +++ head/sys/dev/sound/pcm/feeder_matrix.c Fri Nov 16 07:05:57 2012 (r243138) @@ -86,12 +86,14 @@ static struct pcmchan_matrix feeder_matr [SND_CHN_MATRIX_2_0] = SND_CHN_MATRIX_MAP_2_0, [SND_CHN_MATRIX_2_1] = SND_CHN_MATRIX_MAP_2_1, [SND_CHN_MATRIX_3_0] = SND_CHN_MATRIX_MAP_3_0, + [SND_CHN_MATRIX_3_1] = SND_CHN_MATRIX_MAP_3_1, [SND_CHN_MATRIX_4_0] = SND_CHN_MATRIX_MAP_4_0, [SND_CHN_MATRIX_4_1] = SND_CHN_MATRIX_MAP_4_1, [SND_CHN_MATRIX_5_0] = SND_CHN_MATRIX_MAP_5_0, [SND_CHN_MATRIX_5_1] = SND_CHN_MATRIX_MAP_5_1, [SND_CHN_MATRIX_6_0] = SND_CHN_MATRIX_MAP_6_0, [SND_CHN_MATRIX_6_1] = SND_CHN_MATRIX_MAP_6_1, + [SND_CHN_MATRIX_7_0] = SND_CHN_MATRIX_MAP_7_0, [SND_CHN_MATRIX_7_1] = SND_CHN_MATRIX_MAP_7_1 }; Modified: head/sys/dev/sound/pcm/matrix.h ============================================================================== --- head/sys/dev/sound/pcm/matrix.h Fri Nov 16 06:40:40 2012 (r243137) +++ head/sys/dev/sound/pcm/matrix.h Fri Nov 16 07:05:57 2012 (r243138) @@ -134,29 +134,31 @@ #define SND_CHN_MATRIX_3_0 3 #define SND_CHN_MATRIX_3 SND_CHN_MATRIX_3_0 -/* 4 @ 4.0 Quadraphonic */ -#define SND_CHN_MATRIX_4_0 4 +/* 4 @ 3.1 (lfe), 4.0 (Quadraphonic, DEFAULT) */ +#define SND_CHN_MATRIX_3_1 4 +#define SND_CHN_MATRIX_4_0 5 #define SND_CHN_MATRIX_4 SND_CHN_MATRIX_4_0 /* 5 @ 4.1 (lfe), 5.0 (center, DEFAULT) */ -#define SND_CHN_MATRIX_4_1 5 -#define SND_CHN_MATRIX_5_0 6 +#define SND_CHN_MATRIX_4_1 6 +#define SND_CHN_MATRIX_5_0 7 #define SND_CHN_MATRIX_5 SND_CHN_MATRIX_5_0 /* 6 @ 5.1 (lfe, DEFAULT), 6.0 (rear center) */ -#define SND_CHN_MATRIX_5_1 7 -#define SND_CHN_MATRIX_6_0 8 +#define SND_CHN_MATRIX_5_1 8 +#define SND_CHN_MATRIX_6_0 9 #define SND_CHN_MATRIX_6 SND_CHN_MATRIX_5_1 -/* 7 @ 6.1 (lfe) */ -#define SND_CHN_MATRIX_6_1 9 +/* 7 @ 6.1 (lfe, DEFAULT), 7.0 */ +#define SND_CHN_MATRIX_6_1 10 +#define SND_CHN_MATRIX_7_0 11 #define SND_CHN_MATRIX_7 SND_CHN_MATRIX_6_1 /* 8 @ 7.1 (lfe) */ -#define SND_CHN_MATRIX_7_1 10 +#define SND_CHN_MATRIX_7_1 12 #define SND_CHN_MATRIX_8 SND_CHN_MATRIX_7_1 -#define SND_CHN_MATRIX_MAX 11 +#define SND_CHN_MATRIX_MAX 13 #define SND_CHN_MATRIX_BEGIN SND_CHN_MATRIX_1_0 #define SND_CHN_MATRIX_END SND_CHN_MATRIX_7_1 Modified: head/sys/dev/sound/pcm/matrix_map.h ============================================================================== --- head/sys/dev/sound/pcm/matrix_map.h Fri Nov 16 06:40:40 2012 (r243137) +++ head/sys/dev/sound/pcm/matrix_map.h Fri Nov 16 07:05:57 2012 (r243138) @@ -195,6 +195,49 @@ -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ } +#define SND_CHN_MATRIX_MAP_3_1 { \ + .id = SND_CHN_MATRIX_3_1, \ + .channels = 4, \ + .ext = 1, \ + .map = { \ + /* Left */ \ + [0] = { \ + .type = SND_CHN_T_FL, \ + .members = \ + SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FC | \ + SND_CHN_T_MASK_SL \ + }, \ + /* Right */ \ + [1] = { \ + .type = SND_CHN_T_FR, \ + .members = \ + SND_CHN_T_MASK_FR | SND_CHN_T_MASK_FC | \ + SND_CHN_T_MASK_SR \ + }, \ + /* LFE */ \ + [2] = { \ + .type = SND_CHN_T_LF, \ + .members = SND_CHN_T_MASK_LF \ + }, \ + /* Rear Center */ \ + [3] = { \ + .type = SND_CHN_T_BC, \ + .members = \ + SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ + SND_CHN_T_MASK_BC | \ + SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR \ + }, \ + [4] = { \ + .type = SND_CHN_T_MAX, \ + .members = 0 \ + } \ + }, \ + .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ + SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BC, \ + .offset = { 0, 1, -1, 2, -1, -1, -1, -1, 3, \ + -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ +} + #define SND_CHN_MATRIX_MAP_4_0 { \ .id = SND_CHN_MATRIX_4_0, \ .channels = 4, \ @@ -504,6 +547,68 @@ -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ } +#define SND_CHN_MATRIX_MAP_7_0 { \ + .id = SND_CHN_MATRIX_7_0, \ + .channels = 7, \ + .ext = 0, \ + .map = { \ + /* Left */ \ + [0] = { \ + .type = SND_CHN_T_FL, \ + .members = \ + SND_CHN_T_MASK_FL | SND_CHN_T_MASK_LF \ + }, \ + /* Right */ \ + [1] = { \ + .type = SND_CHN_T_FR, \ + .members = \ + SND_CHN_T_MASK_FR | SND_CHN_T_MASK_LF \ + }, \ + /* Rear Left */ \ + [2] = { \ + .type = SND_CHN_T_BL, \ + .members = \ + SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BC | \ + SND_CHN_T_MASK_LF \ + }, \ + /* Rear Right */ \ + [3] = { \ + .type = SND_CHN_T_BR, \ + .members = \ + SND_CHN_T_MASK_BR | SND_CHN_T_MASK_BC | \ + SND_CHN_T_MASK_LF \ + }, \ + /* Center */ \ + [4] = { \ + .type = SND_CHN_T_FC, \ + .members = \ + SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF \ + }, \ + /* Side Left */ \ + [5] = { \ + .type = SND_CHN_T_SL, \ + .members = \ + SND_CHN_T_MASK_SL | SND_CHN_T_MASK_LF \ + }, \ + /* Side Right */ \ + [6] = { \ + .type = SND_CHN_T_SR, \ + .members = \ + SND_CHN_T_MASK_SR | SND_CHN_T_MASK_LF \ + }, \ + [7] = { \ + .type = SND_CHN_T_MAX, \ + .members = 0 \ + } \ + }, \ + .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ + SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ + SND_CHN_T_MASK_FC | \ + SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR, \ + .offset = { 0, 1, 4, -1, 2, 3, -1, -1, -1, \ + 5, 6, -1, -1, -1, -1, -1, -1, -1 } \ +} + #define SND_CHN_MATRIX_MAP_7_1 { \ .id = SND_CHN_MATRIX_7_1, \ .channels = 8, \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211160705.qAG75w87037305>