From: Paul Davis Subject: Re: Re: hdsp on big-endian Date: Wed, 22 May 2002 09:29:57 -0400 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: Return-path: In-Reply-To: Your message of "Wed, 22 May 2002 14:56:07 +0200." Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Takashi Iwai Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org >> >anyway... after looking at the hdsp code again, i found that these >> >endian conversions are not necessary at all! >> >IIRC, readX/writeX already convert the endianess in itself. thus, the >> >> absolutely not. readl/writel on most architectures translate to: >> >> *addr = val; >> > >really? for example, ppc uses in_le32() for readl(), which implies >byte swapping. what does CONFIG_APUS do? thats the conditional on which in_le32 is used or not. AFAIK, readl is not supposed to have endian-characteristics, but if true, that would make the non-APUS ppc version totally wrong. on x86: #define __io_virt(x) ((void *)(x)) #define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) --p _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm