From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 07:05:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84E6593C; Fri, 16 Nov 2012 07:05:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6880E8FC08; Fri, 16 Nov 2012 07:05:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG75wUM037309; Fri, 16 Nov 2012 07:05:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG75w87037305; Fri, 16 Nov 2012 07:05:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201211160705.qAG75w87037305@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Nov 2012 07:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243138 - head/sys/dev/sound/pcm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 07:05:58 -0000 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, \