lkml.org 
[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [sparc] Weird ioctl() bug in 2.2.19 (fwd)
    Alex Buell writes:

    > No, the ioctl numbers are correct, it's ESD that's fscked.
    >
    > /* set the sound driver audio format for playback */
    > #if defined(__powerpc__)
    > value = test = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
    > ? /* 16 bit */ AFMT_S16_NE : /* 8 bit */ AFMT_U8;
    > #else /* #if !defined(__powerpc__) */
    > value = test = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
    > ? /* 16 bit */ AFMT_S16_LE : /* 8 bit */ AFMT_U8;
    > #endif /* #if !defined(__powerpc__) */
    >
    > <sarcasm>
    > This is such a lovely piece of code!
    > <sarcasm>

    Indeed...

    > Anyway, I can fix it now by adding the appropriate AFMT_S16_BE statement
    > guarded by a #ifdef but this sucks. Thanks to Peter Jones who spotted this
    > one.

    Why can't you just use AFMT_S16_NE on all platforms? That is supposed
    to be equal to AFMT_S16_BE on big-endian platforms and to AFMT_S16_LE
    on little-endian platforms. NE == native endian.

    Paul.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:12    [W:0.022 / U:59.836 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site