From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: format specification problem Date: Fri, 26 Apr 2002 19:34:41 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <200204250055.g3P0tu908360@op.net> Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by alsa.alsa-project.org (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id TAA27464 for ; Fri, 26 Apr 2002 19:34:51 +0200 Received: from Hermes.suse.de (Charybdis.suse.de [213.95.15.201]) by Cantor.suse.de (Postfix) with ESMTP id 6196D1E777 for ; Fri, 26 Apr 2002 19:34:41 +0200 (MEST) In-Reply-To: <200204250055.g3P0tu908360@op.net> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 24 Apr 2002 20:55:56 -0400, Paul Davis wrote: > > > [ those of you on jack-dev will have seen this coming ] > > ALSA doesn't seem to provide a way for a driver to way "i provide > samples in the native format of the processor". The specific case in > point that I'm noticing is the Hammerfall, where we currently say that > it supports S32_LE. This is not strictly true. It supports S32_LE when > it has the x86-friendly EPROM, and S32_BE when it has the ppc-friendly > EPROM. But it can't support them both at the same time. Moreover, > there isn't any way to find out which EPROM it has - its assumed that > the user is sufficiently smart not to have installed a PPC version on > an x86 system (I actually had a user recently who had this problem and > didn't realize it - they spent days trying to figure why their samples > were byte-swapped). > > If an application wants to ask for S32 in "native" format, it can do > that, but will convert that into either S32_LE or > S32_BE, and when we get down the driver level, it will fail on some > systems. simply use SNDRV_PCM_FORMAT_S32 (without _LE/_BE suffix) ? then the byte-order is determined at the compile time. but i vote for Abramo's proposal, since the mismatching may happen as you wrote. it should be configurable via module option or something like that. Takashi