From patchwork Fri Dec 8 11:42:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mahesh Talewad X-Patchwork-Id: 13485346 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="GdBOiJpn" Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2072.outbound.protection.outlook.com [40.107.247.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D890D59 for ; Fri, 8 Dec 2023 03:43:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QjjNbbPUVS4RiRW7NonOHBBESEF1jnBsyR5dJ2OnAjmn20YGDEZHjSBlT2QE3P4o6ziqu3hPNVqV3d+Ss/qsMmmZLg78up7pIBH088MJ0iAsMDuTP6yEFxP9GY7DLyNL2hnBDR0qMPf+yoKU1uaPRBk4jsI1b9GIK0REkkmVhi6OPconxNWAJKuJEGnOui614EnfYDyQ8E5enk9Av9ppEvxsE6j1Oj4PWLTjpphoxpk59S6jg6a5dZuyk9yp7yWwwV9WuFlCS1FZD2jNnQiU3JPNDXz296eEcGebthZzgr6L//IAS4lIL6m9UzCDhrkSVoPGwzOZfRlr586XLS4bEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Rrlaz5V56fJhQBAX2EoxQvBAHJw9+23ajIHlNOTTS9M=; b=WcVw2U0rate4U+RIj3OFzkYWddmt86PocEynfEzXbu1tedixZoOrQfCliTawphsKl/etefSfcJIIepwoGMv+qwGf/yYNYN96Pq/Skyc8fdNTKm3Zk/bwnUU2m5zvhrYud4VqetNB+0CA73zeaZQAkpd5d1WtPIWLso1UTbf14UWQ7TjvSbZu/etRg2JssKiZBd2vy6clzftA7L6BoWA9yJSi0JRjCfkbKSZXO2qgxRyEKqJQYR81kpAjs8sXrVlPzhScsNS4yF20PEO9y1PBpCd5L0ZN6CfA5+6w43z/sY4DqQQuqy1VgcC8SRfdbOjl8YgzHJjtNEYlRqITIrPQKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Rrlaz5V56fJhQBAX2EoxQvBAHJw9+23ajIHlNOTTS9M=; b=GdBOiJpnA89m27+ksHltWzQCVJ9BgV6t8RGpoU9mWAjtorJ3a8EAmnzfgVrcMuWt+y9zROjDvVTaoXOWRnZDd5mBvB9Ru/AcTkKowbgY5SybN4GVrFl9+ZAZ2NG/6t/dxah9tSzrWdnHuLMBCyXqkqnJPKMmDOMtnQDrHEomMe4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR0402MB3952.eurprd04.prod.outlook.com (2603:10a6:803:1c::10) by DBAPR04MB7237.eurprd04.prod.outlook.com (2603:10a6:10:1a4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.28; Fri, 8 Dec 2023 11:43:35 +0000 Received: from VI1PR0402MB3952.eurprd04.prod.outlook.com ([fe80::b837:b0d8:1b75:9a5e]) by VI1PR0402MB3952.eurprd04.prod.outlook.com ([fe80::b837:b0d8:1b75:9a5e%5]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 11:43:34 +0000 From: Mahesh Talewad To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, devyani.godbole@nxp.com, nitin.jadhav@nxp.com, mahesh.talewad@nxp.com Subject: [PATCH BlueZ v2 1/3] - Added AICS Characteristics UUID(s). Date: Fri, 8 Dec 2023 13:42:56 +0200 Message-Id: <20231208114258.133709-2-mahesh.talewad@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231208114258.133709-1-mahesh.talewad@nxp.com> References: <20231208114258.133709-1-mahesh.talewad@nxp.com> X-ClientProxiedBy: AS4P191CA0033.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:657::20) To VI1PR0402MB3952.eurprd04.prod.outlook.com (2603:10a6:803:1c::10) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0402MB3952:EE_|DBAPR04MB7237:EE_ X-MS-Office365-Filtering-Correlation-Id: a39de97e-3948-40d0-db38-08dbf7e2e90a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dqnSHpd1llANhWv/GOBhzQbBmx/7k0vrrpN+jr4yltijgJc38KeRBkM1wo9+uhMZSR5xD5A1lTvyqiJ0GdSTb9AlAMNCuFPHcvIdJFmf2paj06hNiOc1un5maqbfm1FQowgFyf67j9PZYTMdKOkOoSj8pjxyvrtTBNgyZJrSZUYy/qQLqIC4hgtXGQ0WQB97AuyCka0hX7fmm5hWOJu/Rjx9FrpOGa1zbh7+tPLVhC9qWnF/Nimsb9bAGLh+ZX0AmSOhs/wlW8VPaMAc4TkATJHs1JvSrpcyXV1cFt583B2qLUbKOeW/6SeEj3mQmNZsUgzNIM1qevaNJMh1Y3m75r6DruRIqPk6fILP9pNdrL+K2XWpoI4fVA4NdXlz7XH8VDR+lfwSKlxtOY+gCKwGSczEvQY9xm5cm2dpA4vCNwtT9G61y6rOwIFhNAe4FdJK1ci7adMQ8xTvmsMm2yn0GnwjDv3fZTkI5TIdao87o1/jZvBstlx0H17CD62L7SCdaejqxmY+CFqmQY60Je0wPdlZRbMkwAy+xPNBejAw2EkZZnRABmRzj/cCIoPctgwsmdLBm/YKLOu56iR6bZJEvZEqAu9Sf1IfNzlqBfxe/nHsP04uOwyldJIBWkcC94m7 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0402MB3952.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(346002)(39860400002)(136003)(376002)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(8676002)(8936002)(4326008)(44832011)(6666004)(6486002)(478600001)(316002)(6916009)(66946007)(66476007)(66556008)(41300700001)(38350700005)(5660300002)(4744005)(36756003)(2906002)(1076003)(26005)(2616005)(38100700002)(86362001)(52116002)(6512007)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QPTgBKrKjYzQMPNGd0IqfmXSOEPyNtogs5Z8rwcocJnvH9NgwUrlp5h3yZnJdZUDjArCviRqWQe763RuhgOTNYBZHw/559JkKpXAycVZl5r5TBFZZ2e/LXaUaeIprqG9E/Z8QtuJX71oY1waAPMtnhIl+mcKtujmoYQlYDjpPQ4ubikfnpY/SY5/xXGwyyHOrCT0Qy7INuCUvcOe1Ju/eovTMqpByLIPaICyJujcJCi0nzKDCjxaHYPvTcnMXbj+muw8OA2DJX6LQQL5walSkYBFSldL7uhmtho/FDJSM+lpNyCIXGb8tNC9uhStzK5Kzf3eFS/j7LPnpihxL+zqsen7smV8QSf56RuhdtFPfnoDa967Evv1lSZ3aVAlVOFqWYOEOsxgsFcNzar8a4xk7voxme3dQWE16BKb/zh5x4BQOOEc1/pTKwEQzM2MuAWvBADJcT4qzAoufvJypSu8GJNf23PQeyO08+H72bFzhBZI42lOshmvws80Taxsh/Xd1aLGtY0PSNOpaZpGfsPRpXBAxMJZSSn1ncpuQ3k758rIRWAUWQuR5+/DXoXaGFfZRbVKvnhfqlN8Wv4Vvt51pbCV6cfPVeck13zu+p7E8nJAJjI3a004y7o3mkA0MZ53VD8R5wotF0O8LjH1p3bkZ6SgjHTqnGGwzRpvblk8Q+BgQtW4VRaPqEEZ/9bxhf+kWxLBagx3xv5UELR5vg4NtGHq//tXHEFOZWzBXMWBMfqjaKoKJXo+BDqv358tR3ZijZfidEMyD6quTHxBY4XqWsfXGCPtCT36c+rOmW+zkj4cIArhT+RXTfehEq7iwMaEP30Zwo3/OAJn+ZTCQbeQNvJJFfbJI9fY9wjZY6gJIQy2xl8AQ/gpY49liT5OQtepDOes2hXVfDPp1EW14noTWpJ2T9JSk1RgKSwog1AkHiAQvDxwdA6pqik3zguZwBloRVuOySS9k8IxTBTwq61QrieJftiywOhgM9rdRLguQ0NvVrmoTRoiEocuGPLrF/1wk3zaqk+OxsgNDrKFZXTOdr4UdE7U+gvGnAm/dedC0INCovI4wPgb8f5AeEPR8S0+hWA/oaqBrfd2JqnGOdZAC3BTvpsz8QdNSiMn3Ogb1p7HpWo7LhGIm6WjUKBgJ+jYC8AdAyQe7x6cN9PtNZtH3CdkmvLgL4uiRx+Pl5Wo2v7YvcuNo3ur3p1wkL1UN+CD8TfqByQOAhSnNk4sNF5fmqhpwY1rZisPI5ZBKWLvLFwi8XJrva5PmLdwA7Ka1bKkt5UAOEZZedFuj83JsopSSTQd7EbZyHw5Hwm8uqg50Rru/CduBjNU/dwOIT/OOozS2ol3YWmybzVsYms/M0zTQbFi734fy8TPdwsLvkf5I01GdK2tqA+raC1Hmnkmw0GAAwBQrqDtpXLezfUyGS+2ozgt62n09P4tLjTzEEhFOONk8ZuQzGI8CN+Q3eiCRTcA5h8yt69039nBX3fGqzq4m1V7XHAoIR3i8yE7vp54FKu7pAkIIAV2FQyg7ukWPeg87Mp6QDshDowZCxK6KZW8buY0g0eTkGS9HVMcI8QYwD241efGf7mrIz6Y7ZFbnEIsdbC1AhFCeHnHfViWJxvE3w== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a39de97e-3948-40d0-db38-08dbf7e2e90a X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3952.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 11:43:34.9250 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bG2dA6b8FS421mUQxxryW4R7X/pNVIQfK37D7Dxf0wEnCeyVKqI2jKIN+oU+8zqeyD+6qy4ROktO2MnrGKFCjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7237 --- lib/uuid.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/uuid.h b/lib/uuid.h index e682547aa..8839dea08 100644 --- a/lib/uuid.h +++ b/lib/uuid.h @@ -187,6 +187,13 @@ extern "C" { #define VOCS_CP_CHRC_UUID 0x2B82 #define VOCS_AUDIO_OP_DESC_CHAR_UUID 0x2B83 +#define AICS_INPUT_STATE_CHAR_UUID 0x2B77 +#define AICS_GAIN_SETTING_PROP_CHAR_UUID 0x2B78 +#define AICS_AUDIO_INPUT_TYPE_CHAR_UUID 0x2B79 +#define AICS_INPUT_STATUS_CHAR_UUID 0X2B7A +#define AICS_AUDIO_INPUT_CP_CHRC_UUID 0X2B7B +#define AICS_INPUT_DESCR_CHAR_UUID 0X2B7C + #define GMCS_UUID 0x1849 #define MEDIA_PLAYER_NAME_CHRC_UUID 0x2b93 #define MEDIA_TRACK_CHNGD_CHRC_UUID 0x2b96 From patchwork Fri Dec 8 11:42:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mahesh Talewad X-Patchwork-Id: 13485347 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="fqYOBG4x" Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2085.outbound.protection.outlook.com [40.107.247.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12E93172C for ; Fri, 8 Dec 2023 03:43:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Es+fF7ziXneeujq3cpayvUvBAxkum4aXuQoyXBLunjhrbnSGmik9yMzBYwHYasBmI/3965moQnnGneZwS3BeCXIXwxYkarYQvVK/E98OrGXbibnHiQ5Efr60xNoW+6w9tZPb/R5v12Z6/gYE0XqPG83m2aqJYMdZMrrC+tLxRhySVEoU3hBJfNW/1W7TNWmmPAjrSKznZC++Xs3bo1DLT7LrlMQsLMbnkOBKUiih9WZupVsJR0hfw5KWQhEPmT3O7h+VDmbYhKnxiMFQaChqJE+w1xBso7TJi5xM9y1azrTJBLDeuDSrt+FNXMCnEaPRR487A2qqCy6V3IlBvVmk+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zcvKpN/g57fH94z/Rp+9PzKxcoZZ7cDdB4t9zLiNcjI=; b=P2ONT2Iki9hOVEJFm4YvQlq+JKU6V3gbmdKA03LTnpxXxrHswpKFFSZpiehnr42MwV38BMTOYSHN/r988BU/Au3psiFp6Y6tFnM15Pzs6npTC1GpBVeuqxf44jlYA6xaCSZOqHpubgqa6GQVJ/ys/J/8siJlxrQ31UjwFeZWc+spko5BF/AeLKH2NeWAQFd8K54aInTagE+qn8Dgn9FYY/b1Qr1ZIdEswBLGNz4hEMObrkbcPPM7DOnBVT+g4mw7vqwkMMD+Bg9OPwYiI92hk4cYRyviMSCrHxns4aHNf5O5v8YosiUXxn0QwYPHGUmYEeQRcGGXZKHQ99DYdV1zOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zcvKpN/g57fH94z/Rp+9PzKxcoZZ7cDdB4t9zLiNcjI=; b=fqYOBG4xxkFS91j8z01hCIXMDiUZOtz2h+SagFTvq/5Y3Ph1NyTgpYw9tTO0Z+xzat3cUYr9xIwwwinJ8PTkTZ06xeKAFjF5tnYmpOnnL+xLPEaY6LqoH7Jw5Y+bz5Ng11IxCiQPbsHWoZ+3X45FJUwC/PPTpTuh0VcNIGT5fH0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR0402MB3952.eurprd04.prod.outlook.com (2603:10a6:803:1c::10) by DBAPR04MB7237.eurprd04.prod.outlook.com (2603:10a6:10:1a4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.28; Fri, 8 Dec 2023 11:43:40 +0000 Received: from VI1PR0402MB3952.eurprd04.prod.outlook.com ([fe80::b837:b0d8:1b75:9a5e]) by VI1PR0402MB3952.eurprd04.prod.outlook.com ([fe80::b837:b0d8:1b75:9a5e%5]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 11:43:40 +0000 From: Mahesh Talewad To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, devyani.godbole@nxp.com, nitin.jadhav@nxp.com, mahesh.talewad@nxp.com Subject: [PATCH BlueZ v2 2/3] - Code Implementation related Service- AICS Date: Fri, 8 Dec 2023 13:42:57 +0200 Message-Id: <20231208114258.133709-3-mahesh.talewad@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231208114258.133709-1-mahesh.talewad@nxp.com> References: <20231208114258.133709-1-mahesh.talewad@nxp.com> X-ClientProxiedBy: AS4P191CA0033.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:657::20) To VI1PR0402MB3952.eurprd04.prod.outlook.com (2603:10a6:803:1c::10) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0402MB3952:EE_|DBAPR04MB7237:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d48c69d-aa24-48df-9060-08dbf7e2ec0a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FBqMD2lSEIloo/ba6Qa/3ioCUvzfVt60G8z6bTtTk2rFUZChOedn19xATnaHwhR9Q67XkkWNE/W6ZBE5VD3paaOY6jk3pMpFb8WJe2HLSJuzl0wF8EvblpaiFvoC7U8+tEFJL8LpgndNxaCRjDRSEADI6apadmvxIqy8+9ss+lJHimZafy1rorH+bRB+XxajQYXm/UJxT00ucJWXdUyeOcad7Og7Bkzn4SBH2ioURfpFPktkNnwbnqhStoTBtVm36RE+PMBwba0O8NEZlIIlCaQ6XuCkkCLjTxq/kytzQBjqdLquO4ETZJAgxwd3KN8M2cQPiePOXzr1buSh/xBa9ZZpJLxVuNHXXwKWxIdCZcgFm/+dyZNsZDnnyHD4x4bGk2piaRIUD7LySAmGUsvBS0Jvu74Ffzc1u3I7h7MjF8VbwODPmgm11BvFUy/4EVS602Y6nzLlnLEwygQLfmLdyBldhYKghTHyq2Hg3SsMaMWZJgo2B5ZV84mp654Kuj8XZ6oJ/5JCdw0Rvw5EHrU+UdaMq5MUy/Y//W0LtaK9SseLf/fxN0c677F4P0rCLFVfeLqriI1p+YOM1zbOCQqx0PSxzCQKGV6BCTmFnmw063/2LwK+3REyN2TK6ZCe9WbA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0402MB3952.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(346002)(39860400002)(136003)(376002)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(8676002)(8936002)(4326008)(44832011)(6666004)(6486002)(478600001)(316002)(6916009)(66946007)(66476007)(66556008)(41300700001)(38350700005)(5660300002)(30864003)(36756003)(2906002)(1076003)(26005)(2616005)(83380400001)(38100700002)(86362001)(52116002)(6512007)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8i4YkKZeq83cCgVUGCAddg3GsSl76+x36OMU8f7xEnu+c+CAm1ZfdiHfgFKCUMZtAXHstwHNFri+vKqfp1tT/i1ZFQZ/scxsSTHYkWv+2AJLDKkxCoA2q3ZJORyHVEtWxqFNlzhCphGV0zCW1o/9PnZm5WtTnRxOtYj3TcOBGoV1+rA0IZrvegmq+YC5HHuevYOxWs/T7KebyX3ZAiTKNrvWSEosuErv0AfKEm/e7dE7lx/F2BV0Sd1Z2fjDj4Q72HWPBmu1Q8Eb8aOP9Ig1OzwUNQnglkkKuxcHUE3/4KrcFKVRi9EWbzUZC0nS5VB20bNgsCdTNxsIYDhcaayi/li5GxmxMsKiYJhfJOQOrKtOrBs2TKO1DHqJxfmTFwX80LldZTTkOOenLOpz9uMczUrgjYnKMyQImO/Y5eTGlwPOv9jd8DnVdSBjAj8el0txbgINATUTxnEGvZuAZYjPX5sK3Vjr5HFOopxNaxTvnvav4mq0p2OR1Fxj5q+8VMKX2EuuY2m248ncA0HsmSWPhQnOqsdf7xkcjlldf+9H5QiqBvpTjzkwQSiS0ULeGucYfNJoFKNnEA4oP95xoVFyv8ifItpS9IxLUlCMtINhXAabIOmzHzm6zzbV68Arxj6vYJ+0ubbcozWVdqP1v/mLFAqpUEhNvIEvnk1uS0v5H2D25CXEjty2ZsNRUgba0tHN8laV9raXfQaRnBFucK9DJ0A5GxKt2XisHFtuH5gg8QtK/DM6sQqUu2KsS9snG2VLqFdlN5q50uad+xa/6orfFZhZf5cFFPSHEmdccBn6rTYZCvcy/AZXXgcJR2FjcC9e5PocP0H5x9TAx95CHtjNu6AsQGYjM+OF5ztHYBMf97K/VM5eGu4hbhkDJuAb7rq22BbqXWemVyQd5OLpQerE/khgoDdlifWbMqXqHtey/f1nbUEQJbrebv8XOYG0LW29Fve5rk04gEhx3zWUNk/yraU9MrVOjR4Bb2YNE1TOVgT6IKJIWs5beXV3frNLyH/n/mn8qgbyuQAXmMtEbI1qQG5TGvcg94wBRocIWZwj6Wf8HUazl7gg8LFxriXBzZSPq1ejitcpkmayFH/uzOGb45MXczIszufDhZ0b5yCOM3PF8MxRrtrK31hspinFpD1kcvy/g4HUdXpuALe0spOxq6anvpE2nBAUZX/Z8FP3jKWAgb00KShpDGqaYh72ycqWXWfZU9Lb10FxpjBPFlcua0LoAgvPLP0QZUcyh8Qi1pqVXcdwGBjtRRXAFB/Z+q4G+3fOzCB6iU1/K11Lyo/+He3c+94Ik3md7+te0rCGtoOoq2qPYqgRtARl6tzvdwDO6a7+aZwvEuS9EnO9/TXuwks7twxO276wnIDX4aAS8DOcj/eWUix7ke6WV1xSBUHI2rhpco50j5R6eruD14FUHqh8I97yT4jzMIcPunUzX/WE1++icfqk6Xcn7wUDEQfpbpDUEKmMaKFrj/Nz7V0njrYVEU/U1ngvtqiE8/RBDdw0i+QHqbhku2K169yhRywQXr0bp5xWqDry0Riwy4Ef22BVggXL0mq8RuYefqueANWwNaSWTTDqnlWJLyCxwvSuFPmzGwUCnketkDK95IxKOg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d48c69d-aa24-48df-9060-08dbf7e2ec0a X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3952.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 11:43:40.1389 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1/Q3Q1vhYfEJqVw2LrrsCa9h1AHJJQAVSeN0zLqmP+o1NFp5Px/A6EfD6+dXai1rhk/Jbdb/7FrLrdFm4PHa5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7237 - Specification referred for implementation: AICS_v1.0.pdf - Verification: Tested all Mandatory PTS testcases and all mandatory testcases passed. --- src/shared/vcp.c | 1011 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1010 insertions(+), 1 deletion(-) diff --git a/src/shared/vcp.c b/src/shared/vcp.c index 5d163266b..05dd74047 100644 --- a/src/shared/vcp.c +++ b/src/shared/vcp.c @@ -39,6 +39,9 @@ #define BT_ATT_ERROR_INVALID_CHANGE_COUNTER 0x80 #define BT_ATT_ERROR_OPCODE_NOT_SUPPORTED 0x81 #define BT_ATT_ERROR_VALUE_OUT_OF_RANGE 0x82 +#define BT_ATT_AICS_ERROR_VALUE_OUT_OF_RANGE 0x83 +#define BT_ATT_AICS_ERROR_MUTE_DISABLED 0x82 +#define BT_ATT_AICS_ERROR_GAIN_MODE_CHANGE_NOT_ALLOWED 0x84 #define BT_VCP_NA BIT(0) #define BT_VCP_FRONT_LEFT BIT(1) @@ -70,10 +73,52 @@ #define BT_VCP_LEFT_SURROUND BIT(27) #define BT_VCP_RIGHT_SURROUND BIT(28) +#define VCS_TOTAL_NUM_HANDLES 11 +#define AICS_TOTAL_NUM_HANDLES 16 + +/* AICS Audio Input Type Values */ +#define AICS_AUD_IP_TYPE_UNSPECIFIED 0x00 +#define AICS_AUD_IP_TYPE_BLUETOOTH 0x01 +#define AICS_AUD_IP_TYPE_MICROPHONE 0x02 +#define AICS_AUD_IP_TYPE_ANALOG 0x03 +#define AICS_AUD_IP_TYPE_DIGITAL 0x04 +#define AICS_AUD_IP_TYPE_RADIO 0x05 +#define AICS_AUD_IP_TYPE_STREAMING 0x06 +#define AICS_AUD_IP_TYPE_AMBIENT 0x07 + +/* AICS Audio Input Status Values */ +#define AICS_AUD_IP_STATUS_INACTIVE 0x00 +#define AICS_AUD_IP_STATUS_ACTIVE 0x01 + +/* AICS Audio Input Control Point Opcodes */ +#define BT_AICS_SET_GAIN_SETTING 0x01 +#define BT_AICS_UNMUTE 0x02 +#define BT_AICS_MUTE 0x03 +#define BT_AICS_SET_MANUAL_GAIN_MODE 0x04 +#define BT_AICS_SET_AUTO_GAIN_MODE 0x05 + +/* AICS Gain Mode Field Value */ +#define AICS_GAIN_MODE_MANUAL_ONLY 0x00 +#define AICS_GAIN_MODE_AUTO_ONLY 0x01 +#define AICS_GAIN_MODE_MANUAL 0x02 +#define AICS_GAIN_MODE_AUTO 0x03 + +/* AICS Mute Field Values */ +#define AICS_NOT_MUTED 0x00 +#define AICS_MUTED 0x01 +#define AICS_DISABLED 0x02 + +#define AICS_GAIN_SETTING_UNITS 1 +#define AICS_GAIN_SETTING_MAX_VALUE 127 +#define AICS_GAIN_SETTING_MIN_VALUE -128 + +#define AICS_GAIN_SETTING_DEFAULT_VALUE 88 + struct bt_vcp_db { struct gatt_db *db; struct bt_vcs *vcs; struct bt_vocs *vocs; + struct bt_aics *aics; }; typedef void (*vcp_func_t)(struct bt_vcp *vcp, bool success, uint8_t att_ecode, @@ -138,6 +183,10 @@ struct bt_vcp { unsigned int audio_loc_id; unsigned int ao_dec_id; + unsigned int aics_ip_state_id; + unsigned int aics_ip_status_id; + unsigned int aics_ip_descr_id; + struct queue *notify; struct queue *pending; @@ -190,6 +239,43 @@ struct bt_vocs { struct gatt_db_attribute *voaodec_ccc; }; +struct aud_ip_st { + int8_t gain_setting; + uint8_t mute; + uint8_t gain_mode; + uint8_t chg_counter; +} __packed; + +struct gain_setting_prop { + uint8_t gain_setting_units; + int8_t gain_setting_min; + int8_t gain_setting_max; +} __packed; + +struct bt_aics_set_gain_setting { + uint8_t change_counter; + int8_t gain_setting; +} __packed; + +struct bt_aics { + struct bt_vcp_db *vdb; + struct aud_ip_st *aud_ipst; + struct gain_setting_prop *gain_settingprop; + uint8_t aud_input_type; + uint8_t aud_input_status; + char *aud_input_descr; + struct gatt_db_attribute *service; + struct gatt_db_attribute *aud_ip_state; + struct gatt_db_attribute *aud_ip_state_ccc; + struct gatt_db_attribute *gain_stting_prop; + struct gatt_db_attribute *aud_ip_type; + struct gatt_db_attribute *aud_ip_status; + struct gatt_db_attribute *aud_ip_status_ccc; + struct gatt_db_attribute *aud_ip_cp; + struct gatt_db_attribute *aud_ip_dscrptn; + struct gatt_db_attribute *aud_ip_dscrptn_ccc; +}; + static struct queue *vcp_db; static struct queue *vcp_cbs; static struct queue *sessions; @@ -268,6 +354,20 @@ static struct bt_vocs *vcp_get_vocs(struct bt_vcp *vcp) return vcp->rdb->vocs; } +static struct bt_aics *vcp_get_aics(struct bt_vcp *vcp) +{ + if (!vcp) + return NULL; + + if (vcp->rdb->aics) + return vcp->rdb->aics; + + vcp->rdb->aics = new0(struct bt_aics, 1); + vcp->rdb->aics->vdb = vcp->rdb; + + return vcp->rdb->aics; +} + static void vcp_detached(void *data, void *user_data) { struct bt_vcp_cb *cb = data; @@ -298,6 +398,7 @@ static void vcp_db_free(void *data) free(vdb->vcs); free(vdb->vocs); + free(vdb->aics); free(vdb); } @@ -982,6 +1083,488 @@ static void vocs_voaodec_read(struct gatt_db_attribute *attrib, iov.iov_len); } +static void aics_input_state_read(struct gatt_db_attribute *attrib, + unsigned int id, uint16_t offset, + uint8_t opcode, struct bt_att *att, + void *user_data) +{ + struct bt_aics *aics = user_data; + struct iovec iov; + + iov.iov_base = aics->aud_ipst; + iov.iov_len = sizeof(*aics->aud_ipst); + + gatt_db_attribute_read_result(attrib, id, 0, iov.iov_base, + iov.iov_len); +} + +static void aics_gain_setting_prop_read(struct gatt_db_attribute *attrib, + unsigned int id, uint16_t offset, + uint8_t opcode, struct bt_att *att, + void *user_data) +{ + struct bt_aics *aics = user_data; + struct iovec iov; + + iov.iov_base = aics->gain_settingprop; + iov.iov_len = sizeof(*aics->gain_settingprop); + + gatt_db_attribute_read_result(attrib, id, 0, iov.iov_base, + iov.iov_len); +} + +static void aics_audio_input_type_read(struct gatt_db_attribute *attrib, + unsigned int id, uint16_t offset, + uint8_t opcode, struct bt_att *att, + void *user_data) +{ + struct bt_aics *aics = user_data; + struct iovec iov; + + iov.iov_base = &aics->aud_input_type; + iov.iov_len = sizeof(aics->aud_input_type); + + gatt_db_attribute_read_result(attrib, id, 0, iov.iov_base, + iov.iov_len); +} + +static void aics_input_status_read(struct gatt_db_attribute *attrib, + unsigned int id, uint16_t offset, + uint8_t opcode, struct bt_att *att, + void *user_data) +{ + struct bt_aics *aics = user_data; + struct iovec iov; + + iov.iov_base = &aics->aud_input_status; + iov.iov_len = sizeof(aics->aud_input_status); + + gatt_db_attribute_read_result(attrib, id, 0, iov.iov_base, + iov.iov_len); +} + +static struct aud_ip_st *vdb_get_audipst(struct bt_vcp_db *vdb) +{ + if (!vdb->aics) + return NULL; + + if (vdb->aics->aud_ipst) + return vdb->aics->aud_ipst; + + return NULL; +} + +static struct gain_setting_prop *vdb_get_gainsettingprop( + struct bt_vcp_db *vdb) +{ + if (!vdb->aics) + return NULL; + + if (vdb->aics->gain_settingprop) + return vdb->aics->gain_settingprop; + + return NULL; +} + +static uint8_t aics_set_gain_setting(struct bt_aics *aics, + struct bt_vcp *vcp, struct iovec *iov) +{ + struct bt_vcp_db *vdb; + struct aud_ip_st *audipst; + struct bt_aics_set_gain_setting *req; + struct gain_setting_prop *gainsettngprop; + uint8_t ret = 1; + + vdb = vcp_get_vdb(vcp); + if (!vdb) { + DBG(vcp, "error: VDB not available"); + ret = 0; + goto respond; + } + + audipst = vdb_get_audipst(vdb); + if (!audipst) { + DBG(vcp, "error: Audio Input State value is not available"); + ret = 0; + goto respond; + + } + + req = iov_pull_mem(iov, sizeof(*req)); + if (!req) { + ret = 0; + goto respond; + + } + + if (req->change_counter != audipst->chg_counter) { + DBG(vcp, "Change Counter Mismatch Audio Input State!"); + ret = BT_ATT_ERROR_INVALID_CHANGE_COUNTER; + goto respond; + } + + if (audipst->gain_mode != AICS_GAIN_MODE_MANUAL_ONLY && + audipst->gain_mode != AICS_GAIN_MODE_MANUAL) { + DBG(vcp, "Gain Mode is not Manual only or Manual"); + ret = BT_ATT_AICS_ERROR_GAIN_MODE_CHANGE_NOT_ALLOWED; + goto respond; + } + + gainsettngprop = vdb_get_gainsettingprop(vdb); + if (req->gain_setting > gainsettngprop->gain_setting_max || + req->gain_setting < gainsettngprop->gain_setting_min) { + DBG(vcp, "error: Value Out of Range"); + ret = BT_ATT_AICS_ERROR_VALUE_OUT_OF_RANGE; + goto respond; + } + + audipst->gain_setting = req->gain_setting; + /*Increment Change Counter*/ + audipst->chg_counter = -~audipst->chg_counter; + gatt_db_attribute_notify(vdb->aics->aud_ip_state, (void *)audipst, + sizeof(struct aud_ip_st), + bt_vcp_get_att(vcp)); + ret = 0; + +respond: + return ret; +} + +static uint8_t aics_unmute(struct bt_aics *aics, struct bt_vcp *vcp, + struct iovec *iov) +{ + struct bt_vcp_db *vdb; + struct aud_ip_st *audipst; + uint8_t *change_counter; + uint8_t ret = 1; + + vdb = vcp_get_vdb(vcp); + if (!vdb) { + DBG(vcp, "error: VDB not available"); + ret = 0; + goto respond; + + } + + audipst = vdb_get_audipst(vdb); + if (!audipst) { + DBG(vcp, "error: Audio Input State value is not available"); + ret = 0; + goto respond; + + } + change_counter = iov_pull_mem(iov, sizeof(*change_counter)); + if (!change_counter) { + ret = 0; + goto respond; + + } + + if (*change_counter != audipst->chg_counter) { + DBG(vcp, "Change Counter Mismatch Audio Input State!"); + ret = BT_ATT_ERROR_INVALID_CHANGE_COUNTER; + goto respond; + } + + if (audipst->mute == AICS_DISABLED) { + DBG(vcp, "Mute state is Disabled!"); + ret = BT_ATT_AICS_ERROR_MUTE_DISABLED; + goto respond; + } + + audipst->mute = AICS_NOT_MUTED; + /*Increment Change Counter*/ + audipst->chg_counter = -~audipst->chg_counter; + gatt_db_attribute_notify(vdb->aics->aud_ip_state, (void *)audipst, + sizeof(struct aud_ip_st), + bt_vcp_get_att(vcp)); + ret = 0; + +respond: + return ret; +} + +static uint8_t aics_mute(struct bt_aics *aics, struct bt_vcp *vcp, + struct iovec *iov) +{ + struct bt_vcp_db *vdb; + struct aud_ip_st *audipst; + uint8_t *change_counter; + uint8_t ret = 1; + + vdb = vcp_get_vdb(vcp); + if (!vdb) { + DBG(vcp, "error: VDB not available"); + ret = 0; + goto respond; + } + + audipst = vdb_get_audipst(vdb); + if (!audipst) { + DBG(vcp, "error: Audio Input State value is not available"); + ret = 0; + goto respond; + } + change_counter = iov_pull_mem(iov, sizeof(*change_counter)); + if (!change_counter) { + ret = 0; + goto respond; + } + + if (*change_counter != audipst->chg_counter) { + DBG(vcp, "Change Counter Mismatch Audio Input State!"); + ret = BT_ATT_ERROR_INVALID_CHANGE_COUNTER; + goto respond; + } + + if (audipst->mute == AICS_DISABLED) { + DBG(vcp, "Mute state is Disabled!"); + ret = BT_ATT_AICS_ERROR_MUTE_DISABLED; + goto respond; + } + + audipst->mute = AICS_MUTED; + /*Increment Change Counter*/ + audipst->chg_counter = -~audipst->chg_counter; + gatt_db_attribute_notify(vdb->aics->aud_ip_state, (void *)audipst, + sizeof(struct aud_ip_st), + bt_vcp_get_att(vcp)); + ret = 0; + +respond: + return ret; +} + +static uint8_t aics_set_manual_gain_mode(struct bt_aics *aics, + struct bt_vcp *vcp, struct iovec *iov) +{ + struct bt_vcp_db *vdb; + struct aud_ip_st *audipst; + uint8_t *change_counter; + uint8_t ret = 1; + + vdb = vcp_get_vdb(vcp); + if (!vdb) { + DBG(vcp, "error: VDB not available"); + ret = 0; + goto respond; + } + + audipst = vdb_get_audipst(vdb); + if (!audipst) { + DBG(vcp, "error: Audio Input State value is not available"); + ret = 0; + goto respond; + } + + change_counter = iov_pull_mem(iov, sizeof(*change_counter)); + if (!change_counter) { + ret = 0; + goto respond; + } + + if (*change_counter != audipst->chg_counter) { + DBG(vcp, "Change Counter Mismatch Audio Input State!"); + ret = BT_ATT_ERROR_INVALID_CHANGE_COUNTER; + goto respond; + } + + if (audipst->gain_mode == AICS_GAIN_MODE_AUTO_ONLY || + audipst->gain_mode == AICS_GAIN_MODE_MANUAL_ONLY) { + DBG(vcp, "error!! gain mode is Automatic only or Manual only"); + ret = BT_ATT_AICS_ERROR_GAIN_MODE_CHANGE_NOT_ALLOWED; + goto respond; + } + + if (audipst->gain_mode == AICS_GAIN_MODE_AUTO) { + audipst->gain_mode = AICS_GAIN_MODE_MANUAL; + /*Increment Change Counter*/ + audipst->chg_counter = -~audipst->chg_counter; + gatt_db_attribute_notify(vdb->aics->aud_ip_state, + (void *)audipst, + sizeof(struct aud_ip_st), + bt_vcp_get_att(vcp)); + ret = 0; + } else { + DBG(vcp, + "error!! Gain mode field value not Automatic"); + ret = BT_ATT_AICS_ERROR_GAIN_MODE_CHANGE_NOT_ALLOWED; + } + +respond: + return ret; +} + +static uint8_t aics_set_auto_gain_mode(struct bt_aics *aics, struct bt_vcp *vcp, + struct iovec *iov) +{ + struct bt_vcp_db *vdb; + struct aud_ip_st *audipst; + uint8_t *change_counter; + uint8_t ret = 1; + + vdb = vcp_get_vdb(vcp); + if (!vdb) { + DBG(vcp, "error: VDB not available"); + ret = 0; + goto respond; + } + + audipst = vdb_get_audipst(vdb); + if (!audipst) { + DBG(vcp, "error: Audio Input State value is not available"); + ret = 0; + goto respond; + } + change_counter = iov_pull_mem(iov, sizeof(*change_counter)); + if (!change_counter) { + ret = 0; + goto respond; + } + + if (*change_counter != audipst->chg_counter) { + DBG(vcp, "Change Counter Mismatch Audio Input State!"); + ret = BT_ATT_ERROR_INVALID_CHANGE_COUNTER; + goto respond; + } + + if (audipst->gain_mode == AICS_GAIN_MODE_AUTO_ONLY || + audipst->gain_mode == AICS_GAIN_MODE_MANUAL_ONLY) { + DBG(vcp, "error!! gain mode is Automatic only or Manual only"); + ret = BT_ATT_AICS_ERROR_GAIN_MODE_CHANGE_NOT_ALLOWED; + goto respond; + } + + if (audipst->gain_mode == AICS_GAIN_MODE_MANUAL) { + audipst->gain_mode = AICS_GAIN_MODE_AUTO; + /*Increment Change Counter*/ + audipst->chg_counter = -~audipst->chg_counter; + gatt_db_attribute_notify(vdb->aics->aud_ip_state, + (void *)audipst, + sizeof(struct aud_ip_st), bt_vcp_get_att(vcp)); + ret = 0; + } else { + DBG(vcp, "error!! Gain mode field value is not Manual"); + ret = BT_ATT_AICS_ERROR_GAIN_MODE_CHANGE_NOT_ALLOWED; + } + +respond: + return ret; +} + +#define AICS_OP(_str, _op, _size, _func) \ + { \ + .str = _str, \ + .op = _op, \ + .size = _size, \ + .func = _func, \ + } + +struct aics_op_handler { + const char *str; + uint8_t op; + size_t size; + uint8_t (*func)(struct bt_aics *aics, struct bt_vcp *vcp, + struct iovec *iov); +} aics_handlers[] = { + AICS_OP("Set Gain Setting", BT_AICS_SET_GAIN_SETTING, + sizeof(struct bt_aics_set_gain_setting), + aics_set_gain_setting), + AICS_OP("Unmute", BT_AICS_UNMUTE, + sizeof(uint8_t), aics_unmute), + AICS_OP("Mute", BT_AICS_MUTE, + sizeof(uint8_t), aics_mute), + AICS_OP("Set Manual Gain Mode", BT_AICS_SET_MANUAL_GAIN_MODE, + sizeof(uint8_t), aics_set_manual_gain_mode), + AICS_OP("Set Automatic Gain Mode", BT_AICS_SET_AUTO_GAIN_MODE, + sizeof(uint8_t), aics_set_auto_gain_mode), + {} +}; + +static void aics_ip_cp_write(struct gatt_db_attribute *attrib, + unsigned int id, uint16_t offset, + const uint8_t *value, size_t len, + uint8_t opcode, struct bt_att *att, + void *user_data) +{ + struct bt_aics *aics = user_data; + struct bt_vcp *vcp = vcp_get_session(att, aics->vdb->db); + struct iovec iov = { + .iov_base = (void *) value, + .iov_len = len, + }; + uint8_t *aics_op; + struct aics_op_handler *handler; + uint8_t ret = BT_ATT_ERROR_REQUEST_NOT_SUPPORTED; + + DBG(vcp, "AICS Control Point Write"); + + if (offset) { + DBG(vcp, "invalid offset %d", offset); + ret = BT_ATT_ERROR_INVALID_OFFSET; + goto respond; + } + + if (len < sizeof(*aics_op)) { + DBG(vcp, "invalid len %ld < %ld sizeof(*param)", len, + sizeof(*aics_op)); + ret = BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN; + goto respond; + } + + aics_op = iov_pull_mem(&iov, sizeof(*aics_op)); + + for (handler = aics_handlers; handler && handler->str; handler++) { + if (handler->op != *aics_op) + continue; + + if (iov.iov_len < handler->size) { + DBG(vcp, "invalid len %ld < %ld handler->size", len, + handler->size); + ret = BT_ATT_ERROR_OPCODE_NOT_SUPPORTED; + goto respond; + } + + break; + } + + if (handler && handler->str) { + DBG(vcp, "%s", handler->str); + + ret = handler->func(aics, vcp, &iov); + } else { + DBG(vcp, "Unknown opcode 0x%02x", *aics_op); + ret = BT_ATT_ERROR_OPCODE_NOT_SUPPORTED; + } + +respond: + gatt_db_attribute_write_result(attrib, id, ret); +} + +static void aics_input_descr_read(struct gatt_db_attribute *attrib, + unsigned int id, uint16_t offset, + uint8_t opcode, struct bt_att *att, + void *user_data) +{ + struct bt_aics *aics = user_data; + struct iovec iov; + + iov.iov_base = aics->aud_input_descr; + iov.iov_len = strlen(aics->aud_input_descr); + + gatt_db_attribute_read_result(attrib, id, 0, iov.iov_base, + iov.iov_len); +} + +static void aics_input_descr_write(struct gatt_db_attribute *attrib, + unsigned int id, uint16_t offset, + const uint8_t *value, size_t len, + uint8_t opcode, struct bt_att *att, + void *user_data) +{ + /* TODO : AICS optional feature */ +} + static struct bt_vcs *vcs_new(struct gatt_db *db, struct bt_vcp_db *vdb) { struct bt_vcs *vcs; @@ -1000,9 +1583,12 @@ static struct bt_vcs *vcs_new(struct gatt_db *db, struct bt_vcp_db *vdb) /* Populate DB with VCS attributes */ bt_uuid16_create(&uuid, VCS_UUID); - vcs->service = gatt_db_add_service(db, &uuid, true, 10); + vcs->service = gatt_db_add_service(db, &uuid, true, + VCS_TOTAL_NUM_HANDLES); gatt_db_service_add_included(vcs->service, vdb->vocs->service); gatt_db_service_set_active(vdb->vocs->service, true); + gatt_db_service_add_included(vcs->service, vdb->aics->service); + gatt_db_service_set_active(vdb->aics->service, true); bt_uuid16_create(&uuid, VOL_STATE_CHRC_UUID); vcs->vs = gatt_db_service_add_characteristic(vcs->service, @@ -1111,6 +1697,108 @@ static struct bt_vocs *vocs_new(struct gatt_db *db) return vocs; } +static struct bt_aics *aics_new(struct gatt_db *db) +{ + struct bt_aics *aics; + struct aud_ip_st *aics_aud_ip_st; + struct gain_setting_prop *aics_gain_settng_prop; + char *ip_descr; + char ip_descr_str[] = "Blueooth"; + bt_uuid_t uuid; + + if (!db) + return NULL; + + aics = new0(struct bt_aics, 1); + + aics_aud_ip_st = new0(struct aud_ip_st, 1); + aics_gain_settng_prop = new0(struct gain_setting_prop, 1); + ip_descr = malloc(256); + memset(ip_descr, 0, 256); + + aics_aud_ip_st->mute = AICS_NOT_MUTED; + aics_aud_ip_st->gain_mode = AICS_GAIN_MODE_MANUAL; + aics_aud_ip_st->gain_setting = AICS_GAIN_SETTING_DEFAULT_VALUE; + aics->aud_ipst = aics_aud_ip_st; + aics_gain_settng_prop->gain_setting_units = AICS_GAIN_SETTING_UNITS; + aics_gain_settng_prop->gain_setting_max = AICS_GAIN_SETTING_MAX_VALUE; + aics_gain_settng_prop->gain_setting_min = AICS_GAIN_SETTING_MIN_VALUE; + aics->gain_settingprop = aics_gain_settng_prop; + aics->aud_input_type = AICS_AUD_IP_TYPE_BLUETOOTH; + aics->aud_input_status = AICS_AUD_IP_STATUS_ACTIVE; + memcpy(ip_descr, ip_descr_str, strlen(ip_descr_str)); + aics->aud_input_descr = ip_descr; + + /* Populate DB with AICS attributes */ + bt_uuid16_create(&uuid, AUDIO_INPUT_CS_UUID); + aics->service = gatt_db_add_service(db, &uuid, false, + AICS_TOTAL_NUM_HANDLES); + + bt_uuid16_create(&uuid, AICS_INPUT_STATE_CHAR_UUID); + aics->aud_ip_state = gatt_db_service_add_characteristic(aics->service, + &uuid, + BT_ATT_PERM_READ, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_NOTIFY, + aics_input_state_read, + NULL, + aics); + aics->aud_ip_state_ccc = gatt_db_service_add_ccc(aics->service, + BT_ATT_PERM_READ | BT_ATT_PERM_WRITE); + + bt_uuid16_create(&uuid, AICS_GAIN_SETTING_PROP_CHAR_UUID); + aics->gain_stting_prop = gatt_db_service_add_characteristic( + aics->service, + &uuid, + BT_ATT_PERM_READ, + BT_GATT_CHRC_PROP_READ, + aics_gain_setting_prop_read, NULL, + aics); + + bt_uuid16_create(&uuid, AICS_AUDIO_INPUT_TYPE_CHAR_UUID); + aics->aud_ip_type = gatt_db_service_add_characteristic(aics->service, + &uuid, + BT_ATT_PERM_READ, + BT_GATT_CHRC_PROP_READ, + aics_audio_input_type_read, NULL, + aics); + + bt_uuid16_create(&uuid, AICS_INPUT_STATUS_CHAR_UUID); + aics->aud_ip_status = gatt_db_service_add_characteristic(aics->service, + &uuid, + BT_ATT_PERM_READ, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_NOTIFY, + aics_input_status_read, NULL, + aics); + aics->aud_ip_status_ccc = gatt_db_service_add_ccc(aics->service, + BT_ATT_PERM_READ | BT_ATT_PERM_WRITE); + + bt_uuid16_create(&uuid, AICS_AUDIO_INPUT_CP_CHRC_UUID); + aics->aud_ip_cp = gatt_db_service_add_characteristic(aics->service, + &uuid, + BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_WRITE, + NULL, aics_ip_cp_write, + aics); + + bt_uuid16_create(&uuid, AICS_INPUT_DESCR_CHAR_UUID); + aics->aud_ip_dscrptn = gatt_db_service_add_characteristic(aics->service, + &uuid, + BT_ATT_PERM_READ | + BT_ATT_PERM_WRITE, + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_WRITE_WITHOUT_RESP | + BT_GATT_CHRC_PROP_NOTIFY, + aics_input_descr_read, + aics_input_descr_write, + aics); + aics->aud_ip_dscrptn_ccc = gatt_db_service_add_ccc(aics->service, + BT_ATT_PERM_READ | BT_ATT_PERM_WRITE); + + return aics; +} + static struct bt_vcp_db *vcp_db_new(struct gatt_db *db) { struct bt_vcp_db *vdb; @@ -1126,6 +1814,10 @@ static struct bt_vcp_db *vcp_db_new(struct gatt_db *db) vdb->vocs = vocs_new(db); vdb->vocs->vdb = vdb; + + vdb->aics = aics_new(db); + vdb->aics->vdb = vdb; + vdb->vcs = vcs_new(db, vdb); vdb->vcs->vdb = vdb; @@ -1685,6 +2377,307 @@ static void foreach_vocs_char(struct gatt_db_attribute *attr, void *user_data) } +static void read_aics_audio_ip_state(struct bt_vcp *vcp, bool success, + uint8_t att_ecode, + const uint8_t *value, uint16_t length, + void *user_data) +{ + struct aud_ip_st *ip_st; + struct iovec iov = { + .iov_base = (void *) value, + .iov_len = length, + }; + + if (!success) { + DBG(vcp, "Unable to read Audio Input State: error 0x%02x", + att_ecode); + return; + } + + ip_st = iov_pull_mem(&iov, sizeof(*ip_st)); + if (!ip_st) { + DBG(vcp, "Unable to get Audio Input State"); + return; + } + + DBG(vcp, "Audio Input State, Gain Setting:%d", ip_st->gain_setting); + DBG(vcp, "Audio Input State, Mute:%x", ip_st->mute); + DBG(vcp, "Audio Input State, Gain Mode:%x", ip_st->gain_mode); + DBG(vcp, "Audio Input State, Change Counter:%x", ip_st->chg_counter); +} + +static void aics_ip_state_notify(struct bt_vcp *vcp, uint16_t value_handle, + const uint8_t *value, uint16_t length, + void *user_data) +{ + struct aud_ip_st ip_st; + + memcpy(&ip_st, value, sizeof(struct aud_ip_st)); + + DBG(vcp, "Audio Input State, Gain Setting:%d", ip_st.gain_setting); + DBG(vcp, "Audio Input State, Mute:%x", ip_st.mute); + DBG(vcp, "Audio Input State, Gain Mode:%x", ip_st.gain_mode); + DBG(vcp, "Audio Input State, Change Counter:%x", ip_st.chg_counter); +} + +static void read_aics_gain_setting_prop(struct bt_vcp *vcp, bool success, + uint8_t att_ecode, + const uint8_t *value, uint16_t length, + void *user_data) +{ + struct gain_setting_prop *aics_gain_setting_prop; + struct iovec iov = { + .iov_base = (void *) value, + .iov_len = length, + }; + + if (!value) { + DBG(vcp, "Unable to get Gain Setting Properties Char"); + return; + } + + if (!success) { + DBG(vcp, + "Unable to read Gain Setting Properties Char: 0x%02x", + att_ecode); + return; + } + + aics_gain_setting_prop = iov_pull_mem(&iov, + sizeof(*aics_gain_setting_prop)); + if (!aics_gain_setting_prop) { + DBG(vcp, "Unable to get Gain Setting Properties Char"); + return; + } + + DBG(vcp, "Gain Setting Properties, Units: %x", + aics_gain_setting_prop->gain_setting_units); + DBG(vcp, "Gain Setting Properties, Min Value: %d", + aics_gain_setting_prop->gain_setting_min); + DBG(vcp, "Gain Setting Properties, Max Value: %d", + aics_gain_setting_prop->gain_setting_max); +} + +static void read_aics_aud_ip_type(struct bt_vcp *vcp, bool success, + uint8_t att_ecode, + const uint8_t *value, uint16_t length, + void *user_data) +{ + uint8_t ip_type; + + if (!success) { + DBG(vcp, + "Unable to read Audio Input Type Char: error 0x%02x", + att_ecode); + return; + } + + memcpy(&ip_type, value, length); + + DBG(vcp, "Audio Input Type : %x", ip_type); +} + +static void read_aics_audio_ip_status(struct bt_vcp *vcp, bool success, + uint8_t att_ecode, + const uint8_t *value, uint16_t length, + void *user_data) +{ + uint8_t ip_status; + + if (!success) { + DBG(vcp, + "Unable to read Audio Input Status Char: 0x%02x", att_ecode); + return; + } + + memcpy(&ip_status, value, length); + + DBG(vcp, "Audio Input Status : %x", ip_status); +} + +static void aics_ip_status_notify(struct bt_vcp *vcp, uint16_t value_handle, + const uint8_t *value, + uint16_t length, + void *user_data) +{ + uint8_t ip_status; + + memcpy(&ip_status, value, length); + + DBG(vcp, "Audio Input Status, %x", ip_status); +} + +static void read_aics_audio_ip_description(struct bt_vcp *vcp, bool success, + uint8_t att_ecode, + const uint8_t *value, + uint16_t length, + void *user_data) +{ + char *ip_descrptn; + + if (!value) { + DBG(vcp, "Unable to get Audio Input Description"); + return; + } + + if (!success) { + DBG(vcp, + "Unable to read Audio Input Description Char: error 0x%02x", + att_ecode); + return; + } + + ip_descrptn = malloc(length+1); + memset(ip_descrptn, 0, length+1); + memcpy(ip_descrptn, value, length); + + if (!ip_descrptn) { + DBG(vcp, "Unable to get Audio Input Description"); + return; + } + + DBG(vcp, "Audio Input Description: %s", ip_descrptn); + free(ip_descrptn); + ip_descrptn = NULL; +} + +static void aics_audio_ip_desr_notify(struct bt_vcp *vcp, uint16_t value_handle, + const uint8_t *value, uint16_t length, + void *user_data) +{ + char *aud_ip_desr; + + aud_ip_desr = malloc(length+1); + memset(aud_ip_desr, 0, length+1); + memcpy(aud_ip_desr, value, length); + + DBG(vcp, "Audio Input Description Notify, %s", aud_ip_desr); + free(aud_ip_desr); + aud_ip_desr = NULL; +} + +static void foreach_aics_char(struct gatt_db_attribute *attr, void *user_data) +{ + struct bt_vcp *vcp = user_data; + uint16_t value_handle; + bt_uuid_t uuid, uuid_ipstate, uuid_gain_setting_prop, uuid_ip_type, + uuid_ip_status, uuid_ip_cp, uuid_ip_decs; + struct bt_aics *aics; + + if (!gatt_db_attribute_get_char_data(attr, NULL, &value_handle, + NULL, NULL, &uuid)) + return; + + bt_uuid16_create(&uuid_ipstate, AICS_INPUT_STATE_CHAR_UUID); + bt_uuid16_create(&uuid_gain_setting_prop, + AICS_GAIN_SETTING_PROP_CHAR_UUID); + bt_uuid16_create(&uuid_ip_type, AICS_AUDIO_INPUT_TYPE_CHAR_UUID); + bt_uuid16_create(&uuid_ip_status, AICS_INPUT_STATUS_CHAR_UUID); + bt_uuid16_create(&uuid_ip_cp, AICS_AUDIO_INPUT_CP_CHRC_UUID); + bt_uuid16_create(&uuid_ip_decs, AICS_INPUT_DESCR_CHAR_UUID); + + + if (!bt_uuid_cmp(&uuid, &uuid_ipstate)) { + DBG(vcp, + "AICS Audio Input State Char found: handle 0x%04x", + value_handle); + + aics = vcp_get_aics(vcp); + if (!aics || aics->aud_ip_state) + return; + + aics->aud_ip_state = attr; + + vcp_read_value(vcp, value_handle, + read_aics_audio_ip_state, vcp); + + vcp->aics_ip_state_id = vcp_register_notify(vcp, value_handle, + aics_ip_state_notify, NULL); + + return; + } + + if (!bt_uuid_cmp(&uuid, &uuid_gain_setting_prop)) { + DBG(vcp, + "AICS Gain Setting Properties Char found: handle 0x%04x", + value_handle); + + aics = vcp_get_aics(vcp); + if (!aics || aics->gain_stting_prop) + return; + + aics->gain_stting_prop = attr; + + vcp_read_value(vcp, value_handle, read_aics_gain_setting_prop, + vcp); + return; + } + + if (!bt_uuid_cmp(&uuid, &uuid_ip_type)) { + DBG(vcp, "AICS Audio Input Type Char found: handle 0x%04x", + value_handle); + + aics = vcp_get_aics(vcp); + if (!aics || aics->gain_stting_prop) + return; + + aics->aud_ip_type = attr; + + vcp_read_value(vcp, value_handle, read_aics_aud_ip_type, + vcp); + return; + } + + if (!bt_uuid_cmp(&uuid, &uuid_ip_status)) { + DBG(vcp, + "AICS Audio Input Status Char found: handle 0x%04x", + value_handle); + + aics = vcp_get_aics(vcp); + if (!aics || aics->aud_ip_status) + return; + + aics->aud_ip_status = attr; + + vcp_read_value(vcp, value_handle, + read_aics_audio_ip_status, vcp); + + vcp->aics_ip_status_id = vcp_register_notify(vcp, value_handle, + aics_ip_status_notify, NULL); + + return; + } + + if (!bt_uuid_cmp(&uuid, &uuid_ip_cp)) { + DBG(vcp, "AICS Input CP found: handle 0x%04x", value_handle); + + aics = vcp_get_aics(vcp); + if (!aics || aics->aud_ip_cp) + return; + + aics->aud_ip_cp = attr; + + return; + } + + if (!bt_uuid_cmp(&uuid, &uuid_ip_decs)) { + DBG(vcp, + "AICS Audio Input Description Char found: handle 0x%04x", + value_handle); + + aics = vcp_get_aics(vcp); + if (!aics || aics->aud_ip_dscrptn) + return; + + aics->aud_ip_dscrptn = attr; + + vcp_read_value(vcp, value_handle, + read_aics_audio_ip_description, vcp); + vcp->aics_ip_descr_id = vcp_register_notify(vcp, value_handle, + aics_audio_ip_desr_notify, NULL); + } +} + static void foreach_vcs_service(struct gatt_db_attribute *attr, void *user_data) { @@ -1711,6 +2704,19 @@ static void foreach_vocs_service(struct gatt_db_attribute *attr, gatt_db_service_foreach_char(attr, foreach_vocs_char, vcp); } +static void foreach_aics_service(struct gatt_db_attribute *attr, + void *user_data) +{ + struct bt_vcp *vcp = user_data; + struct bt_aics *aics = vcp_get_aics(vcp); + + aics->service = attr; + + gatt_db_service_set_claimed(attr, true); + + gatt_db_service_foreach_char(attr, foreach_aics_char, vcp); +} + bool bt_vcp_attach(struct bt_vcp *vcp, struct bt_gatt_client *client) { bt_uuid_t uuid; @@ -1736,6 +2742,9 @@ bool bt_vcp_attach(struct bt_vcp *vcp, struct bt_gatt_client *client) bt_uuid16_create(&uuid, VOL_OFFSET_CS_UUID); gatt_db_foreach_service(vcp->rdb->db, &uuid, foreach_vocs_service, vcp); + bt_uuid16_create(&uuid, AUDIO_INPUT_CS_UUID); + gatt_db_foreach_service(vcp->rdb->db, &uuid, foreach_aics_service, vcp); + return true; } From patchwork Fri Dec 8 11:42:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mahesh Talewad X-Patchwork-Id: 13485348 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="oEMdotgd" Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2078.outbound.protection.outlook.com [40.107.247.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4381A1724 for ; Fri, 8 Dec 2023 03:43:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O4jf5hjYNa33ERHhqzzH4K8Ytd88V9OB8uKDDfCXI9htHma9J8huIuOR3esv3xUkhQqbTE3M2UGJXAYR39Bs9xpFN4+Bzqb8ko0j2f5vIQ+7SaaYEKPE3VIIC5uNsdGRHok607rMf6IJBArzSaQSnXzzFb8DE65wbN0k/+iEigx9jDkdpZ8tCKpOrwEi8NofB93RfJrGnkWiwI0xw0EnmhtvN/wWuIHtqJksOr1geXhL+J32TS+qt6HyAP9O+v9iciRN25UimVGs17ORR6OL1nw0TdJLz3P/Xt7AMh9li9uLHQK01eatceKDLYyXkmLnGuKegIcS3bcVsvUZ0buGPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t3QoAuzWlVcZLcHqpFT65Ku9f2/Nbr7i3Ff0Rygmm6c=; b=Q/s0/7O2b2TB10Jx0EcgGHAnXhW8AA6Onk1Sv3isJkNC7DsP+Xs2IRn+7Y4bXH8CcxpAZ+Ith5t7qo7VyRaZ8jnOtvucHlv8g6LvY2SISwKgEQ9zvfbJyf8JaQ5m5F9oroyj2Pz85jhPNt/DPEornXtT9uTcjaXCf8gBepyF+gXLJMCN4NtqvAgx9byGZFFh9ZwkmUeykmDaISPzlbj9xk9gZwE3t7f2L/FBLCaNSd2xrZH/9Uq2FKlRZHy++cYQJ9V2rUPLpn+Kf7raiO82FSdgCnGpUk9Jrh13zY8CyQBaAUK16LZL0dBvp1i8iA714gdozqsKnTZmsNT4SKxiRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t3QoAuzWlVcZLcHqpFT65Ku9f2/Nbr7i3Ff0Rygmm6c=; b=oEMdotgdrc8dXsP6Ejl64VjvIV7ydTfyX+b76KiO9PiknFT+FuE5KIadwY9U+QkI+kAqBZyWI0j6FfhXpYgDMLz6hE0PKDL+XjfA3OZDDlTv5EOt3ImC7lu/Fr/XDDWVFB0CZYnlRYpx8n35swjozQoCgA/Foq1ViKxj9sKnkPI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR0402MB3952.eurprd04.prod.outlook.com (2603:10a6:803:1c::10) by DBAPR04MB7237.eurprd04.prod.outlook.com (2603:10a6:10:1a4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.28; Fri, 8 Dec 2023 11:43:49 +0000 Received: from VI1PR0402MB3952.eurprd04.prod.outlook.com ([fe80::b837:b0d8:1b75:9a5e]) by VI1PR0402MB3952.eurprd04.prod.outlook.com ([fe80::b837:b0d8:1b75:9a5e%5]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 11:43:49 +0000 From: Mahesh Talewad To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, devyani.godbole@nxp.com, nitin.jadhav@nxp.com, mahesh.talewad@nxp.com Subject: [PATCH BlueZ v2 3/3] unit/test-vcp.c: AICS unit test case implementation Date: Fri, 8 Dec 2023 13:42:58 +0200 Message-Id: <20231208114258.133709-4-mahesh.talewad@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231208114258.133709-1-mahesh.talewad@nxp.com> References: <20231208114258.133709-1-mahesh.talewad@nxp.com> X-ClientProxiedBy: AS4P191CA0033.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:657::20) To VI1PR0402MB3952.eurprd04.prod.outlook.com (2603:10a6:803:1c::10) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0402MB3952:EE_|DBAPR04MB7237:EE_ X-MS-Office365-Filtering-Correlation-Id: 9dff3728-f04c-4f6d-121c-08dbf7e2f1c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XwjAb4dEprtR6Q2qBCuN+Bnfp8UeJk19IuW0AZ7T6wTGs5aMFMkEVhl+Yr0ly/UTwZrVgKqgpuL8vw71/weV/4No3erhQweFX1KbcB3rF4RNjw4JlMbUmPLnWKoV9k/2D7a3lbpYwIekonNsS26Vas3168a2VFh8stjqQTQZpTbNSki+JzTtb5n229vDM0WaQBqanhwTiKjgLamnqxRGlhAhHYl000MpBjf2PLRCZzQQnHrmadzTLXGJkzgC4PGKeoO677GPs1Mz135ny7b8FEVRw3tPp8ZpFvjxbsJYRzDTmGG7QXEWcTHB0xl5S1ttTR0iPfSRVX03RIbmnzIW6zu/nrjS2dpuyoMwUonhUlvh6TiZGX+6iqrHM26BIyOoNhAIZm97PWgMrJOIAqhRkgyw1YvT52IpG8TkRBGtZATxGiPFRZ7buCNrylEczG/a1bEMd0wFL4rRiLCJTpHRHo9bzuLZ6/dDj8b0srScORoVQGkL6yDwBbBJGJOPXBQkT/CE66CILC3wiukg6hSO4aW/SIwjw9HW9RN0PVySz7vDEwEcYgARorV8QRWLPND5rxu0LCPNBzCcBw9dJNkI7Q/IZPGhSv5Yi83T2TYUxlLROXczhAHZUBz8REBIS4B8 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0402MB3952.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(346002)(39860400002)(136003)(376002)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(8676002)(8936002)(4326008)(44832011)(6666004)(6486002)(478600001)(316002)(6916009)(66946007)(66476007)(66556008)(41300700001)(38350700005)(5660300002)(30864003)(36756003)(2906002)(1076003)(26005)(2616005)(83380400001)(38100700002)(86362001)(52116002)(6512007)(6506007)(559001)(579004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?IQ9nDf+toy5Gqh23eih3R1cBtUj5?= =?utf-8?q?TeZd7jDkmEz9Qmig2JKNH3MsxFldQy9Jjb+VUMFbKpOd/ZJn2CZKAOM+1yORrT5Bm?= =?utf-8?q?UVYV0Yf/cf5+9BFqn1uuAhSmLBMAR+BhEYzcc2b4LE5/Dhke4KoxibfYYHM+CJgRT?= =?utf-8?q?Epj16YVO3UDSazYhpAK2L1rBASp2fMaL23MLrdPWlRONq7pEWPp1yoeaF4FVyfAm1?= =?utf-8?q?SjsrTYu09BfRz06Bs+Mks5VXEIIKHzRHsNeiFjByOiKXqH1JJ4OM7GQtIrLkX8xTp?= =?utf-8?q?ihZM8sHbU8C5O+djRizya6w9rRERsLSD3QvSm1JOMObJZ7soXdAHPImt7yS/pAcSM?= =?utf-8?q?2KH05kYiT4vvft5yOtImb1FDbdjFfUbgPy/Bj4Q2Vba68T2NsU876J64UnoSm5hTR?= =?utf-8?q?60Wgbr6GUDeOysV+ph1YOC3NlFJAW4IU9lBlHlK6Pt4kpeUTHa75z1uO5rYHVNKqh?= =?utf-8?q?XTicvUtifzr/HZv6a2hy2Euvc8y7UC0MOOae15X8NRdXF3wHLU574WnprlJoF2Lxw?= =?utf-8?q?J8KxTLe28/BAF+FtnUotqNqmp7rtBHKpADeqsMweZqkHAOMCfFb50+zVVm0ZESE4u?= =?utf-8?q?8hSSL8AORpV0uthyTM6HekpBzr3PJD/qdvbz8AYYKGFlAkkUxVjEaKoMpZDVfOgZm?= =?utf-8?q?tguKH7i5/GkYjAfx/k8AFZZ5OPNjQY6/B5TR/Xo+h093eFCJs5z5qMjdU16aaCtme?= =?utf-8?q?Rj2zu32QKeP1V5BfkPquoQjiqQ2zZQYizSR5zS2m+s9NOEk7mO0uFJj3TMqDOkPHT?= =?utf-8?q?R3dbt10QVSk0nH9cmfV174ROL+RV5g+wyo2S0tIY775lcp2KUxo7jEKuDxi8DQ+12?= =?utf-8?q?X/6XY7bZqXtjdAlOOkLwoj8vkAt95tKyEWGC5FVKL/B5uFK6r5kXGWvbl1QerVH0h?= =?utf-8?q?o7CXhQ8fnwJ8V3CxxW0KutDYz0dNtlUyEsk7QDrV1RyIfwqK03xtZV+ZE5Tz1Cs9O?= =?utf-8?q?strYVJ5NYJ8/HEIxCMslOnN2SCpv9TL+Rp4VV5Jmgn7a2nOYG7Ts7PuCI4oc4WVmd?= =?utf-8?q?87hcKLiG45IHpeQxoe49OCB4l4ggbnftUTQDl3aMR9gw9vZWKYOEvzm7iDOcv1NhZ?= =?utf-8?q?FetPygytmwe0oLO+T6t95lBZKD6SF83ryFeid/YQkKGjUQhmHsdIh9uJnbVtNq9az?= =?utf-8?q?56CAzjfV2EHF+OuPfM9GLdWRYYAefqAnGSKAaOfTZA7QygArzZmGSUBgqArejj4oe?= =?utf-8?q?wL9JeX8BIeFCTCjsFI69yQWCid2HPN7b9JG57S613zy45DbZEVfP/7r49UrSRrY5W?= =?utf-8?q?AySmVE5cFj7b673HEG6CX9X5iER2+MYG+XT3dRwXgXqV4jFK4sHz2xN8+joaECJeR?= =?utf-8?q?NLSrBc6vk84BisOFkJF5z4e+znUMkbDjMAvxk87SACw7qade2wexXLZncolCPMEBh?= =?utf-8?q?eODwdAo/Ql7TNL3Rjt4vBMYOZvszTmbVIc9fctiLVApcDEl/Yzw8KBtascQhvfA+X?= =?utf-8?q?95SCQgvBfPQKjpau+knkaZu7jZPuh3qlPNk26MCfLOk9kXsI2VKsTkBhoizIYN5BF?= =?utf-8?q?pif2fW2q71EMakYsryz3js/K8azpO9N48w=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9dff3728-f04c-4f6d-121c-08dbf7e2f1c0 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3952.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 11:43:49.6745 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: O368DVOom6nVbunDlajlxbm2Vouvrr2UXNbBMEr2H4uBhQ/JQMB1Z9/smgXHH2aY46yZE2v4y5QcWnziJHnnBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7237 - Implementated 15-Mandatory AICS Unit Test cases. - Tested all these 15-Mandatory AICS Unit Testcases and all are passing. - Specification referred for implementation: AICS.TS.p0.pdf --- unit/test-vcp.c | 1473 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1442 insertions(+), 31 deletions(-) diff --git a/unit/test-vcp.c b/unit/test-vcp.c index ea1bc9876..efd96c672 100644 --- a/unit/test-vcp.c +++ b/unit/test-vcp.c @@ -215,7 +215,7 @@ static void test_server(const void *user_data) * ATT: Exchange MTU Response (0x03) len 2 * Server RX MTU: 64 */ -#define VOCS_EXCHANGE_MTU \ +#define VCS_EXCHANGE_MTU \ IOV_DATA(0x02, 0x40, 0x00), \ IOV_DATA(0x03, 0x40, 0x00) @@ -226,23 +226,23 @@ static void test_server(const void *user_data) * ATT: Read By Group Type Response (0x11) len 7 * Attribute data length: 6 * Attribute group list: 1 entry - * Handle range: 0x000d-0x0016 + * Handle range: 0x001d-0x0027 * UUID: Volume Control (0x1844) * * ATT: Read By Group Type Request (0x10) len 6 - * Handle range: 0x0017-0xffff + * Handle range: 0x0027-0xffff * Attribute group type: Primary Service (0x2800) * * ATT: Error Response (0x01) len 4 * Read By Group Type Request (0x10) - * Handle: 0x0017 + * Handle: 0x0027 * Error: Attribute Not Found (0x0a) */ -#define VOCS_PRIMARY_SERVICE_VCS \ +#define VOCS_AICS_PRIMARY_SERVICE_VCS \ IOV_DATA(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28), \ - IOV_DATA(0x11, 0x06, 0x0d, 0x00, 0x16, 0x00, 0x44, 0x18), \ - IOV_DATA(0x10, 0x17, 0x00, 0xff, 0xff, 0x00, 0x28), \ - IOV_DATA(0x01, 0x10, 0x17, 0x00, 0x0a) + IOV_DATA(0x11, 0x06, 0x1d, 0x00, 0x27, 0x00, 0x44, 0x18), \ + IOV_DATA(0x10, 0x27, 0x00, 0xff, 0xff, 0x00, 0x28), \ + IOV_DATA(0x01, 0x10, 0x27, 0x00, 0x0a) /* ATT: Read By Group Type Request (0x10) len 6 * Handle range: 0x0001-0xffff @@ -250,24 +250,28 @@ static void test_server(const void *user_data) * * ATT: Read By Group Type Response (0x11) len 7 * Attribute data length: 6 - * Attribute group list: 1 entry + * Attribute group list: 2 entry * Handle range: 0x0001-0x000c * UUID: Volume Offset Control (0x1845) + * Handle range: 0x000d-0x001c + * UUID: Audio Input Control (0x1843) * * ATT: Read By Group Type Request (0x10) len 6 - * Handle range: 0x000d-0xffff + * Handle range: 0x001d-0xffff * Attribute group type: Secondary Service (0x2801) * * ATT: Error Response (0x01) len 4 * Read By Group Type Request (0x10) - * Handle: 0x000d + * Handle: 0x001d * Error: Attribute Not Found (0x0a) */ -#define VOCS_SECONDARY_SERVICE_VOCS \ +#define VOCS_AICS_SECONDARY_SERVICE \ IOV_DATA(0x10, 0x01, 0x00, 0xff, 0xff, 0x01, 0x28), \ - IOV_DATA(0x11, 0x06, 0x01, 0x00, 0x0c, 0x00, 0x45, 0x18), \ - IOV_DATA(0x10, 0x0d, 0x00, 0xff, 0xff, 0x01, 0x28), \ - IOV_DATA(0x01, 0x10, 0x0d, 0x00, 0x0a) + IOV_DATA(0x11, 0x06, \ + 0x01, 0x00, 0x0c, 0x00, 0x45, 0x18, \ + 0x0d, 0x00, 0x1c, 0x00, 0x43, 0x18), \ + IOV_DATA(0x10, 0x1d, 0x00, 0xff, 0xff, 0x01, 0x28), \ + IOV_DATA(0x01, 0x10, 0x1d, 0x00, 0x0a) /* ATT: Read By Type Request (0x08) len 6 * Handle range: 0x0001-0xffff @@ -275,25 +279,28 @@ static void test_server(const void *user_data) * * ATT: Read By Type Response (0x09) len 9 * Attribute data length: 8 - * Attribute data list: 1 entry - * Handle: 0x000e + * Attribute data list: 2 entries + * Handle: 0x001e * Value: 01000c004518 + * Handle: 0x001f + * Value: 0d001c004318 * * ATT: Read By Type Request (0x08) len 6 - * Handle range: 0x000f-0xffff + * Handle range: 0x0020-0xffff * Attribute type: Include (0x2802) * * ATT: Error Response (0x01) len 4 * Read By Type Request (0x08) - * Handle: 0x000f + * Handle: 0x0020 * Error: Attribute Not Found (0x0a) */ -#define VOCS_INCLUDED_SERVICE_VOCS \ +#define VOCS_AICS_INCLUDED_SERVICE \ IOV_DATA(0x08, 0x01, 0x00, 0xff, 0xff, 0x02, 0x28), \ IOV_DATA(0x09, 0x08, \ - 0x0e, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x45, 0x18), \ - IOV_DATA(0x08, 0x0f, 0x00, 0xff, 0xff, 0x02, 0x28), \ - IOV_DATA(0x01, 0x08, 0x0f, 0x00, 0x0a) + 0x1e, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x45, 0x18, \ + 0x1f, 0x00, 0x0d, 0x00, 0x1c, 0x00, 0x43, 0x18), \ + IOV_DATA(0x08, 0x20, 0x00, 0xff, 0xff, 0x02, 0x28), \ + IOV_DATA(0x01, 0x08, 0x20, 0x00, 0x0a) /* ATT: Read By Type Request (0x08) len 6 * Handle range: 0x0001-0x000c @@ -330,6 +337,48 @@ static void test_server(const void *user_data) IOV_DATA(0x08, 0x0b, 0x00, 0x0c, 0x00, 0x03, 0x28), \ IOV_DATA(0x01, 0x08, 0x0b, 0x00, 0x0a) + /* + * ATT: Read By Type Request (0x08) len 6 + * Handle range: 0x000d-0x001c + * Attribute type: Characteristic (0x2803) + * + * ATT: Read By Type Response (0x09) len 43 + * Attribute data length: 7 + * Attribute data list: 6 entries + * Handle: 0x000e + * Value: 120f00772b + * Handle: 0x0011 + * Value: 021200782b + * Handle: 0x0013 + * Value: 021400792b + * Handle: 0x0015 + * Value: 1216007a2b + * Handle: 0x0018 + * Value: 0819007b2b + * Handle: 0x001a + * Value: 161b007c2b + * + * ATT: Read By Type Request (0x08) len 6 + * Handle range: 0x001b-0x001c + * Attribute type: Characteristic (0x2803) + * + * ATT: Error Response (0x01) len 4 + * Read By Type Request (0x08) + * Handle: 0x001b + * Error: Attribute Not Found (0x0a) + */ + #define AICS_DISC_CHAR \ + IOV_DATA(0x08, 0x0d, 0x00, 0x1c, 0x00, 0x03, 0x28), \ + IOV_DATA(0x09, 0x07, \ + 0x0e, 0x00, 0x12, 0x0f, 0x00, 0x77, 0x2b, \ + 0x11, 0x00, 0x02, 0x12, 0x00, 0x78, 0x2b, \ + 0x13, 0x00, 0x02, 0x14, 0x00, 0x79, 0x2b, \ + 0x15, 0x00, 0x12, 0x16, 0x00, 0x7a, 0x2b, \ + 0x18, 0x00, 0x08, 0x19, 0x00, 0x7b, 0x2b, \ + 0x1a, 0x00, 0x16, 0x1b, 0x00, 0x7c, 0x2b), \ + IOV_DATA(0x08, 0x1b, 0x00, 0x1c, 0x00, 0x03, 0x28), \ + IOV_DATA(0x01, 0x08, 0x1b, 0x00, 0x0a) + /* ATT: Find Information Request (0x04) len 4 * Handle range: 0x0004-0x0004 * @@ -362,6 +411,39 @@ static void test_server(const void *user_data) IOV_DATA(0x04, 0x0c, 0x00, 0x0c, 0x00), \ IOV_DATA(0x05, 0x01, 0x0c, 0x00, 0x02, 0x29) + /* + * ATT: Find Information Request (0x04) len 4 + * Handle range: 0x0010-0x0010 + * + * ATT: Find Information Response (0x05) len 5 + * Format: UUID-16 (0x01) + * Handle: 0x0010 + * UUID: Client Characteristic Configuration (0x2902) + * + * ATT: Find Information Request (0x04) len 4 + * Handle range: 0x0017-0x0017 + * + * ATT: Find Information Response (0x05) len 5 + * Format: UUID-16 (0x01) + * Handle: 0x0017 + * UUID: Client Characteristic Configuration (0x2902) + * + * ATT: Find Information Request (0x04) len 4 + * Handle range: 0x001c-0x001c + * + * ATT: Find Information Response (0x05) len 5 + * Format: UUID-16 (0x01) + * Handle: 0x001c + * UUID: Client Characteristic Configuration (0x2902) + */ + #define AICS_DISC_CHAR_DESC \ + IOV_DATA(0x04, 0x10, 0x00, 0x10, 0x00), \ + IOV_DATA(0x05, 0x01, 0x10, 0x00, 0x02, 0x29), \ + IOV_DATA(0x04, 0x17, 0x00, 0x17, 0x00), \ + IOV_DATA(0x05, 0x01, 0x17, 0x00, 0x02, 0x29), \ + IOV_DATA(0x04, 0x1c, 0x00, 0x1c, 0x00), \ + IOV_DATA(0x05, 0x01, 0x1c, 0x00, 0x02, 0x29) + /* ATT: Read Request (0x0a) len 2 * Handle: 0x0004 * @@ -386,6 +468,1119 @@ static void test_server(const void *user_data) IOV_DATA(0x0a, 0x0c, 0x00), \ IOV_DATA(0x0b, 0x00, 0x00) + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x0010 + * ATT: Read Response (0x0b) len 2 + * + * ATT: Read Request (0x0a) len 2 + * Handle: 0x0017 + * ATT: Read Response (0x0b) len 2 + * + * ATT: Read Request (0x0a) len 2 + * Handle: 0x001c + * ATT: Read Response (0x0b) len 2 + */ +#define AICS_READ_CHAR_DESC \ + IOV_DATA(0x0a, 0x10, 0x00), \ + IOV_DATA(0x0b, 0x00, 0x00), \ + IOV_DATA(0x0a, 0x17, 0x00), \ + IOV_DATA(0x0b, 0x00, 0x00), \ + IOV_DATA(0x0a, 0x1c, 0x00), \ + IOV_DATA(0x0b, 0x00, 0x00) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x0012 + * + * ATT: Read Response (0x0b) len 3 + */ +#define AICS_READ_CHAR_GAIN_SETTNG_PROP \ + IOV_DATA(0x0a, 0x12, 0x00), \ + IOV_DATA(0x0b, 0x01, 0x80, 0x7f) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x000f + * + * ATT: Read Response (0x0b) len 4 + */ +#define AICS_READ_CHAR_AUD_IP_STATE \ + IOV_DATA(0x0a, 0x0f, 0x00), \ + IOV_DATA(0x0b, 0x58, 0x00, 0x02, 00) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x000f + * + * ATT: Read Response (0x0b) len 4 + */ +#define AICS_READ_CHAR_AUD_IP_STATE_MUT_DIS \ + IOV_DATA(0x0a, 0x0f, 0x00), \ + IOV_DATA(0x0b, 0x58, 0x02, 0x02, 00) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x000f + * + * ATT: Read Response (0x0b) len 4 + */ +#define AICS_READ_CHAR_AUD_IP_STATE_MUTED \ + IOV_DATA(0x0a, 0x0f, 0x00), \ + IOV_DATA(0x0b, 0x58, 0x01, 0x02, 00) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x000f + * + * ATT: Read Response (0x0b) len 4 + */ +#define AICS_READ_CHAR_AUD_IP_STATE_UNMUTED \ + IOV_DATA(0x0a, 0x0f, 0x00), \ + IOV_DATA(0x0b, 0x58, 0x00, 0x02, 00) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x000f + * + * ATT: Read Response (0x0b) len 4 + */ +#define AICS_READ_CHAR_AUD_IP_STATE_AUTOMATIC \ + IOV_DATA(0x0a, 0x0f, 0x00), \ + IOV_DATA(0x0b, 0x58, 0x00, 0x03, 00) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x000f + * + * ATT: Read Response (0x0b) len 4 + */ +#define AICS_READ_CHAR_AUD_IP_STATE_MANUAL \ + IOV_DATA(0x0a, 0x0f, 0x00), \ + IOV_DATA(0x0b, 0x58, 0x00, 0x02, 00) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x0012 + * + * ATT: Read Response (0x0b) len 3 + */ +#define AICS_READ_CHAR_GAIN_SETTING_PROP \ + IOV_DATA(0x0a, 0x12, 0x00), \ + IOV_DATA(0x0b, 0x01, 0x80, 0x7f) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x0014 + * + * ATT: Read Response (0x0b) len 1 + */ +#define AICS_READ_CHAR_AUD_IP_TYPE \ + IOV_DATA(0x0a, 0x14, 0x00), \ + IOV_DATA(0x0b, 0x01) + + /* + * ATT: Read Request (0x0a) len 2 + * Handle: 0x0014 + * + * ATT: Read Response (0x0b) len 1 + */ +#define AICS_READ_CHAR_AUD_IP_STATUS \ + IOV_DATA(0x0a, 0x16, 0x00), \ + IOV_DATA(0x0b, 0x01) + + /* + * ATT: Write Request (0x12) len 5 + * Handle: 0x0019 + * Data: 016401 + * + * ATT: Error Response (0x01) len 4 + * Write Request (0x12) + * Handle: 0x0019 + * Error: Reserved (0x80) + * + * ATT: Write Request (0x12) len 4 + * Handle: 0x0019 + * Data: 0265/0366/0467/0568 + * + * ATT: Error Response (0x01) len 4 + * Write Request (0x12) + * Handle: 0x0019 + * Error: Reserved (0x80) + */ +#define AICS_CP_WR_INVLD_CHG_COUNTER \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x64, 0x01), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x80), \ + IOV_DATA(0x12, 0x19, 0x00, 0x02, 0x65), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x80), \ + IOV_DATA(0x12, 0x19, 0x00, 0x03, 0x66), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x80), \ + IOV_DATA(0x12, 0x19, 0x00, 0x04, 0x67), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x80), \ + IOV_DATA(0x12, 0x19, 0x00, 0x05, 0x68), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x80) + + /* + * ATT: Write Request (0x12) len 4 + * Handle: 0x0019 + * Data: 0600/ff00 + * + * ATT: Error Response (0x01) len 4 + * Write Request (0x12) + * Handle: 0x0019 + * Error: Reserved (0x81) + */ +#define AICS_CP_WR_INVLD_OP_CODE \ + IOV_DATA(0x12, 0x19, 0x00, 0x06, 0x00), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x81), \ + IOV_DATA(0x12, 0x19, 0x00, 0xff, 0x00), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x81) + + /* + * ATT: Write Request (0x12) len 4 + * Handle: 0x0019 + * Data: 0200 + * + * ATT: Error Response (0x01) len 4 + * Write Request (0x12) + * Handle: 0x0019 + * Error: Reserved (0x82) + */ +#define AICS_CP_WR_UNMUTE \ + IOV_DATA(0x12, 0x19, 0x00, 0x02, 0x00), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x82) + + /* + * ATT: Write Request (0x12) len 4 + * Handle: 0x0019 + * Data: 0300 + * + * ATT: Error Response (0x01) len 4 + * Write Request (0x12) + * Handle: 0x0019 + * Error: Reserved (0x82) + */ +#define AICS_CP_WR_MUTE \ + IOV_DATA(0x12, 0x19, 0x00, 0x03, 0x00), \ + IOV_DATA(0x01, 0x12, 0x19, 0x00, 0x82) + + /* + * ATT: Write Request (0x12) len 4 + * Handle: 0x0019 + * Data: 0200 + * + * ATT: Write Response (0x13) len 0 + */ +#define AICS_CP_WR_UNMUTE_SUCCESS \ + IOV_DATA(0x12, 0x19, 0x00, 0x02, 0x00), \ + IOV_DATA(0x13) + + /* + * ATT: Write Request (0x12) len 4 + * Handle: 0x0019 + * Data: 0300 + * + * ATT: Write Response (0x13) len 0 + */ +#define AICS_CP_WR_MUTE_SUCCESS \ + IOV_DATA(0x12, 0x19, 0x00, 0x03, 0x00), \ + IOV_DATA(0x13) + + /* + * ATT: Write Request (0x12) len 4 + * Handle: 0x0019 + * Data: 0400 + * + * ATT: Write Response (0x13) len 0 + */ +#define AICS_CP_WR_MANUAL_GAIN \ + IOV_DATA(0x12, 0x19, 0x00, 0x04, 0x00), \ + IOV_DATA(0x13) + + /* + * ATT: Write Request (0x12) len 4 + * Handle: 0x0019 + * Data: 0500 + * + * ATT: Write Response (0x13) len 0 + */ +#define AICS_CP_WR_AUTOMATIC_GAIN \ + IOV_DATA(0x12, 0x19, 0x00, 0x05, 0x00), \ + IOV_DATA(0x13) + + /* + * ATT: Write Request (0x12) len 5 + * Handle: 0x0019 + * Data: 01007f + * + * ATT: Write Response (0x13) len 0 + */ +#define AICS_CP_WR_GAIN_SETTING_MAX \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x00, 0x7f), \ + IOV_DATA(0x13) + + /* + * ATT: Write Request (0x12) len 5 + * Handle: 0x0019 + * Data: 010080 + * + * ATT: Write Response (0x13) len 0 + */ +#define AICS_CP_WR_GAIN_SETTING_MIN \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x01, 0x80), \ + IOV_DATA(0x13) + + /* + * ATT: Write Request (0x12) len 4 + * Handle: 0x0010 + * Data: 0100 + * + * ATT: Write Response (0x13) len 0 + */ +#define AICS_ENABLE_AUD_IP_STATE_CC \ + IOV_DATA(0x12, 0x10, 0x00, 0x01, 0x00), \ + IOV_DATA(0X13) + + /* + * ATT: Handle Value Notification (0x1b) len 6 + * Handle: 0x000f + * Data: 58000201 + */ +#define AICS_AUD_IP_STATE_UNMUTED_NOTIF \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x58, 0x00, 0x02, 0x01) + + /* + * ATT: Handle Value Notification (0x1b) len 6 + * Handle: 0x000f + * Data: 58010201 + */ +#define AICS_AUD_IP_STATE_MUTED_NOTIF \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x58, 0x01, 0x02, 0x01) + + /* + * ATT: Handle Value Notification (0x1b) len 6 + * Handle: 0x000f + * Data: 58000201 + * + */ +#define AICS_AUD_IP_STATE_MANUAL_GAIN_NOTIF \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x58, 0x00, 0x02, 0x01) + + /* + * ATT: Handle Value Notification (0x1b) len 6 + * Handle: 0x000f + * Data: 58000301 + */ +#define AICS_AUD_IP_STATE_AUTOMATIC_GAIN_NOTIF \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x58, 0x00, 0x03, 0x01) + + /* + * ATT: Handle Value Notification (0x1b) len 6 + * Handle: 0x000f + * Data: 7f000201 + */ +#define AICS_AUD_IP_STATE_GAIN_SETTING_MAX_NOTIF \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7f, 0x00, 0x02, 0x01) + + /* + * ATT: Handle Value Notification (0x1b) len 6 + * Handle: 0x000f + * Data: 80000202 + */ +#define AICS_AUD_IP_STATE_GAIN_SETTING_MIN_NOTIF \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x80, 0x00, 0x02, 0x02) + + /* + * AICS/SR/CP/BV-01-C + * Test Procedure: + * 1. The Lower Tester executes the GATT Read Characteristic Value + * sub-procedure for the Audio Input State characteristic. + * 2. The Lower Tester executes the GATT Read Characteristic Value + * sub-procedure for the Gain Setting Properties characteristic. + * Repeat steps 3–5 for (255 – Change_Counter value) + 1 times. + * [AICS_CP_WR_GAIN_SETTING_255_LOOP does the above point] + * 3. The Lower Tester executes the GATT Write Characteristic Value + * sub-procedure for the Audio Input Control Point characteristic with + * the Set Gain Setting Opcode, Gain Setting parameter set to a random + * value between the Gain_Setting_Minimum field and Gain_Setting_Maximum + * field values and different than the last iteration, and the + * Change_Counter parameter. + * 4. The Lower Tester receives a Write Response indicating that the IUT + * has accepted the Opcode. + * 5. The Lower Tester receives a GATT Characteristic Value Notification + * for the Audio Input State characteristic. + * + */ +#define AICS_CP_WR_GAIN_SETTING_255_LOOP \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x00, 0xc4), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xc4, 0x00, 0x02, 0x01), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x01, 0xaf), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xaf, 0x00, 0x02, 0x02), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x02, 0xcd), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xcd, 0x00, 0x02, 0x03), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x03, 0xd4), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xd4, 0x00, 0x02, 0x04), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x04, 0x08), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x08, 0x00, 0x02, 0x05), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x05, 0x88), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x88, 0x00, 0x02, 0x06), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x06, 0xde), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xde, 0x00, 0x02, 0x07), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x07, 0x21), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x21, 0x00, 0x02, 0x08), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x08, 0x41), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x41, 0x00, 0x02, 0x09), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x09, 0x08), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x08, 0x00, 0x02, 0x0a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x0a, 0x05), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x05, 0x00, 0x02, 0x0b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x0b, 0x18), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x18, 0x00, 0x02, 0x0c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x0c, 0x28), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x28, 0x00, 0x02, 0x0d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x0d, 0xca), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xca, 0x00, 0x02, 0x0e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x0e, 0xa0), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xa0, 0x00, 0x02, 0x0f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x0f, 0xd0), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xd0, 0x00, 0x02, 0x10), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x10, 0xec), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xec, 0x00, 0x02, 0x11), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x11, 0x3c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3c, 0x00, 0x02, 0x12), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x12, 0x09), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x09, 0x00, 0x02, 0x13), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x13, 0x05), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x05, 0x00, 0x02, 0x14), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x14, 0x29), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x29, 0x00, 0x02, 0x15), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x15, 0x28), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x28, 0x00, 0x02, 0x16), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x16, 0x25), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x25, 0x00, 0x02, 0x17), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x17, 0x31), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x31, 0x00, 0x02, 0x18), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x18, 0x49), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x49, 0x00, 0x02, 0x19), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x19, 0x12), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x12, 0x00, 0x02, 0x1a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x1a, 0x09), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x09, 0x00, 0x02, 0x1b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x1b, 0x29), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x29, 0x00, 0x02, 0x1c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x1c, 0x55), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x55, 0x00, 0x02, 0x1d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x1d, 0x35), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x35, 0x00, 0x02, 0x1e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x1e, 0x59), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x59, 0x00, 0x02, 0x1f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x1f, 0x69), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x69, 0x00, 0x02, 0x20), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x20, 0x22), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x22, 0x00, 0x02, 0x21), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x21, 0x79), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x79, 0x00, 0x02, 0x22), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x22, 0x11), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x11, 0x00, 0x02, 0x23), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x23, 0x21), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x21, 0x00, 0x02, 0x24), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x24, 0x0a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x0a, 0x00, 0x02, 0x25), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x25, 0x0b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x0b, 0x00, 0x02, 0x26), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x26, 0x0c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x0c, 0x00, 0x02, 0x27), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x27, 0x0d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x0d, 0x00, 0x02, 0x28), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x28, 0x0e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x0e, 0x00, 0x02, 0x29), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x29, 0x0f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x0f, 0x00, 0x02, 0x2a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x2a, 0x61), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x61, 0x00, 0x02, 0x2b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x2b, 0x63), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x63, 0x00, 0x02, 0x2c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x2c, 0x64), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x64, 0x00, 0x02, 0x2d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x2d, 0x68), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x68, 0x00, 0x02, 0x2e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x2e, 0x14), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x14, 0x00, 0x02, 0x2f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x2f, 0x33), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x33, 0x00, 0x02, 0x30), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x30, 0x31), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x31, 0x00, 0x02, 0x31), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x31, 0x3e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3e, 0x00, 0x02, 0x32), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x32, 0x79), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x79, 0x00, 0x02, 0x33), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x33, 0x99), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x99, 0x00, 0x02, 0x34), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x34, 0x81), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x81, 0x00, 0x02, 0x35), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x35, 0x73), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x73, 0x00, 0x02, 0x36), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x36, 0x75), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x75, 0x00, 0x02, 0x37), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x37, 0x6f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6f, 0x00, 0x02, 0x38), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x38, 0x4e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4e, 0x00, 0x02, 0x39), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x39, 0x1a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x1a, 0x00, 0x02, 0x3a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x3a, 0x1c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x1c, 0x00, 0x02, 0x3b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x3b, 0x2c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x2c, 0x00, 0x02, 0x3c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x3c, 0x5a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5a, 0x00, 0x02, 0x3d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x3d, 0x3d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3d, 0x00, 0x02, 0x3e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x3e, 0x5f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5f, 0x00, 0x02, 0x3f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x3f, 0x6e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6e, 0x00, 0x02, 0x40), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x40, 0x2c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x2c, 0x00, 0x02, 0x41), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x41, 0x7c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7c, 0x00, 0x02, 0x42), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x42, 0x01), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x01, 0x00, 0x02, 0x43), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x43, 0x2b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x2b, 0x00, 0x02, 0x44), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x44, 0xbc), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xbc, 0x00, 0x02, 0x45), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x45, 0x3b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3b, 0x00, 0x02, 0x46), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x46, 0x4c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4c, 0x00, 0x02, 0x47), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x47, 0x3d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3d, 0x00, 0x02, 0x48), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x48, 0x7e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7e, 0x00, 0x02, 0x49), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x49, 0x2f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x2f, 0x00, 0x02, 0x4a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x4a, 0x71), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x71, 0x00, 0x02, 0x4b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x4b, 0x93), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x93, 0x00, 0x02, 0x4c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x4c, 0x6c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6c, 0x00, 0x02, 0x4d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x4d, 0x78), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x78, 0x00, 0x02, 0x4e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x4e, 0x44), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x44, 0x00, 0x02, 0x4f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x4f, 0x83), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x83, 0x00, 0x02, 0x50), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x50, 0x2c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x2c, 0x00, 0x02, 0x51), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x51, 0x7e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7e, 0x00, 0x02, 0x52), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x52, 0x61), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x61, 0x00, 0x02, 0x53), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x53, 0xbb), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xbb, 0x00, 0x02, 0x54), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x54, 0xb1), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb1, 0x00, 0x02, 0x55), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x55, 0x3e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3e, 0x00, 0x02, 0x56), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x56, 0xca), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xca, 0x00, 0x02, 0x57), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x57, 0x3f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3f, 0x00, 0x02, 0x58), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x58, 0x3e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3e, 0x00, 0x02, 0x59), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x59, 0xdf), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xdf, 0x00, 0x02, 0x5a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x5a, 0xe1), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xe1, 0x00, 0x02, 0x5b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x5b, 0xd3), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xd3, 0x00, 0x02, 0x5c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x5c, 0x9c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x9c, 0x00, 0x02, 0x5d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x5d, 0x70), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x70, 0x00, 0x02, 0x5e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x5e, 0xa4), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xa4, 0x00, 0x02, 0x5f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x5f, 0x8a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x8a, 0x00, 0x02, 0x60), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x60, 0x7c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7c, 0x00, 0x02, 0x61), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x61, 0x5f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5f, 0x00, 0x02, 0x62), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x62, 0x6a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6a, 0x00, 0x02, 0x63), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x63, 0xb3), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb3, 0x00, 0x02, 0x64), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x64, 0xb7), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb7, 0x00, 0x02, 0x65), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x65, 0x3b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3b, 0x00, 0x02, 0x66), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x66, 0x4a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4a, 0x00, 0x02, 0x67), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x67, 0x3b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3b, 0x00, 0x02, 0x68), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x68, 0x8e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x8e, 0x00, 0x02, 0x69), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x69, 0xef), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xef, 0x00, 0x02, 0x6a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x6a, 0xe5), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xe5, 0x00, 0x02, 0x6b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x6b, 0xe3), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xe3, 0x00, 0x02, 0x6c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x6c, 0x5c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5c, 0x00, 0x02, 0x6d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x6d, 0x79), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x79, 0x00, 0x02, 0x6e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x6e, 0xa1), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xa1, 0x00, 0x02, 0x6f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x6f, 0x8b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x8b, 0x00, 0x02, 0x70), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x70, 0x5e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5e, 0x00, 0x02, 0x71), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x71, 0x0f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x0f, 0x00, 0x02, 0x72), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x72, 0x6c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6c, 0x00, 0x02, 0x73), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x73, 0xb9), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb9, 0x00, 0x02, 0x74), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x74, 0xb0), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb0, 0x00, 0x02, 0x75), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x75, 0x31), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x31, 0x00, 0x02, 0x76), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x76, 0x4d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4d, 0x00, 0x02, 0x77), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x77, 0x39), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x39, 0x00, 0x02, 0x78), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x78, 0xde), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xde, 0x00, 0x02, 0x79), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x79, 0xe9), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xe9, 0x00, 0x02, 0x7a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x7a, 0xe8), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xe8, 0x00, 0x02, 0x7b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x7b, 0xa3), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xa3, 0x00, 0x02, 0x7c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x7c, 0xcc), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xcc, 0x00, 0x02, 0x7d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x7d, 0x89), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x89, 0x00, 0x02, 0x7e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x7e, 0xa9), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xa9, 0x00, 0x02, 0x7f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x7f, 0x83), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x83, 0x00, 0x02, 0x80), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x80, 0x4e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4e, 0x00, 0x02, 0x81), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x81, 0x9f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x9f, 0x00, 0x02, 0x82), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x82, 0x6f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6f, 0x00, 0x02, 0x83), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x83, 0xb5), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb5, 0x00, 0x02, 0x84), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x84, 0xb4), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb4, 0x00, 0x02, 0x85), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x85, 0x21), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x21, 0x00, 0x02, 0x86), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x86, 0x7d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7d, 0x00, 0x02, 0x87), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x87, 0x29), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x29, 0x00, 0x02, 0x88), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x88, 0x9d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x9d, 0x00, 0x02, 0x89), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x89, 0xe1), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xe1, 0x00, 0x02, 0x8a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x8a, 0xa8), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xa8, 0x00, 0x02, 0x8b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x8b, 0xaa), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xaa, 0x00, 0x02, 0x8c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x8c, 0x1c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x1c, 0x00, 0x02, 0x8d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x8d, 0x59), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x59, 0x00, 0x02, 0x8e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x8e, 0xc9), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xc9, 0x00, 0x02, 0x8f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x8f, 0x33), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x33, 0x00, 0x02, 0x90), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x90, 0xe0), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xe0, 0x00, 0x02, 0x91), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x91, 0xf1), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xf1, 0x00, 0x02, 0x92), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x92, 0x6e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6e, 0x00, 0x02, 0x93), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x93, 0xb3), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb3, 0x00, 0x02, 0x94), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x94, 0xb8), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb8, 0x00, 0x02, 0x95), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x95, 0x2f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x2f, 0x00, 0x02, 0x96), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x96, 0x7c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7c, 0x00, 0x02, 0x97), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x97, 0x25), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x25, 0x00, 0x02, 0x98), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x98, 0x9e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x9e, 0x00, 0x02, 0x99), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x99, 0xed), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xed, 0x00, 0x02, 0x9a), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x9a, 0xa5), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xa5, 0x00, 0x02, 0x9b), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x9b, 0xab), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xab, 0x00, 0x02, 0x9c), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x9c, 0x5c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5c, 0x00, 0x02, 0x9d), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x9d, 0x5c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5c, 0x00, 0x02, 0x9e), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x9e, 0xc8), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xc8, 0x00, 0x02, 0x9f), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0x9f, 0x3b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3b, 0x00, 0x02, 0xa0), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa0, 0xed), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xed, 0x00, 0x02, 0xa1), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa1, 0x9a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x9a, 0x00, 0x02, 0xa2), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa2, 0x6b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6b, 0x00, 0x02, 0xa3), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa3, 0xb9), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xb9, 0x00, 0x02, 0xa4), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa4, 0xbe), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xbe, 0x00, 0x02, 0xa5), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa5, 0x2e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x2e, 0x00, 0x02, 0xa6), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa6, 0x7c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7c, 0x00, 0x02, 0xa7), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa7, 0x24), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x24, 0x00, 0x02, 0xa8), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa8, 0x9b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x9b, 0x00, 0x02, 0xa9), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xa9, 0xee), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xee, 0x00, 0x02, 0xaa), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xaa, 0xc2), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xc2, 0x00, 0x02, 0xab), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xab, 0xc0), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xc0, 0x00, 0x02, 0xac), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xac, 0x10), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x10, 0x00, 0x02, 0xad), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xad, 0x58), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x58, 0x00, 0x02, 0xae), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xae, 0xa9), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xa9, 0x00, 0x02, 0xaf), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xaf, 0x30), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x30, 0x00, 0x02, 0xb0), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb0, 0x49), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x49, 0x00, 0x02, 0xb1), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb1, 0x90), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x90, 0x00, 0x02, 0xb2), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb2, 0x60), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x60, 0x00, 0x02, 0xb3), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb3, 0xbf), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xbf, 0x00, 0x02, 0xb4), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb4, 0xbd), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xbd, 0x00, 0x02, 0xb5), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb5, 0x33), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x33, 0x00, 0x02, 0xb6), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb6, 0x77), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x77, 0x00, 0x02, 0xb7), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb7, 0x89), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x89, 0x00, 0x02, 0xb8), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb8, 0x9f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x9f, 0x00, 0x02, 0xb9), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xb9, 0xf1), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xf1, 0x00, 0x02, 0xba), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xba, 0xaa), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xaa, 0x00, 0x02, 0xbb), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xbb, 0xac), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xac, 0x00, 0x02, 0xbc), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xbc, 0x1e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x1e, 0x00, 0x02, 0xbd), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xbd, 0x58), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x58, 0x00, 0x02, 0xbe), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xbe, 0xcd), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xcd, 0x00, 0x02, 0xbf), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xbf, 0x3a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x3a, 0x00, 0x02, 0xc0), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc0, 0x48), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x48, 0x00, 0x02, 0xc1), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc1, 0x9a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x9a, 0x00, 0x02, 0xc2), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc2, 0x6c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6c, 0x00, 0x02, 0xc3), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc3, 0x7a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7a, 0x00, 0x02, 0xc4), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc4, 0x7d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7d, 0x00, 0x02, 0xc5), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc5, 0x7c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7c, 0x00, 0x02, 0xc6), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc6, 0x7d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7d, 0x00, 0x02, 0xc7), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc7, 0x7e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7e, 0x00, 0x02, 0xc8), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc8, 0x7f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x7f, 0x00, 0x02, 0xc9), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xc9, 0xf0), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xf0, 0x00, 0x02, 0xca), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xca, 0xf1), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xf1, 0x00, 0x02, 0xcb), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xcb, 0xf2), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xf2, 0x00, 0x02, 0xcc), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xcc, 0xf3), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xf3, 0x00, 0x02, 0xcd), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xcd, 0xf4), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xf4, 0x00, 0x02, 0xce), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xce, 0xc1), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xc1, 0x00, 0x02, 0xcf), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xcf, 0xc2), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0xc2, 0x00, 0x02, 0xd0), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd0, 0x4f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4f, 0x00, 0x02, 0xd1), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd1, 0x60), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x60, 0x00, 0x02, 0xd2), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd2, 0x6a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6a, 0x00, 0x02, 0xd3), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd3, 0x6b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6b, 0x00, 0x02, 0xd4), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd4, 0x6c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6c, 0x00, 0x02, 0xd5), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd5, 0x6d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6d, 0x00, 0x02, 0xd6), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd6, 0x6e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6e, 0x00, 0x02, 0xd7), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd7, 0x6f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x6f, 0x00, 0x02, 0xd8), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd8, 0x91), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x91, 0x00, 0x02, 0xd9), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xd9, 0x92), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x92, 0x00, 0x02, 0xda), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xda, 0x93), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x93, 0x00, 0x02, 0xdb), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xdb, 0x94), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x94, 0x00, 0x02, 0xdc), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xdc, 0x95), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x95, 0x00, 0x02, 0xdd), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xdd, 0x96), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x96, 0x00, 0x02, 0xde), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xde, 0x97), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x97, 0x00, 0x02, 0xdf), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xdf, 0x98), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x98, 0x00, 0x02, 0xe0), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe0, 0x59), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x59, 0x00, 0x02, 0xe1), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe1, 0x5a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5a, 0x00, 0x02, 0xe2), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe2, 0x5b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5b, 0x00, 0x02, 0xe3), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe3, 0x5c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5c, 0x00, 0x02, 0xe4), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe4, 0x5d), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5d, 0x00, 0x02, 0xe5), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe5, 0x5e), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5e, 0x00, 0x02, 0xe6), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe6, 0x5f), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x5f, 0x00, 0x02, 0xe7), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe7, 0x70), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x70, 0x00, 0x02, 0xe8), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe8, 0x71), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x71, 0x00, 0x02, 0xe9), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xe9, 0x72), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x72, 0x00, 0x02, 0xea), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xea, 0x73), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x73, 0x00, 0x02, 0xeb), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xeb, 0x74), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x74, 0x00, 0x02, 0xec), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xec, 0x4a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4a, 0x00, 0x02, 0xed), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xed, 0x4b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4b, 0x00, 0x02, 0xee), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xee, 0x4c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x4c, 0x00, 0x02, 0xef), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xef, 0x50), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x50, 0x00, 0x02, 0xf0), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf0, 0x40), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x40, 0x00, 0x02, 0xf1), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf1, 0x30), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x30, 0x00, 0x02, 0xf2), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf2, 0x50), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x50, 0x00, 0x02, 0xf3), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf3, 0x60), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x60, 0x00, 0x02, 0xf4), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf4, 0x10), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x10, 0x00, 0x02, 0xf5), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf5, 0x11), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x11, 0x00, 0x02, 0xf6), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf6, 0x12), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x12, 0x00, 0x02, 0xf7), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf7, 0x13), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x13, 0x00, 0x02, 0xf8), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf8, 0x14), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x14, 0x00, 0x02, 0xf9), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xf9, 0x15), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x15, 0x00, 0x02, 0xfa), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xfa, 0x16), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x16, 0x00, 0x02, 0xfb), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xfb, 0x18), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x18, 0x00, 0x02, 0xfc), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xfc, 0x19), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x19, 0x00, 0x02, 0xfd), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xfd, 0x1a), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x1a, 0x00, 0x02, 0xfe), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xfe, 0x1b), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x1b, 0x00, 0x02, 0xff), \ + IOV_DATA(0x12, 0x19, 0x00, 0x01, 0xff, 0x1c), \ + IOV_DATA(0x13), \ + IOV_DATA(0x1b, 0x0f, 0x00, 0x1c, 0x00, 0x02, 0x00) + /* ATT: Read Request (0x0a) len 2 * Handle: 0x0003 * @@ -493,14 +1688,105 @@ static void test_server(const void *user_data) IOV_DATA(0x13) #define VOCS_SR_SGGIT_CHA_TST_CMDS \ - VOCS_EXCHANGE_MTU, \ - VOCS_PRIMARY_SERVICE_VCS, \ - VOCS_SECONDARY_SERVICE_VOCS, \ - VOCS_INCLUDED_SERVICE_VOCS, \ + VCS_EXCHANGE_MTU, \ + VOCS_AICS_PRIMARY_SERVICE_VCS, \ + VOCS_AICS_SECONDARY_SERVICE, \ + VOCS_AICS_INCLUDED_SERVICE, \ VOCS_DISC_CHAR, \ VOCS_DISC_CHAR_DESC, \ VOCS_READ_CHAR_DESC +#define AICS_SR_SGGIT_CHA_TST_CMDS \ + VCS_EXCHANGE_MTU, \ + VOCS_AICS_PRIMARY_SERVICE_VCS, \ + VOCS_AICS_SECONDARY_SERVICE, \ + VOCS_AICS_INCLUDED_SERVICE, \ + AICS_DISC_CHAR, \ + AICS_DISC_CHAR_DESC, \ + AICS_READ_CHAR_DESC + +#define AICS_SR_SGGIT_CHA_BV_01_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_READ_CHAR_AUD_IP_STATE + +#define AICS_SR_SGGIT_CHA_BV_02_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_READ_CHAR_GAIN_SETTING_PROP + +#define AICS_SR_SGGIT_CHA_BV_03_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_READ_CHAR_AUD_IP_TYPE + +#define AICS_SR_SGGIT_CHA_BV_04_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_READ_CHAR_AUD_IP_STATUS + +#define AICS_SR_SGGIT_CHA_BV_05_C \ + AICS_SR_SGGIT_CHA_TST_CMDS + +#define AICS_SR_SGGIT_CHA_BV_06_C \ + AICS_SR_SGGIT_CHA_TST_CMDS + +#define AICS_SR_SGGIT_CP_BI_01_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_READ_CHAR_AUD_IP_STATE, \ + AICS_CP_WR_INVLD_CHG_COUNTER + +#define AICS_SR_SGGIT_CP_BI_02_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_CP_WR_INVLD_OP_CODE + +#define AICS_SR_SGGIT_CP_BI_03_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_READ_CHAR_AUD_IP_STATE_MUT_DIS, \ + AICS_CP_WR_UNMUTE, \ + AICS_CP_WR_MUTE + +#define AICS_SR_CP_BV_01_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_ENABLE_AUD_IP_STATE_CC, \ + AICS_READ_CHAR_AUD_IP_STATE, \ + AICS_READ_CHAR_GAIN_SETTNG_PROP, \ + AICS_CP_WR_GAIN_SETTING_255_LOOP + +#define AICS_SR_CP_BV_02_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_ENABLE_AUD_IP_STATE_CC, \ + AICS_READ_CHAR_AUD_IP_STATE_MUTED, \ + AICS_CP_WR_UNMUTE_SUCCESS, \ + AICS_AUD_IP_STATE_UNMUTED_NOTIF + +#define AICS_SR_CP_BV_03_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_ENABLE_AUD_IP_STATE_CC, \ + AICS_READ_CHAR_AUD_IP_STATE_UNMUTED, \ + AICS_CP_WR_MUTE_SUCCESS, \ + AICS_AUD_IP_STATE_MUTED_NOTIF + +#define AICS_SR_CP_BV_04_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_ENABLE_AUD_IP_STATE_CC, \ + AICS_READ_CHAR_AUD_IP_STATE_AUTOMATIC, \ + AICS_CP_WR_MANUAL_GAIN, \ + AICS_AUD_IP_STATE_MANUAL_GAIN_NOTIF + +#define AICS_SR_CP_BV_05_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_ENABLE_AUD_IP_STATE_CC, \ + AICS_READ_CHAR_AUD_IP_STATE_MANUAL, \ + AICS_CP_WR_AUTOMATIC_GAIN, \ + AICS_AUD_IP_STATE_AUTOMATIC_GAIN_NOTIF + +#define AICS_SR_SPE_BI_01_C \ + AICS_SR_SGGIT_CHA_TST_CMDS, \ + AICS_ENABLE_AUD_IP_STATE_CC, \ + AICS_READ_CHAR_AUD_IP_STATE, \ + AICS_READ_CHAR_GAIN_SETTNG_PROP, \ + AICS_CP_WR_GAIN_SETTING_MAX, \ + AICS_AUD_IP_STATE_GAIN_SETTING_MAX_NOTIF, \ + AICS_CP_WR_GAIN_SETTING_MIN, \ + AICS_AUD_IP_STATE_GAIN_SETTING_MIN_NOTIF + #define VOCS_SR_SGGIT_SER_BV_01_C \ VOCS_SR_SGGIT_CHA_TST_CMDS @@ -1324,11 +2610,11 @@ static void test_server(const void *user_data) IOV_DATA(0x13), \ IOV_DATA(0x1b, 0x03, 0x00, 0x0c, 0xff, 0x00) -int main(int argc, char *argv[]) +static void test_vocs_unit_testcases(void) { - tester_init(&argc, &argv); - - /* VOCS Unit Testcases */ + /* + * VOCS Unit Testcases + */ define_test("VOCS/SR/SGGIT/SER/BV-01-C", test_server, NULL, VOCS_SR_SGGIT_SER_BV_01_C); @@ -1353,6 +2639,131 @@ int main(int argc, char *argv[]) define_test("VOCS/SR/CP/BV-01-C", test_server, NULL, VOCS_SR_CP_BV_01_C); +} + +static void test_aics_unit_testcases(void) +{ + /* + * AICS Unit Testcases + */ + define_test("AICS/SR/SGGIT/CHA/BV-01-C", test_server, NULL, + AICS_SR_SGGIT_CHA_BV_01_C); + + define_test("AICS/SR/SGGIT/CHA/BV-02-C", test_server, NULL, + AICS_SR_SGGIT_CHA_BV_02_C); + + define_test("AICS/SR/SGGIT/CHA/BV-03-C", test_server, NULL, + AICS_SR_SGGIT_CHA_BV_03_C); + + define_test("AICS/SR/SGGIT/CHA/BV-04-C", test_server, NULL, + AICS_SR_SGGIT_CHA_BV_04_C); + + define_test("AICS/SR/SGGIT/CHA/BV-05-C", test_server, NULL, + AICS_SR_SGGIT_CHA_BV_05_C); + + define_test("AICS/SR/SGGIT/CHA/BV-06-C", test_server, NULL, + AICS_SR_SGGIT_CHA_BV_06_C); + + define_test("AICS/SR/SGGIT/CP/BI-01-C", test_server, NULL, + AICS_SR_SGGIT_CP_BI_01_C); + + define_test("AICS/SR/SGGIT/CP/BI-02-C", test_server, NULL, + AICS_SR_SGGIT_CP_BI_02_C); + + /* AICS/SR/SGGIT/CP/BI-03-C: + * In function *aics_new(struct gatt_db *db)[src/shared/vcp.c] + * by default state of the 'aics_aud_ip_st->mute' is set to + * AICS_NOT_MUTED[0x00];. + * As per test specs, Testcase AICS/SR/SGGIT/CP/BI-03-C, Initial + * condition of mute state should be AICS_DISABLED[0x02]. + * To verify this Unit test case we have to modify the initial + * state of 'aics_aud_ip_st->mute' to AICS_DISABLED in code + * [in func aics_new()], build it and run bluetoothd. Then run + * this unit test case and this test case will Pass. + */ + /* define_test("AICS/SR/SGGIT/CP/BI-03-C", test_server, NULL, + * AICS_SR_SGGIT_CP_BI_03_C); + */ + + /* AICS/SR/SGGIT/CP/BI-04-C - TO-DO Need to give two times input + * from user during test case run + */ + + define_test("AICS/SR/CP/BV-01-C", test_server, NULL, + AICS_SR_CP_BV_01_C); + + /* AICS/SR/CP/BV-02-C: + * In function *aics_new(struct gatt_db *db)[src/shared/vcp.c] + * by default state of the 'aics_aud_ip_st->mute' is set to + * AICS_NOT_MUTED[0x00];. + * As per test specs, Testcase AICS/SR/CP/BV-02-C, Initial + * condition of mute state should be AICS_MUTED[0x01]. + * To verify this Unit test case we have to modify the initial + * state of 'aics_aud_ip_st->mute' to AICS_MUTED in code + * [in func aics_new()], build it and run bluetoothd. Then run + * this unit test case and this test case will Pass. + */ + /* define_test("AICS/SR/CP/BV-02-C", test_server, NULL, + * AICS_SR_CP_BV_02_C); + */ + + /* AICS/SR/CP/BV-03-C: + * In function *aics_new(struct gatt_db *db)[src/shared/vcp.c] + * by default state of the 'aics_aud_ip_st->mute' is set to + * AICS_NOT_MUTED[0x00];. + * As per test specs, Testcase AICS/SR/CP/BV-03-C, Initial + * condition of mute state should be AICS_NOT_MUTED[0x00]. + * If you have changed this value to some other value, then + * To verify this Unit test case you have to modify the initial + * state of 'aics_aud_ip_st->mute' to AICS_NOT_MUTED in code + * [in func aics_new()], build it and run bluetoothd. Then run + * this unit test case and this test case will Pass. + */ + /* define_test("AICS/SR/CP/BV-03-C", test_server, NULL, + * AICS_SR_CP_BV_03_C); + */ + + /* AICS/SR/CP/BV-04-C: + * In function *aics_new(struct gatt_db *db)[src/shared/vcp.c] + * by default state of the 'aics_aud_ip_st->gain_mode' is set to + * AICS_GAIN_MODE_MANUAL[0x02];. + * As per test specs, Testcase AICS/SR/CP/BV-04-C, Initial + * value of gain mode field, should be AICS_GAIN_MODE_AUTO[0x03]. + * To verify this Unit test case you have to modify the initial + * state of 'aics_aud_ip_st->gain_mode' to AICS_GAIN_MODE_AUTO in code + * [in func aics_new()], build it and run bluetoothd. Then run + * this unit test case and this test case will Pass. + */ + /* define_test("AICS/SR/CP/BV-04-C", test_server, NULL, + * AICS_SR_CP_BV_04_C); + */ + + /* AICS/SR/CP/BV-05-C: + * In function *aics_new(struct gatt_db *db)[src/shared/vcp.c] + * by default state of the 'aics_aud_ip_st->gain_mode' is set to + * AICS_GAIN_MODE_MANUAL[0x02];. + * As per test specs, Testcase AICS/SR/CP/BV-05-C, Initial + * value of gain mode field, should be AICS_GAIN_MODE_MANUAL[0x02]. + * If you have changed this value to some other value, then + * To verify this Unit test case you have to modify the initial + * state of 'aics_aud_ip_st->gain_mode' to AICS_GAIN_MODE_MANUAL in code + * [in func aics_new()], build it and run bluetoothd. Then run + * this unit test case and this test case will Pass. + */ + /* define_test("AICS/SR/CP/BV-05-C", test_server, NULL, + * AICS_SR_CP_BV_05_C); + */ + define_test("AICS/SR/SPE/BI-01-C", test_server, NULL, + AICS_SR_SPE_BI_01_C); + + +} +int main(int argc, char *argv[]) +{ + tester_init(&argc, &argv); + + test_vocs_unit_testcases(); + test_aics_unit_testcases(); return tester_run(); }