From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from blyat.fensystems.co.uk (blyat.fensystems.co.uk [54.246.183.96]) by mx.groups.io with SMTP id smtpd.web12.2956.1618534770852441087 for ; Thu, 15 Apr 2021 17:59:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: ipxe.org, ip: 54.246.183.96, mailfrom: mcb30@ipxe.org) Received: from dolphin.home (unknown [IPv6:2a00:23c6:5495:5e00:72b3:d5ff:feb1:e101]) by blyat.fensystems.co.uk (Postfix) with ESMTPSA id DEDFF441FC; Fri, 16 Apr 2021 00:59:26 +0000 (UTC) Subject: Re: [edk2-devel] VirtIO Sound Driver (GSoC 2021) To: Ethin Probst , Andrew Fish Cc: edk2-devel-groups-io , Mike Kinney , Leif Lindholm , Laszlo Ersek , "Desimone, Nathaniel L" , Rafael Rodrigues Machado , Gerd Hoffmann References: <16758FB6436B1195.32393@groups.io> <4AEC1784-99AF-47EF-B7DD-77F91EA3D7E9@apple.com> <309cc5ca-2ecd-79dd-b183-eec0572ea982@ipxe.org> From: "Michael Brown" Message-ID: <33e37977-2d27-36a0-89a6-36e513d06b2f@ipxe.org> Date: Fri, 16 Apr 2021 01:59:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on blyat.fensystems.co.uk Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 16/04/2021 00:42, Ethin Probst wrote: > Forcing a particular channel mapping, sample rate and sample format on > everyone would complicate application code. From an application point > of view, one would, with that type of protocol, need to do the > following: > 1) Load an audio file in any audio file format from any storage mechanism. > 2) Decode the audio file format to extract the samples and audio metadata. > 3) Resample the (now decoded) audio samples and convert (quantize) the > audio samples into signed 16-bit PCM audio. > 4) forward the samples onto the EFI audio protocol. You have made an incorrect assumption that there exists a requirement to be able to play audio files in arbitrary formats. This requirement does not exist. With a protocol-mandated fixed baseline set of audio parameters (sample rate etc), what would happen in practice is that the audio files would be encoded in that format at *build* time, using tools entirely external to UEFI. The application code is then trivially simple: it just does "load blob, pass blob to audio protocol". > typedef struct EFI_SIMPLE_AUDIO_PROTOCOL { > EFI_SIMPLE_AUDIO_PROTOCOL_RESET Reset; > EFI_SIMPLE_AUDIO_PROTOCOL_START Start; > EFI_SIMPLE_AUDIO_PROTOCOL_STOP Stop; > } EFI_SIMPLE_AUDIO_PROTOCOL; This is now starting to look like something that belongs in boot-time firmware. :) Michael