Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-24 Thread Takashi Iwai
At Thu, 23 May 2002 10:20:38 -0400, Paul Davis wrote: > > >but still one thing is not certain. what does the following (in > >snd_hdsp_initialize_firmware) set? > > > > #ifdef SNDRV_BIG_ENDIAN > > hdsp_write(hdsp, HDSP_jtagReg, HDSP_BIGENDIAN_MODE); > > #endif > > > >does it

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-23 Thread Paul Davis
>but still one thing is not certain. what does the following (in >snd_hdsp_initialize_firmware) set? > > #ifdef SNDRV_BIG_ENDIAN > hdsp_write(hdsp, HDSP_jtagReg, HDSP_BIGENDIAN_MODE); > #endif > >does it switch the access to big-endian? if yes, then we need >cpu_to_xxx

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-23 Thread Takashi Iwai
At Wed, 22 May 2002 09:56:28 -0400, Paul Davis wrote: > > >basically PCI bus is accessed as LE. that's why in_le32 is used > > OK, well apparently on OS X, either RME didn't use standard macros for > this (most likely), or there are no standard macros for this. > > >there. we can access to io

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-22 Thread Paul Davis
>basically PCI bus is accessed as LE. that's why in_le32 is used OK, well apparently on OS X, either RME didn't use standard macros for this (most likely), or there are no standard macros for this. >there. we can access to io without considration of endianess as long >as using readX/writeX. S

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-22 Thread Takashi Iwai
At Wed, 22 May 2002 09:29:57 -0400, Paul Davis wrote: > > >> >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

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-22 Thread Paul Davis
>> >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; >>

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-22 Thread Takashi Iwai
At Wed, 22 May 2002 08:25:23 -0400, Paul Davis wrote: > > >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 archit

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-22 Thread Paul Davis
>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; >driver doesn't hav

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-22 Thread Takashi Iwai
At Tue, 21 May 2002 13:22:39 -0400, Paul Davis wrote: > > >Hi Paul, > > > >i converted b_swap's to cpu_to_xxx and xxx_to_cpu macros, and during > >that, found that the following part may not work correctly on BE. > > > >static inline unsigned long long hdsp_read64 (hdsp_t *hdsp, int reg) > >{ > >

Re: [Alsa-devel] Re: hdsp on big-endian

2002-05-21 Thread Paul Davis
>Hi Paul, > >i converted b_swap's to cpu_to_xxx and xxx_to_cpu macros, and during >that, found that the following part may not work correctly on BE. > >static inline unsigned long long hdsp_read64 (hdsp_t *hdsp, int reg) >{ > unsigned long long val; > val = hdsp_read(hdsp, reg); >

[Alsa-devel] Re: hdsp on big-endian

2002-05-21 Thread Takashi Iwai
Hi Paul, i converted b_swap's to cpu_to_xxx and xxx_to_cpu macros, and during that, found that the following part may not work correctly on BE. static inline unsigned long long hdsp_read64 (hdsp_t *hdsp, int reg) { unsigned long long val; val = hdsp_read(hdsp, reg); val =