* Byte order in sound drivers
@ 2001-12-01 10:16 Bryce McKinlay
2001-12-01 10:38 ` Jeff Koftinoff
0 siblings, 1 reply; 9+ messages in thread
From: Bryce McKinlay @ 2001-12-01 10:16 UTC (permalink / raw)
To: linuxppc-dev
It seems that some of the newwer media player applications (including
mplayer and the latest xmms from CVS) swap the byte order of sound
samples before playing them on PPC, and this results in nothing but
static from both the dmasound and usb audio drivers.
Is this because the sound driver perhaps already doing endian-swapping,
and can I disable it? Are these applications correct to want to convert
samples into the native endian-ness?
I'm using a 2.4.14 benh kernel.
cheers
Bryce.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Byte order in sound drivers
2001-12-01 10:16 Byte order in sound drivers Bryce McKinlay
@ 2001-12-01 10:38 ` Jeff Koftinoff
2001-12-02 3:05 ` Bryce McKinlay
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Koftinoff @ 2001-12-01 10:38 UTC (permalink / raw)
To: linuxppc-dev
On Saturday, December 1, 2001, at 02:16 AM, Bryce McKinlay wrote:
>
> It seems that some of the newwer media player applications (including
> mplayer and the latest xmms from CVS) swap the byte order of sound
> samples before playing them on PPC, and this results in nothing but
> static from both the dmasound and usb audio drivers.
>
> Is this because the sound driver perhaps already doing endian-swapping,
> and can I disable it? Are these applications correct to want to convert
> samples into the native endian-ness?
>
> I'm using a 2.4.14 benh kernel.
>
> cheers
>
> Bryce.
>
>
XMMS has endian problems with wav files, but not mp3 files - It is
listed as a bug as well for sparc. The problem solely lies with
applications that are written incorrectly.
jeff
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Byte order in sound drivers
2001-12-01 10:38 ` Jeff Koftinoff
@ 2001-12-02 3:05 ` Bryce McKinlay
2001-12-02 3:14 ` Bryce McKinlay
2001-12-02 9:56 ` Benjamin Herrenschmidt
0 siblings, 2 replies; 9+ messages in thread
From: Bryce McKinlay @ 2001-12-02 3:05 UTC (permalink / raw)
To: Jeff Koftinoff; +Cc: linuxppc-dev
Jeff Koftinoff wrote:
> XMMS has endian problems with wav files, but not mp3 files - It is
> listed as a bug as well for sparc. The problem solely lies with
> applications that are written incorrectly.
The most recent release of XMMS (0.9.5) works correctly for me for both
MP3 and WAV files, but not CD audio for which the input plugin returns
sound in the native endian-ness.
But, since that release, the following change was made in XMMS CVS:
Thu Jul 5 12:25:51 CEST 2001 Håvard Kvålen <havardk@xmms.org>
* Output/OSS/audio.c (oss_set_audio_params): Do endian/sign
conversion if necessary.
This breaks it on LinuxPPC 2.4.14-ben0 with both the dmasound and
usb/audio drivers (but, amusingly, fixes the CD audio). Another
application, mplayer, also seems to have the same problem - it says
something like "big endian detected, byte conversion enabled" and
doesn't work, except for 8-bit sound files.
What I want to know is whether these applications are wrong to do this -
does the Linux PPC audio drivers expect audio to be little endian?
regards
Bryce.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Byte order in sound drivers
2001-12-02 3:05 ` Bryce McKinlay
@ 2001-12-02 3:14 ` Bryce McKinlay
2001-12-02 9:56 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 9+ messages in thread
From: Bryce McKinlay @ 2001-12-02 3:14 UTC (permalink / raw)
To: Jeff Koftinoff; +Cc: linuxppc-dev
Bryce McKinlay wrote:
> The most recent release of XMMS (0.9.5) works correctly for me for both
> MP3 and WAV files, but not CD audio for which the input plugin returns
> sound in the native endian-ness.
Sorry, I meant to say version 1.2.5 not 0.9.5.
regards
Bryce.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Byte order in sound drivers
2001-12-02 3:05 ` Bryce McKinlay
2001-12-02 3:14 ` Bryce McKinlay
@ 2001-12-02 9:56 ` Benjamin Herrenschmidt
2001-12-02 17:17 ` Benjamin Herrenschmidt
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Benjamin Herrenschmidt @ 2001-12-02 9:56 UTC (permalink / raw)
To: Bryce McKinlay; +Cc: linuxppc-dev, Jeff Koftinoff, havardk
>
>The most recent release of XMMS (0.9.5) works correctly for me for both
>MP3 and WAV files, but not CD audio for which the input plugin returns
>sound in the native endian-ness.
So far, I had MP3s working but not WAV nor cdread (blank noise in both
cases). I didn't yet try 0.9.5 though.
>But, since that release, the following change was made in XMMS CVS:
>
>Thu Jul 5 12:25:51 CEST 2001 Håvard Kvålen <havardk@xmms.org>
>
> * Output/OSS/audio.c (oss_set_audio_params): Do endian/sign
> conversion if necessary.
>
>
>This breaks it on LinuxPPC 2.4.14-ben0 with both the dmasound and
>usb/audio drivers (but, amusingly, fixes the CD audio). Another
>application, mplayer, also seems to have the same problem - it says
>something like "big endian detected, byte conversion enabled" and
>doesn't work, except for 8-bit sound files.
>
>What I want to know is whether these applications are wrong to do this -
>does the Linux PPC audio drivers expect audio to be little endian?
It depends on the HW you have. Most recent machines don't do HW
byteswap, and so accept only big-endian samples. The way this is
implemented in our driver currently is a bit weird though, the
setformat ioctl won't fail when trying to set an LE format, but
it will set the equivalent BE format. So the application is
expected to read back the format to figure out what had to be
done.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Byte order in sound drivers
2001-12-02 9:56 ` Benjamin Herrenschmidt
@ 2001-12-02 17:17 ` Benjamin Herrenschmidt
2001-12-09 18:00 ` Giuliano Pochini
2001-12-02 18:42 ` Haavard Kvaalen
2001-12-02 22:39 ` Bryce McKinlay
2 siblings, 1 reply; 9+ messages in thread
From: Benjamin Herrenschmidt @ 2001-12-02 17:17 UTC (permalink / raw)
To: Bryce McKinlay; +Cc: linuxppc-dev, Jeff Koftinoff, havardk
>It depends on the HW you have. Most recent machines don't do HW
>byteswap, and so accept only big-endian samples. The way this is
>implemented in our driver currently is a bit weird though, the
>setformat ioctl won't fail when trying to set an LE format, but
>it will set the equivalent BE format. So the application is
>expected to read back the format to figure out what had to be
>done.
Well, the current dmasound behaviour is definitely broken. I'm
changing it now so that when asked for an _LE format on a chip
that do only _BE will return -EINVAL.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Byte order in sound drivers
2001-12-02 9:56 ` Benjamin Herrenschmidt
2001-12-02 17:17 ` Benjamin Herrenschmidt
@ 2001-12-02 18:42 ` Haavard Kvaalen
2001-12-02 22:39 ` Bryce McKinlay
2 siblings, 0 replies; 9+ messages in thread
From: Haavard Kvaalen @ 2001-12-02 18:42 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Bryce McKinlay, linuxppc-dev, Jeff Koftinoff
On Sun, 2 Dec 2001, Benjamin Herrenschmidt wrote:
> Most recent machines don't do HW byteswap, and so accept only
> big-endian samples. The way this is implemented in our driver
> currently is a bit weird though, the setformat ioctl won't fail when
> trying to set an LE format, but it will set the equivalent BE format.
This is the correct way to tell the application what format the driver can
handle, and XMMS depends on this to be working.
--
Håvard Kvålen
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Byte order in sound drivers
2001-12-02 9:56 ` Benjamin Herrenschmidt
2001-12-02 17:17 ` Benjamin Herrenschmidt
2001-12-02 18:42 ` Haavard Kvaalen
@ 2001-12-02 22:39 ` Bryce McKinlay
2 siblings, 0 replies; 9+ messages in thread
From: Bryce McKinlay @ 2001-12-02 22:39 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Jeff Koftinoff, havardk
Benjamin Herrenschmidt wrote:
>>The most recent release of XMMS (0.9.5) works correctly for me for both
>>MP3 and WAV files, but not CD audio for which the input plugin returns
>>sound in the native endian-ness.
>>
>
>So far, I had MP3s working but not WAV nor cdread (blank noise in both
>cases). I didn't yet try 0.9.5 though.
>
I should mention I was using the "xmms-cdread" plugin from
ftp://mud.stack.nl/pub/OuterSpace/willem, along with the ide-scsi
driver, to get cd audio going. The built in XMMS "cdaudio" plugin didn't
work for my Ti 500.
>>It depends on the HW you have. Most recent machines don't do HW
>>byteswap, and so accept only big-endian samples. The way this is
>>implemented in our driver currently is a bit weird though, the
>>setformat ioctl won't fail when trying to set an LE format, but
>>it will set the equivalent BE format. So the application is
>>expected to read back the format to figure out what had to be
>>done.
>
>
>Well, the current dmasound behaviour is definitely broken. I'm
>changing it now so that when asked for an _LE format on a chip
>that do only _BE will return -EINVAL.
>
Interesting, thanks for looking at that. I wonder if the USB audio
driver has the same problem, since I get exactly the same behaviour with
my sound sticks.
regards
Bryce.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Byte order in sound drivers
2001-12-02 17:17 ` Benjamin Herrenschmidt
@ 2001-12-09 18:00 ` Giuliano Pochini
0 siblings, 0 replies; 9+ messages in thread
From: Giuliano Pochini @ 2001-12-09 18:00 UTC (permalink / raw)
To: linuxppc-dev
> >It depends on the HW you have. Most recent machines don't do HW
> >byteswap, and so accept only big-endian samples. The way this is
> >implemented in our driver currently is a bit weird though, the
> >setformat ioctl won't fail when trying to set an LE format, but
> >it will set the equivalent BE format. So the application is
> >expected to read back the format to figure out what had to be
> >done.
Same thing with some SoundBlasters. That's why there is a mess with
audio andianess.
Bye.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-12-09 18:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-01 10:16 Byte order in sound drivers Bryce McKinlay
2001-12-01 10:38 ` Jeff Koftinoff
2001-12-02 3:05 ` Bryce McKinlay
2001-12-02 3:14 ` Bryce McKinlay
2001-12-02 9:56 ` Benjamin Herrenschmidt
2001-12-02 17:17 ` Benjamin Herrenschmidt
2001-12-09 18:00 ` Giuliano Pochini
2001-12-02 18:42 ` Haavard Kvaalen
2001-12-02 22:39 ` Bryce McKinlay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).