* G3 sound recording
@ 1999-05-28 6:26 Dan Malek
1999-05-28 13:51 ` Sound stuff (was Re: G3 sound recording) Hollis R Blanchard
0 siblings, 1 reply; 4+ messages in thread
From: Dan Malek @ 1999-05-28 6:26 UTC (permalink / raw)
To: linuxppc-dev
I just updated the PowerPC Mac dmasound driver so it will also
record. It still needs some work, but the framework is there
for anyone to update and it is useful.
I did the development on my PowerBook G3, and will soon test it
on my iMac.
The driver supports the standard sample rates and the signed/unsigned
8- and 16-bit PCM data format. It does not support A-law or u-law
because I have not yet taken the time to integrate the conversion
algorithm.
To the mixer read/write recording source I added the SOUND_MASK_MONITOR
because the AWACS has the "loop through" capability. When this is
set, along with your recording input selection, the audio input
will be sent to your selected audio output (along with giving you
the data). This is the way the audio CD players work, so if you
turn this off don't be surprised when an audio CD program may not
play. If this was not the right mask to use for this purpose, will
someone with more knowledge please tell me what is correct.
The driver runs full duplex, you can play and record at the same
time. In fact, I tested it this way with a loop back program.
Multiple threads and an extra slop buffer help out here.
I left plenty of things for others to do :-). Also, be careful
when requesting data formats. The driver will report more than
are supported by the recording side, since it can also play A-law
and u-law. I don't know the "right" thing to do here, since there
is only one method to get formats (I know, fix the record side :-).
Thanks to everyone that helped out, including the folks that started
the work and to Paul for the documentation.
Now, back to the 8xx and 82xx updates.......
Have fun.
-- Dan
[[ 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] 4+ messages in thread
* Sound stuff (was Re: G3 sound recording)
1999-05-28 6:26 G3 sound recording Dan Malek
@ 1999-05-28 13:51 ` Hollis R Blanchard
1999-05-28 15:40 ` Dan Malek
1999-05-28 22:11 ` Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Hollis R Blanchard @ 1999-05-28 13:51 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc-dev
On Fri, 28 May 1999, Dan Malek wrote:
>
> To the mixer read/write recording source I added the SOUND_MASK_MONITOR
> because the AWACS has the "loop through" capability. When this is
> set, along with your recording input selection, the audio input
> will be sent to your selected audio output (along with giving you
> the data). This is the way the audio CD players work, so if you
> turn this off don't be surprised when an audio CD program may not
> play. If this was not the right mask to use for this purpose, will
> someone with more knowledge please tell me what is correct.
First, that's awesome Dan. =)
Second, this reminded me of two sound things, both about the CD player. 1) If
I'm playing an mp3, any sox output (like Licq's notifications) gets played
after the mp3 has finished. Kinda like Windows, except the sound does
eventually play instead of getting dropped. But, if I'm playing a CD, I can
hear ICQ messages fine, simultaneously (more like the Mac OS). I assume this
is because the kernel would have to mix the sounds itself in the first case,
and the sound chip does it in the second? I guess this is a Linux limitation,
but does any kernel hacker have a quick hack so sounds get dropped instead of
queued? I don't really like getting 10 "uh-oh"'s when a song finishes because
I've been having a conversation.
The other thing was, does anyone remember the CD audio volume level being
adjustable before? I've been using 2.2.x for a while, and all I get is the
left channel either on or off. I could have sworn I used to be able to
actually adjust both channels's volumes to whatever I wanted (maybe in
2.1.x?). Am I remembering this wrong?
-Hollis
[[ 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] 4+ messages in thread
* Re: Sound stuff (was Re: G3 sound recording)
1999-05-28 13:51 ` Sound stuff (was Re: G3 sound recording) Hollis R Blanchard
@ 1999-05-28 15:40 ` Dan Malek
1999-05-28 22:11 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Dan Malek @ 1999-05-28 15:40 UTC (permalink / raw)
To: Hollis R Blanchard; +Cc: linuxppc-dev
Hollis R Blanchard wrote:
> First, that's awesome Dan. =)
Thanks. I haven't seen my CVS update mail message yet, so I don't
know where the bits really are :-). I did enough to help out my
other projects. I am doing lots of embedded audio projects, and
just needed a way to record various samples on my PowerBook. This
works for me, and unless I find some bugs in this basic feature I
probably won't be making any more updates.
> Second, this reminded me of two sound things, both about the CD...
When you are playing mp3, it is using the dma sound driver to send
those bits to the AWACS and out the audio port. The play functions
(which I didn't touch and hopefully didn't break :-), give precedence
to the data you are writing. Any kernel generated audio (like beeps)
are discarded.
The audio driver is an exclusive use device (play and record are
separate). If multiple programs are trying to open, the later ones
wait until the current program closes and then the later program
starts running. Now, keep in mind you can separately open the read
and write. When you get around to making ioctl()'s, the driver
doesn't track anything so you could have two threads or programs
fighting each other for capabilities.
When you are playing an audio CD, the analog sound from the CD is
just mixed in the output stage along with the samples you are playing
from any program. This is why you can play an audio CD without any
processing overhead, and why you also get the kernel (or program)
generated audio samples. If you want, you can now switch the CD to
become an recording input, read the data into a program, and then
write it back out. Lots of cycles I would rather spend on something
else :-).
The kernel certainly doesn't do any kind of audio mixing. It is
more then just adding the bits and should be done by an application
program that knows this. The sound drivers just enable hardware
capability, and provide a buffering path for PCM samples to
applications.
> The other thing was, does anyone remember the CD audio volume...
I played around with volumes and gains from my test program. If
you send the right parameters through the ioctl() it seems to
work. I didn't download any player/mixer sources to see how this
is done.
By the way, I thought someone (Cort?) has a program that would
intercept the volume/mute buttons on the PowerBook and perform the
volume operation. If not, I can write this. Maybe I can do
something similar to the screen brightness and intercept these in
the kernel and just "make it happen". This value must also be
stored in NVRAM someplace. Anyone know where?
-- Dan
[[ 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] 4+ messages in thread
* Re: Sound stuff (was Re: G3 sound recording)
1999-05-28 13:51 ` Sound stuff (was Re: G3 sound recording) Hollis R Blanchard
1999-05-28 15:40 ` Dan Malek
@ 1999-05-28 22:11 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 1999-05-28 22:11 UTC (permalink / raw)
To: Hollis R Blanchard; +Cc: Dan Malek, linuxppc-dev
On Fri, 28 May 1999, Hollis R Blanchard wrote:
> Second, this reminded me of two sound things, both about the CD player. 1) If
> I'm playing an mp3, any sox output (like Licq's notifications) gets played
> after the mp3 has finished. Kinda like Windows, except the sound does
> eventually play instead of getting dropped. But, if I'm playing a CD, I can
> hear ICQ messages fine, simultaneously (more like the Mac OS). I assume this
This can be fixed in part by esound and esound compliant apps. Ie: stick
x11amp into esd mode, and find an icq client that can send its sounds to
esd. Then you'll here 'em like in MacOS.
---
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
[[ 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] 4+ messages in thread
end of thread, other threads:[~1999-05-28 22:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-28 6:26 G3 sound recording Dan Malek
1999-05-28 13:51 ` Sound stuff (was Re: G3 sound recording) Hollis R Blanchard
1999-05-28 15:40 ` Dan Malek
1999-05-28 22:11 ` Tom Rini
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).