linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC] DMAsound 2.4.0-tx => 2.2.17 back-port.
@ 2000-08-24 17:58 Iain Sandoe
  0 siblings, 0 replies; 13+ messages in thread
From: Iain Sandoe @ 2000-08-24 17:58 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux/PPC Development, Linux/m68k, Linux/PPC on APUS


Thanks Geert,

On Thu, Aug 24, 2000, Geert Uytterhoeven wrote:
> On Mon, 7 Aug 2000, Iain Sandoe wrote:
[...]
>>
>> 1. the look-up tables have been moved to the lower levels.
>
> Their definitions have to be static, else you get duplicate symbols when
> compiling a generic kernel that includes more than one low-level driver.
> Perhaps we better compile the needed tables separately and link them (to each
> low-level modules for a modular kernel, else to dmasound.o)?

OK. I think this (static issue) was a slip up (but I'm in favour of separate
files anyway).  As it stands, if we had all the options compiled in with
static tables the code size would grow again.

>> 2. The conditionalisation on HAS_RECORD has been made a run-time decision
>
> You don't need `MACHINE.can_record', just check the `MACHINE.record' function
> pointer.

OK, this saves a few bytes.

>> This means, AFAICT that it will no longer be necessary to have different
>> versions of dmasound_core.o for different machines (in the same arch).
>
> But you can no longer disable the code for recording for a machine that
> doesn't need it...

Well, this is a choice.  It was done in response to the comment that a
distro might wish to include all machine options.  This could not be done if
dmasound.o needs to be re-compiled.  Perhaps we need a vote :-)

>   - `MACHINE.can_byteswap' is never used, so remove it.

Sorry, this is work in progress - and doesn't have a purpose in the released
patch.

>   - Is it OK to use `AFMT_S16_LE' as startup mode for /dev/dsp? WAV-files can
>     be 8-bit as well, and always have a header so you can't just cat them to
>     /dev/dsp without static in the beginning anyway.

well, I don't know what's best here.  Most (if not all) of the files have
headers and/or chunks so there's no real 'right' way - apart from using a
proper sound playing app.

The idea was that .wav is now the most common format and that this does at
least play without wrecking your speakers if you are daft enough to do cat
>/dev/dsp

>   - What's the purpose of `dmasound.catch_rad'?

Sorry, more work in progress...

> And finally, my patch :-) DISCLAIMER: I don't claim that it works, not even
> that it compiles...

Thanks, I'll be back on this over the weekend (with luck :-)

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [RFC] DMAsound 2.4.0-tx => 2.2.17 back-port.
@ 2000-08-24 23:56 Iain Sandoe
  0 siblings, 0 replies; 13+ messages in thread
From: Iain Sandoe @ 2000-08-24 23:56 UTC (permalink / raw)
  To: Henry Worth; +Cc: linuxppc-dev


> I couldn't find the awacs stuff in my last darwin xnu download,
> has it moved out of the xnu projects, or did I just get lost?

They moved the stuff around a while back.

All the audio stuff is now under a module called "IO" at the top level of
the darwin cvs tree.

The audio driver directories under xnu are currently empty (although someone
on the darwin-dev posted a question a couple of days back about when they
would be filled in).

HTH
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [RFC] DMAsound 2.4.0-tx => 2.2.17 back-port.
@ 2000-08-24 16:30 Iain Sandoe
  2000-08-24 16:36 ` Michel Dänzer
  0 siblings, 1 reply; 13+ messages in thread
From: Iain Sandoe @ 2000-08-24 16:30 UTC (permalink / raw)
  To: daenzerm, Henry Worth; +Cc: linuxppc-dev


> Where is your backport (or rather patches against 2.4.0-testx) available?

The backport is on  http://www.drfruitcake.com/linux/linuxppc.html

I have not done a separate 2.4.0-test x patch.

The reason is that the code *is* the 2.4.0-testx code. (this was the point
of the back-port) with a few KERNEL_VERSION conditionals

So, if you want to use it on 2.4.0 all you should need to do is to replace
the files in drivers/sounds/dmasound with the ones from the back-port.

There are a few minor additions (DSP_SND_GETCAPS etc.).

If people want a 2.4.0 patch I'll do one... but it's been awful quiet
(s'cuse the pun).

I'm mostly working under 2.2.17 because of the flakiness of 2.4.0 (but, by
using the same code base, with the idea that any improvements will move
straight to 2.4.0)>

There are things in progress to sort out mixer abstraction issues with
different pmac models.  Wrestling with via-cuda :-( trying to read the i2c
bus (with some action but still some problems)..

and...
I've also been "underactive and out of touch" as well :-)

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [RFC] DMAsound 2.4.0-tx => 2.2.17 back-port.
@ 2000-08-24 15:52 Iain Sandoe
  2000-08-24 22:38 ` Henry Worth
  0 siblings, 1 reply; 13+ messages in thread
From: Iain Sandoe @ 2000-08-24 15:52 UTC (permalink / raw)
  To: Henry Worth, linuxppc-dev


Hi Henry,

> However, on the Pismo it looks like that in additional to the LE
> modes not being set, as previously discussed, the 8bit mode and rate
> parms are also not getting set in the Screamer. The RAW_AFMT_S8_S_44K
> sample sounds like Alvin and the Chipmonks and the lower rate samples
> are just high-speed jibberish. Here's the stest ouput for a couple:

The rate, mode and so is all done in software by the dmasound driver.  The
only hardware assists are: different sample rates (where supported) and
LE/BE swapping.

Oops, my stest instructions were not good enough - you need to tell stest
what the format of the file is:  **It does not look at *any* header
information**

./stest with no params will give you all the options.


>  [henry@osprey stest]$ ./stest -f AFMT_S16_LE_S_44K.wav

./stest -b16 -s -B -r 44100 -f  AFMT_S16_LE_S_44K.wav

(IIRC) would be right here...

and so on...

Sorry, I'll update the web page to point this out.

ciao,
Iain

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re:[RFC] DMAsound 2.4.0-tx => 2.2.17 back-port.
@ 2000-08-24 15:37 Henry Worth
  2000-08-24 16:08 ` [RFC] " Michel Dänzer
  0 siblings, 1 reply; 13+ messages in thread
From: Henry Worth @ 2000-08-24 15:37 UTC (permalink / raw)
  To: iain, linuxppc-dev


Iain,

(Iain, you may have recieved an earlier version of this, it bounced
on a typo in the maillist addr, so I'm resending with some additions)

My Pismo is back from the shop (bad I/O logic board) and Linux
reinstalled. I've applied the dmasound backport to
linux-2.2.217pre19-ben1. There were a couple of simple typos, I
think I've seen them mentioned before but let me know if you want
the diffs.

First the good news:

More recent verisons of esound (looks like those with ALSA changes)
have had some sort of buffering problem were they would skip blocks
during playback (with both esdplay and XMMS esd output plugin). The
blocks that played were at the correct speed, but the
track/sample would playback as quick as it could be read off
storage. The backport corrects,  or perhaps covers-up, the problem. I
need to investigate the root cause some more.

With the old driver it was impossible to use the modem while
playing back CD's, throughput would drop to zero. Now there is
little if any impact and the CPU load is cut significantly
(this is with, and without, irq unmasking enabled for the DVD
in both cases).

However, on the Pismo it looks like that in additional to the LE
modes not being set, as previously discussed, the 8bit mode and rate
parms are also not getting set in the Screamer. The RAW_AFMT_S8_S_44K
sample sounds like Alvin and the Chipmonks and the lower rate samples
are just high-speed jibberish. Here's the stest ouput for a couple:

 [henry@osprey stest]$ ./stest -f AFMT_S16_LE_S_44K.wav
  /dev/dsp Capabilities : Rev 18
  DUPLEX : real-time : BATCH : co-proc : trigger : mmap
  /dev/dsp Supported Formats.
  MU-LAW : A-LAW : ima-adpcm : U8 : S16-LE : S16-BE : S8 : U16-LE :
U16-BE : mpeg-2
  /dev/dsp current settings <  AFMT_S16_BE : STEREO : >
  /dev/dsp now set to :   AFMT_S16_BE :  STEREO :
  SAMPLINGRATE=44100
  fragment parameter = 00020009
  OSS BUFFERS: fragments=2  fragment size=512  total buffer size=1024
  buffer latency=5.804989 ms

[henry@osprey stest]$ ./stest -f RAW_AFMT_S8_S_44K
  /dev/dsp Capabilities : Rev 18
  DUPLEX : real-time : BATCH : co-proc : trigger : mmap
  /dev/dsp Supported Formats.
  MU-LAW : A-LAW : ima-adpcm : U8 : S16-LE : S16-BE : S8 : U16-LE :
U16-BE : mpeg-2
  /dev/dsp current settings <  AFMT_S16_BE : STEREO : >
  /dev/dsp now set to :   AFMT_S16_BE :  STEREO :
  SAMPLINGRATE=44100
  fragment parameter = 00020009
  OSS BUFFERS: fragments=2  fragment size=512  total buffer size=1024
  buffer latency=5.804989 ms
finished
[henry@osprey stest]$ ./stest -f SUN_AFMT_A_LAW_M_11K
  /dev/dsp Capabilities : Rev 18
  DUPLEX : real-time : BATCH : co-proc : trigger : mmap
  /dev/dsp Supported Formats.
  MU-LAW : A-LAW : ima-adpcm : U8 : S16-LE : S16-BE : S8 : U16-LE :
U16-BE : mpeg-2
  /dev/dsp current settings <  AFMT_S16_BE : STEREO : >
  /dev/dsp now set to :   AFMT_S16_BE :  STEREO :
  SAMPLINGRATE=44100
  fragment parameter = 00020009
  OSS BUFFERS: fragments=2  fragment size=512  total buffer size=1024
  buffer latency=5.804989 ms
finished
[henry@osprey stest]$ ./stest -f SUN_AFMT_MU_LAW_M_8K
  /dev/dsp Capabilities : Rev 18
  DUPLEX : real-time : BATCH : co-proc : trigger : mmap
  /dev/dsp Supported Formats.
  MU-LAW : A-LAW : ima-adpcm : U8 : S16-LE : S16-BE : S8 : U16-LE :
U16-BE : mpeg-2
  /dev/dsp current settings <  AFMT_S16_BE : STEREO : >
  /dev/dsp now set to :   AFMT_S16_BE :  STEREO :
  SAMPLINGRATE=44100
  fragment parameter = 00020009
  OSS BUFFERS: fragments=2  fragment size=512  total buffer size=1024
  buffer latency=5.804989 ms
finished

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [RFC] DMAsound 2.4.0-tx => 2.2.17 back-port.
@ 2000-08-07  1:00 Iain Sandoe
  2000-08-24 13:07 ` Geert Uytterhoeven
  0 siblings, 1 reply; 13+ messages in thread
From: Iain Sandoe @ 2000-08-07  1:00 UTC (permalink / raw)
  To: linuxppc-dev, linux-m68k, linux-apus-devel


Hi,

This patch makes a common code base for dmasound between 2.4.0 and 2.2.17.

It is, essentially, the same as Geert's 2.4.0 split-up applied back to
2.2.17.

I would like to ask Paulus to consider including this patch in pmac 2.2.17.
However, it affects other archs.

It is unlikely to work 'out-of-the-box' for these archs - although I have
tried to do as much of the 'wrapper' work as poss.

I would like to know if the other dmasound users consider it worthwhile
putting this in at 2.2.17, and whether it has been tried.

There is an alternative possibility if it is only wanted for pmac.

======

Motivation:

1/  The main beneficiary of this is pmac.  There are now so many new
machines (and extensions to deal with older machines) that I would guess the
size of the pmac portion of the code could grow by 2X.  This is getting
impractical with the monolithic dmasound.c (and will be different to 2.4.0
where the split has already been done).

So this patch, primarily, makes the driver more maintainable.

2/  There seems to be a need to continue for a little while, at least, with
2.2.X.

3/  this code-base is identical between 2.4.0-testX and 2.2.17preY.   I.E.
you can symlink to the same directory for 2.2.17 & 2.4.0 - which means that
effort is not repeated for 2.4.0.

======

Changes/Fixes:

There are a few small additions at the top level (affecting all archs):

1. the look-up tables have been moved to the lower levels.
2. The conditionalisation on HAS_RECORD has been made a run-time decision

This means, AFAICT that it will no longer be necessary to have different
versions of dmasound_core.o for different machines (in the same arch).

3.  A SNDCTL_GET_CAPS ioctl has been added: it needs filling in for Q40,
Paula & Atari.   One line of code for someone who knows their machine :-)

Other changes are pmac-only and I'll leave them out of this post.

=====

The latest version of this can be found at:
http://www.drfruitcake.com/linux/linuxppc.html (including binaries etc. for
pmac)

It has also been uploaded to the (brand-new) patch-tracking system...

http://sourceforge.net/projects/ppclinux/

ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2000-08-28 15:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-24 17:58 [RFC] DMAsound 2.4.0-tx => 2.2.17 back-port Iain Sandoe
  -- strict thread matches above, loose matches on Subject: below --
2000-08-24 23:56 Iain Sandoe
2000-08-24 16:30 Iain Sandoe
2000-08-24 16:36 ` Michel Dänzer
2000-08-24 19:46   ` Henry Worth
2000-08-24 15:52 Iain Sandoe
2000-08-24 22:38 ` Henry Worth
2000-08-24 23:26   ` Benjamin Herrenschmidt
2000-08-24 15:37 Henry Worth
2000-08-24 16:08 ` [RFC] " Michel Dänzer
2000-08-24 16:15   ` Hollis R Blanchard
2000-08-07  1:00 Iain Sandoe
2000-08-24 13:07 ` Geert Uytterhoeven
2000-08-28 15:37   ` Richard Zidlicky

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).