* Re: Broken sound?
1999-07-15 18:16 Broken sound? Jerry Quinn
@ 1999-07-15 18:44 ` Joseph Palani Garcia
1999-07-16 0:57 ` Paul Mackerras
1999-07-15 21:34 ` Peter Handel
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Joseph Palani Garcia @ 1999-07-15 18:44 UTC (permalink / raw)
To: Jerry Quinn; +Cc: linuxppc-dev
this is a known endian problem. ppc archetecure is big endian, while most
other linux-running platforms are little endian. recent setups, like R5
implement sound as little endian. not everyone has caught up with this
yet, so many programs still assume that we mac users need to have endians
switched, so those little endian files we now can play, get reversed so
that the older systems play fine, but not the newer ones. Though i think
there is inconsistency in this decision. MacOS .au files are still big
endian. if we try to play them straight to the device like you are doing,
it is assumed little endian. whoops. if i have this correct, then i
think it is better the other way. what is being done is file -> kernel ->
device. since the device cant be changed, and we shouldn't dictate more
standards in audio files, it seems to me that having the kernel assume
input is correct as is makes more sense. let the PC users have thier
little endian. dont give us static about macs being big endian.
sorry bout the rant. as for a fix, i think the au might have to be created
on a PC for it to be little endian, so that the newer system can convert
it back to big endian and waste some processing time. Its all a mess.
why do we want our big endian's to emulate little? anyone?
--- ---
Joseph P. Garcia jpgarcia@execpc.com jpgarcia@lidar.ssec.wisc.edu
CS Undergraduate Student Employee - Systems Programmer
Univeristy of Wisconsin - Madison UW Lidar Group
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Broken sound?
1999-07-15 18:44 ` Joseph Palani Garcia
@ 1999-07-16 0:57 ` Paul Mackerras
0 siblings, 0 replies; 8+ messages in thread
From: Paul Mackerras @ 1999-07-16 0:57 UTC (permalink / raw)
To: jpgarcia; +Cc: linuxppc-dev
Joseph Palani Garcia <jpgarcia@execpc.com> wrote:
> this is a known endian problem. ppc archetecure is big endian, while most
> other linux-running platforms are little endian. recent setups, like R5
> implement sound as little endian. not everyone has caught up with this
Not so. The kernel driver can handle either big-endian or
little-endian 16-bit data. The default is 8-bit data, though, for
which endianness doesn't matter.
The AFMT_S16_NE symbol, which says what the native endianness is, is
defined to be the same as AFMT_S16_BE on big-endian platforms like the
PPC. There is a potential problem though because the
linux/soundcard.h include file checks for the existence of the symbol
`PPC' (among others) to test whether the platform is big-endian. If
you compile your program with the -ansi switch to gcc, it defines
__PPC__ and __PPC but not PPC so then you get AFMT_S16_NE defined to
be equal to AFMT_S16_LE. :-(
Paul.
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Broken sound?
1999-07-15 18:16 Broken sound? Jerry Quinn
1999-07-15 18:44 ` Joseph Palani Garcia
@ 1999-07-15 21:34 ` Peter Handel
1999-07-16 0:49 ` Paul Mackerras
1999-07-19 15:30 ` Jerry Quinn
3 siblings, 0 replies; 8+ messages in thread
From: Peter Handel @ 1999-07-15 21:34 UTC (permalink / raw)
To: Jerry Quinn; +Cc: linuxppc-dev
On Thu, 15 Jul 1999, Jerry Quinn wrote:
> Also, if I send a sound to /dev/audio, it plays through both
> internal and external speakers.
Have you tried using aumix to reduce the level of the internal
speaker?
Thanks,
Pete
--
Peter F. Handel "[The anti-Christ] also forced everyone, small and
phandel@cise.ufl.edu great ... to receive a mark [smart card?] on his
www.cise.ufl.edu/~phandel right hand or on his forehead, so that no one could
FAX: (561) 619-8051 buy or sell unless he had the mark"-Revelation13:16
> > You are perfectly free to believe what you want to, and so am I.
> Actually, this turns out not to be the case. God does not give us
> the freedom to believe anything we wish. We are morally obligated to
> believe the truth. Doing anything else is a sin. You are not free to
> interpret the Bible anyway you wish. -DFL (Pretty neat, huh?)
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Broken sound?
1999-07-15 18:16 Broken sound? Jerry Quinn
1999-07-15 18:44 ` Joseph Palani Garcia
1999-07-15 21:34 ` Peter Handel
@ 1999-07-16 0:49 ` Paul Mackerras
1999-07-19 15:30 ` Jerry Quinn
3 siblings, 0 replies; 8+ messages in thread
From: Paul Mackerras @ 1999-07-16 0:49 UTC (permalink / raw)
To: jquinn; +Cc: linuxppc-dev
Jerry Quinn <jquinn@nortelnetworks.com> wrote:
> I have a Powercenter 120 with 200Mhz 604e card running vanilla 2.2.10. Sound
> seems to be broken. I do 'cat junk.au > /dev/audio' and get very interesting
> sounding static. Is there a patch in vger I should be using that hasn't made
What is the nature of junk.au? Is it 16-bit or 8-bit, stereo or mono,
linear, mu-law or A-law encoded, and if it's 16-bit, is it big-endian
or little-endian?
When you open /dev/audio, the driver sets it to 8kHz, mono, mu-law
encoded. It's possible that the mu-law decoding is stuffed, I've
never used it myself. I just tried catting a .au file to /dev/audio
and it worked fine, though.
> Also, if I send a sound to /dev/audio, it plays through both internal and
> external speakers. If I try to send the sound to /dev/audio1, bash claims it
> doesn't exist even though it shows up on 'ls'.
You can use one of the many mixer programs to set the volume levels
for the internal speaker and the headphone output.
Paul.
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Broken sound?
1999-07-15 18:16 Broken sound? Jerry Quinn
` (2 preceding siblings ...)
1999-07-16 0:49 ` Paul Mackerras
@ 1999-07-19 15:30 ` Jerry Quinn
1999-07-20 6:10 ` Paul Mackerras
3 siblings, 1 reply; 8+ messages in thread
From: Jerry Quinn @ 1999-07-19 15:30 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
pm=Paul Mackerras writes:
pm> Jerry Quinn <jquinn@nortelnetworks.com> wrote:
pm>
pm> > I have a Powercenter 120 with 200Mhz 604e card running vanilla 2.2.10. Sound
pm> > seems to be broken. I do 'cat junk.au > /dev/audio' and get very interesting
pm> > sounding static. Is there a patch in vger I should be using that hasn't made
pm>
pm> What is the nature of junk.au? Is it 16-bit or 8-bit, stereo or mono,
pm> linear, mu-law or A-law encoded, and if it's 16-bit, is it big-endian
pm> or little-endian?
Hmm, junk.au started out as a wav file from Gnome. I originally was trying to
get the wav files working and then figured I'd try converting with sox to au.
I think I used error.wav in /usr/share/sounds (R5 dist).
Since the wav file wasn't working, I tried using sox with -x in an attempt to
swap endianness. The result was identical, so I thought I was dealing with
8-bit sound. I then tried a simple conversion to au. Which doesn't seem to
do any better.
What's the best way to figure out what format it really is?
pm> When you open /dev/audio, the driver sets it to 8kHz, mono, mu-law
pm> encoded. It's possible that the mu-law decoding is stuffed, I've
pm> never used it myself. I just tried catting a .au file to /dev/audio
pm> and it worked fine, though.
How is playing of other sound formats handled? How is the sample rate and
stereo set?
pm>
pm> > Also, if I send a sound to /dev/audio, it plays through both internal and
pm> > external speakers. If I try to send the sound to /dev/audio1, bash claims it
pm> > doesn't exist even though it shows up on 'ls'.
pm>
pm> You can use one of the many mixer programs to set the volume levels
pm> for the internal speaker and the headphone output.
OK.
What is /dev/audio1? Is that a separate device for the internal speaker?
Also, is there supposed to be /dev/dsp? I seem to have /dev/dsp1 only. I
presume this is access to the mixer?
In a somewhat related question, is there a correct place where docs on this
stuff should go? Using man didn't turn up as much as I'd like, so if I figure
out what it all does, I'd be glad to write a couple pages of docs :-)
Jerry
--
Jerry Quinn Tel: (514) 761-8737
jquinn@nortelnetworks.com Fax: (514) 761-8505
Speech Recognition Research
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Broken sound?
1999-07-19 15:30 ` Jerry Quinn
@ 1999-07-20 6:10 ` Paul Mackerras
1999-07-20 14:23 ` Jerry Quinn
0 siblings, 1 reply; 8+ messages in thread
From: Paul Mackerras @ 1999-07-20 6:10 UTC (permalink / raw)
To: jquinn; +Cc: linuxppc-dev
Jerry Quinn <jquinn@nortelnetworks.com> wrote:
> Hmm, junk.au started out as a wav file from Gnome. I originally was trying to
> get the wav files working and then figured I'd try converting with sox to au.
The .wav reader in KDE had an endianness problem in how it read the
header. That problem is fixed in the rpms that Franz Sirl put up.
Maybe the .wav reader in gnome has the same problem.
> How is playing of other sound formats handled? How is the sample rate and
> stereo set?
Ioctls on /dev/dsp or /dev/audio. The only difference between them is
that with /dev/dsp you get whatever was last set (or 8kHz linear 8-bit
mono at startup), whereas with /dev/audio it gets set to 8kHz mu-law
8-bit mono on the open. There is documentation at www.opensound.com.
> What is /dev/audio1? Is that a separate device for the internal speaker?
> Also, is there supposed to be /dev/dsp? I seem to have /dev/dsp1 only. I
> presume this is access to the mixer?
You should have a /dev/dsp (char device 14,3). /dev/audio1 and
/dev/dsp1 would correspond to a second sound card, which you don't
have. Powermacs have one (stereo) sound output channel which can be
routed to the speaker and/or the headphone.
Paul.
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Broken sound?
1999-07-20 6:10 ` Paul Mackerras
@ 1999-07-20 14:23 ` Jerry Quinn
0 siblings, 0 replies; 8+ messages in thread
From: Jerry Quinn @ 1999-07-20 14:23 UTC (permalink / raw)
To: Paul.Mackerras; +Cc: Jerry Quinn, linuxppc-dev
>> "Paul" == Paul Mackerras <paulus@cs.anu.edu.au> writes:
Paul> Jerry Quinn <jquinn@nortelnetworks.com> wrote:
>> Hmm, junk.au started out as a wav file from Gnome. I originally was
>> trying to get the wav files working and then figured I'd try converting
>> with sox to au.
Paul> The .wav reader in KDE had an endianness problem in how it read the
Paul> header. That problem is fixed in the rpms that Franz Sirl put up.
Paul> Maybe the .wav reader in gnome has the same problem.
Apparently. So I now know that I've got an application problem on my hands to
track down. Of course, I should have assumed that
>> How is playing of other sound formats handled? How is the sample rate and
>> stereo set?
Paul> Ioctls on /dev/dsp or /dev/audio. The only difference between them is
Paul> that with /dev/dsp you get whatever was last set (or 8kHz linear 8-bit
Paul> mono at startup), whereas with /dev/audio it gets set to 8kHz mu-law
Paul> 8-bit mono on the open. There is documentation at www.opensound.com.
Thanks for the pointer. That helps a lot. I think that some basic
documentation on the devices will be helpful. I guess they would need to be
part of the man-pages package. Projects, projects ...
Paul> You should have a /dev/dsp (char device 14,3). /dev/audio1 and
Paul> /dev/dsp1 would correspond to a second sound card, which you don't
Paul> have. Powermacs have one (stereo) sound output channel which can be
Paul> routed to the speaker and/or the headphone.
After some kernel browsing and guessing, I came to the same conclusion. I
used MAKEDEV to recreate the missing /dev/dsp.
Paul> Paul.
Thanks for all the info.
Jerry
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 8+ messages in thread