From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0BFFC4708E for ; Tue, 6 Dec 2022 15:19:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231294AbiLFPTA (ORCPT ); Tue, 6 Dec 2022 10:19:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235427AbiLFPSh (ORCPT ); Tue, 6 Dec 2022 10:18:37 -0500 X-Greylist: delayed 1379 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 06 Dec 2022 07:16:35 PST Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E893AE6E for ; Tue, 6 Dec 2022 07:16:34 -0800 (PST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4NRPBn45zJz9sRf; Tue, 6 Dec 2022 16:16:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1670339777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t2tn+THhDzeDHl34Ye809whLfPYSKOZ/DaLoqsuH3gk=; b=CcH/ZPCBwWHTCNc5diUTO2FLKkq9Jh92haUiNwm2C6BQVS8fM/HdtepOJ1Rzjq3/mDfLTa gm/uXrAvsReXdL/F2SVxR3R0JY3D86V6TWwhxe3WdifxbQSFxX15WCaV7z/FLn+lrozhRh lS3sSSePXlXPH2fJmKM2KHEzeB0jxTqbbXac7t2nxSxV1yW+pM2Z2lRujJh2iaRZ+xoNWs tdA7oLuiSGicwOqQr8H4/ofsv6vrXEznaVHRnw+ANy8ORZTj6P1r/Quhj0+tXKhC791nQR Zn2nW0GqAJpDbPBDT0vkIrZ4C9cLY9py6gy/LsbhxzIax9Nebugviu6XgJIYWQ== Message-ID: Date: Tue, 6 Dec 2022 16:16:12 +0100 MIME-Version: 1.0 Subject: Re: [PATCH] ALSA: compress: Add AC3, EAC3, TrueHD, DTS, MPEG-H 3D Audio Stream (MHAS) Content-Language: en-US To: Pierre-Louis Bossart , Vinod Koul , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20221206145317.99934-1-crg7475@mailbox.org> From: Carlos Rafael Giani In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-ID: b032ba1a2d024997665 X-MBO-RS-META: sbrie75jug1xf9sa1fagpt9h1dw636p5 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org IEC61937 is quite commonly used, yes. However, I have been working with a commercial system that is getting support for these formats implemented via compress-offload. Since these formats aren't exactly uncommon, I figured that adding these could be useful, especially since only the #defines need to be added, nothing else. On 06.12.22 16:07, Pierre-Louis Bossart wrote: > > On 12/6/22 08:53, Carlos Rafael Giani wrote: >> These audio codecs are used in sound bars and digital TVs, and benefit >> from off-loading to a DSP. In particular, Dolby Atmos and MPEG-H 3D audio >> spatialization is done in dedicated DSPs. Thus, adding these codecs to >> the Compress-Offload API makes sense. > The question is "how is the stream transported". In most implementations > for these formats, the DSP is on the receiver side and the transport > happens with an IEC61937 format - which does not require the use of the > compressed API. > >> Signed-off-by: Carlos Rafael Giani >> --- >> include/uapi/sound/compress_params.h | 8 +++++++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h >> index ddc77322d571..7a58e2026be3 100644 >> --- a/include/uapi/sound/compress_params.h >> +++ b/include/uapi/sound/compress_params.h >> @@ -43,7 +43,13 @@ >> #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E) >> #define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F) >> #define SND_AUDIOCODEC_APE ((__u32) 0x00000010) >> -#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE >> +#define SND_AUDIOCODEC_AC3 ((__u32) 0x00000011) >> +#define SND_AUDIOCODEC_EAC3 ((__u32) 0x00000012) >> +#define SND_AUDIOCODEC_TRUEHD ((__u32) 0x00000013) >> +#define SND_AUDIOCODEC_DTS ((__u32) 0x00000014) > IIRC there are multiple flavors of DTS, off the top of my head DTS-ES, > 96, HD, Master Audio. "DTS" only doesn't even begin to describe the > possible variants. > >> +/* MPEG-H 3D Audio Stream (MHAS) as defined in ISO/IEC 23008-3 */ >> +#define SND_AUDIOCODEC_MHAS ((__u32) 0x00000015) > Doesn't this need the definition of profiles and various types of > formats - classic problem with designed-by-committee MPEG codecs. > >> +#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_MHAS > >> /* >> * Profile and modes are listed with bit masks. This allows for a