Re: The Commit That Broke PCM

2000-02-02 Thread Warner Losh

In message <[EMAIL PROTECTED]> Alex writes:
: Many thanks for your explanation.   The question is why PNPBIOS tries to
: attach and assign resources to devices that have already been attached
: (things like AT DMA controller, keyboard controller, math coprocessor,
: printer port, etc.)  Is it not smart enough to figure it out?And why
: do I need this option to make my non-PnP ISA sound card work?   Am I
: right in assuming that some intrusive device probes (that break my sound
: card) are avoided when PNPBIOS is defined?

Because we don't have drivers for each fo these devices, in some
cases.  The order in which these things probe is also incorrect.  We
should create drivers for the few that don't exist and also teach the
current drivers about these pnp ids.  I think that this part of the
PnP probe should happen BEFORE the rest of the isa device are probed.
They are fixed addresses on the mobo that can't be changed at all.
The pnp code likely needs to become smarter so that when presented
with a pnp device that is has the same resources as the hardwired
devices, the hardwire should "win" if you will (eg, fdc0 should attach
pnp or no and there shouldn't be a fdc1 that attaches to pnp and then
the nonpnp one fails to attach).

Don't know about the non-PnP isa question.  Likely it is more pnp than
you think :-)

: P.S.  Do you have the correct URL for PnP codes?

Yes:
http://members.hyperlink.net.au/~chart/download/pnpid.txt

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: The Commit That Broke PCM

2000-02-02 Thread Alex

Dear Warner,

Many thanks for your explanation.   The question is why PNPBIOS tries to
attach and assign resources to devices that have already been attached
(things like AT DMA controller, keyboard controller, math coprocessor,
printer port, etc.)  Is it not smart enough to figure it out?And why
do I need this option to make my non-PnP ISA sound card work?   Am I
right in assuming that some intrusive device probes (that break my sound
card) are avoided when PNPBIOS is defined?

Alex

P.S.  Do you have the correct URL for PnP codes?

File Not Found
The requested URL /~chart/pnpid.txt was not found on this server.



Warner Losh wrote:
> 
> In message <[EMAIL PROTECTED]> Alex writes:
> : # pnpinfo
> : Checking for Plug-n-Play devices...
> : No Plug-n-Play devices were found
> 
> Makes sense because this looks for PnP ISA addin cards.
> 
> OK, taking the lead from
> http://members.hyperlink.net.au/~chart/pnpid.txt, lets have a crack at
> these things:
> 
> : unknown0:  at port 0x80,0x398-0x399 iomem
> : 0x-0x,0xc9a00-0xc on isa0
> 
> These are your motherboard registers.
> 
> : unknown1:  at iomem
> : 0-0x9,0xe8000-0xf,0x10-0x7ff on isa0
> 
> This is your system board.
> 
> : unknown2:  at port 0-0xf,0x81-0x8f,0xc0-0xdf drq 4 on isa0
> 
> This is your AT DMA controller
> 
> : unknown:  can't assign resources
> 
> This is your AT interrupt controller
> 
> : unknown3:  at port 0x40-0x43 irq 0 on isa0
> 
> this is your AT Timer
> 
> : unknown4:  at port 0x70-0x71 irq 8 on isa0
> 
> This is your AT Realtime clock.
> 
> : unknown:  can't assign resources
> 
> This is your IBM Enhanced keyboard contoller
> 
> : unknown5:  at port 0xf0-0xff irq 13 on isa0
> 
> This is your math coprocessor
> 
> : unknown:  can't assign resources
> 
> This is your AT Speaker controller
> 
> : unknown6:  at port 0xcf8-0xcff on isa0
> 
> This is a PCI bus.
> 
> : unknown7:  at port 0x4d0-0x4d1,0x8000-0x803f,0x2180-0x218f on isa0
> 
> More motherboard registers.
> 
> : unknown:  can't assign resources
> 
> Yamaha OPL3-SAx Sound system.
> 
> : unknown:  can't assign resources
> 
> Yamaha OPL3-SAx COM Port
> 
> : unknown:  can't assign resources
> 
> Standard LPT printer port.
> 
> : unknown:  can't assign resources
> 
> PS/2 Port for PS/2-style mice
> 
> : unknown:  can't assign resources
> 
> 16550A-Compatible com port
> 
> : unknown:  can't assign resources
> 
> PC Standard Floppy disk controller.
> 
> : unknown8:  at port 0x201 on isa0
> 
> Yamaha OPL3-SAx GamePort
> 
> : unknown9:  at port 0x3e0-0x3e1 on isa0
> 
> Intel 82365-compatible CardBus controller
> 
> : kernel.   It also seems to have broken my *NON-PNP* ISA sound card,
> : unless PNPBIOS is used.   Incidentally, I have PnP OS=YES in my BIOS,
> : but that shouldn't matter since I don't have any PnP devices, right?
> 
> You should have PnP OS = *NO* in your BIOS.  Otherwise that PCI bus
> that you have won't necessarily be configured correctly.
> 
> Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: The Commit That Broke PCM

2000-02-01 Thread Warner Losh

In message <[EMAIL PROTECTED]> Alex writes:
: # pnpinfo 
: Checking for Plug-n-Play devices...
: No Plug-n-Play devices were found

Makes sense because this looks for PnP ISA addin cards.

OK, taking the lead from
http://members.hyperlink.net.au/~chart/pnpid.txt, lets have a crack at
these things:

: unknown0:  at port 0x80,0x398-0x399 iomem
: 0x-0x,0xc9a00-0xc on isa0

These are your motherboard registers.

: unknown1:  at iomem
: 0-0x9,0xe8000-0xf,0x10-0x7ff on isa0

This is your system board.

: unknown2:  at port 0-0xf,0x81-0x8f,0xc0-0xdf drq 4 on isa0

This is your AT DMA controller

: unknown:  can't assign resources

This is your AT interrupt controller

: unknown3:  at port 0x40-0x43 irq 0 on isa0

this is your AT Timer

: unknown4:  at port 0x70-0x71 irq 8 on isa0

This is your AT Realtime clock.

: unknown:  can't assign resources

This is your IBM Enhanced keyboard contoller

: unknown5:  at port 0xf0-0xff irq 13 on isa0

This is your math coprocessor

: unknown:  can't assign resources

This is your AT Speaker controller

: unknown6:  at port 0xcf8-0xcff on isa0

This is a PCI bus.

: unknown7:  at port 0x4d0-0x4d1,0x8000-0x803f,0x2180-0x218f on isa0

More motherboard registers.

: unknown:  can't assign resources

Yamaha OPL3-SAx Sound system.

: unknown:  can't assign resources

Yamaha OPL3-SAx COM Port

: unknown:  can't assign resources

Standard LPT printer port.

: unknown:  can't assign resources

PS/2 Port for PS/2-style mice

: unknown:  can't assign resources

16550A-Compatible com port

: unknown:  can't assign resources

PC Standard Floppy disk controller.

: unknown8:  at port 0x201 on isa0

Yamaha OPL3-SAx GamePort

: unknown9:  at port 0x3e0-0x3e1 on isa0

Intel 82365-compatible CardBus controller


: kernel.   It also seems to have broken my *NON-PNP* ISA sound card,
: unless PNPBIOS is used.   Incidentally, I have PnP OS=YES in my BIOS,
: but that shouldn't matter since I don't have any PnP devices, right?

You should have PnP OS = *NO* in your BIOS.  Otherwise that PCI bus
that you have won't necessarily be configured correctly.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: The Commit That Broke PCM

2000-02-01 Thread Alex

OK, the bad news is that reverting to pcm of Dec 5 doesn't fix my
problem.   The good news is that "options PNPBIOS" does fix it.  Now if
only someone could explain all this junk:

# pnpinfo 
Checking for Plug-n-Play devices...
No Plug-n-Play devices were found

# dmesg
...
pcm0:  at port 0x530-0x537,0x538-0x539 irq 5 drq 1 flags 0xa110
on isa0
unknown0:  at port 0x80,0x398-0x399 iomem
0x-0x,0xc9a00-0xc on isa0
unknown1:  at iomem
0-0x9,0xe8000-0xf,0x10-0x7ff on isa0
unknown2:  at port 0-0xf,0x81-0x8f,0xc0-0xdf drq 4 on isa0
unknown:  can't assign resources
unknown3:  at port 0x40-0x43 irq 0 on isa0
unknown4:  at port 0x70-0x71 irq 8 on isa0
unknown:  can't assign resources
unknown5:  at port 0xf0-0xff irq 13 on isa0
unknown:  can't assign resources
unknown6:  at port 0xcf8-0xcff on isa0
unknown7:  at port 0x4d0-0x4d1,0x8000-0x803f,0x2180-0x218f on
isa0
unknown:  can't assign resources
unknown:  can't assign resources
unknown:  can't assign resources
unknown:  can't assign resources
unknown:  can't assign resources
unknown:  can't assign resources
unknown8:  at port 0x201 on isa0
unknown9:  at port 0x3e0-0x3e1 on isa0


If I don't have any PnP devices, where does all that  crap come
from?   Also, I'm guessing that  stands for Yamaha, and indeed,
Windows thinks my sound card is a Yamaha.   Why does ymf_test fail to
detect it then?

I never used to have "controller pnp0" in my config file.   This option
disappeared on Dec. 6 as PnP stuff became a standard part of the
kernel.   It also seems to have broken my *NON-PNP* ISA sound card,
unless PNPBIOS is used.   Incidentally, I have PnP OS=YES in my BIOS,
but that shouldn't matter since I don't have any PnP devices, right?

What on earth is going on?

Alex




Alex wrote:
> 
> PCM has been broken for me since December 1999.   I would very much
> appreciate if someone could help me fix it before the code freeze (cg,
> dfr and tanimura CC'd).
> 
> I have an unknown MSS-compatible non-PnP ISA sound card, which
> identifies itself as a CS4231.   Unknown, because it's inside a
> laptop.   Before you ask, it has always been identified as a CS4231, and
> always worked very well.   The last kernel that I have which still works
> is dated 6 Dec 1999, and I'm playing mp3's with it right now.  Here's
> its verbose boot message:
> 
> mss_detect - chip revision 0x0a
> mss_detect() - Detected CS4231
> pcm0:  at port 0x530-0x53f,0x310-0x311 irq 5 drq 1 flags 0xa210
> on isa0
> pcm: setmap 3, ff00; 0xc8421000 -> 3
> pcm: setmap 4, ff00; 0xc8431000 -> 4
> isa_probe_children: probing PnP devices
> 
> Kernels built after 26 Dec 1999 print the following:
> 
> mss_detect - chip revision 0x0a
> mss_detect() - Detected CS4231
> pcm0:  at port 0x530-0x537,0x538-0x539 irq 5 drq 1 flags 0xa110
> on isa0
> pcm: setmap 3, ff00; 0xc840e000 -> 3
> pcm: setmap 4, ff00; 0xc841e000 -> 4
> isa_probe_children: probing PnP devices
> mss_intr: irq, but not from mss
> 
> and screw up the card - there is no sound and the driver gets stuck in
> "pcmwr".  Something was committed between the 6th and 26th of December
> that broke pcm.   The question is: which commit broke it?
> 
> What has changed?
> 
> 1) I/O port allocation and flags in dmesg:  0x310-0x311 vs 0x538-0x539,
> and 0xa210 vs 0xa110
> 
> 2) The "mss_intr: irq, but not from mss" line
> 
> Why?   My config file hasn't changed a bit, neither has my hardware or
> BIOS setup.I don't have "controller pnp" in my config file, so it
> probably has nothing to do with PnP.
> 
> The list of commits that might have broken it is appended below for your
> convenience.   Please let me know if I have missed something obvious.
> 
> Thank you for your attention
> 
> Alex
> 
> -
> (commits skipped)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



The Commit That Broke PCM

2000-01-27 Thread Alex

PCM has been broken for me since December 1999.   I would very much
appreciate if someone could help me fix it before the code freeze (cg,
dfr and tanimura CC'd).

I have an unknown MSS-compatible non-PnP ISA sound card, which
identifies itself as a CS4231.   Unknown, because it's inside a
laptop.   Before you ask, it has always been identified as a CS4231, and
always worked very well.   The last kernel that I have which still works
is dated 6 Dec 1999, and I'm playing mp3's with it right now.  Here's
its verbose boot message:

mss_detect - chip revision 0x0a
mss_detect() - Detected CS4231
pcm0:  at port 0x530-0x53f,0x310-0x311 irq 5 drq 1 flags 0xa210
on isa0
pcm: setmap 3, ff00; 0xc8421000 -> 3
pcm: setmap 4, ff00; 0xc8431000 -> 4
isa_probe_children: probing PnP devices


Kernels built after 26 Dec 1999 print the following:

mss_detect - chip revision 0x0a
mss_detect() - Detected CS4231
pcm0:  at port 0x530-0x537,0x538-0x539 irq 5 drq 1 flags 0xa110
on isa0
pcm: setmap 3, ff00; 0xc840e000 -> 3
pcm: setmap 4, ff00; 0xc841e000 -> 4
isa_probe_children: probing PnP devices
mss_intr: irq, but not from mss

and screw up the card - there is no sound and the driver gets stuck in
"pcmwr".  Something was committed between the 6th and 26th of December
that broke pcm.   The question is: which commit broke it?

What has changed?

1) I/O port allocation and flags in dmesg:  0x310-0x311 vs 0x538-0x539,
and 0xa210 vs 0xa110

2) The "mss_intr: irq, but not from mss" line

Why?   My config file hasn't changed a bit, neither has my hardware or
BIOS setup.I don't have "controller pnp" in my config file, so it
probably has nothing to do with PnP.

The list of commits that might have broken it is appended below for your
convenience.   Please let me know if I have missed something obvious.

Thank you for your attention

Alex

-


cg  1999/12/11 18:18:59 PST

  Modified files:
sys/dev/sound/pcmdatatypes.h dsp.c sound.c sound.h 
  Log:
  move channel-swapping support to the hardware driver since it knows
the card
  state best
  
  Revision  ChangesPath
  1.6   +3 -1  src/sys/dev/sound/pcm/datatypes.h
  1.11  +2 -11 src/sys/dev/sound/pcm/dsp.c
  1.11  +8 -1  src/sys/dev/sound/pcm/sound.c
  1.7   +2 -3  src/sys/dev/sound/pcm/sound.h


cg  1999/12/12 19:29:10 PST

  Modified files:
sys/dev/sound/pcmchannel.c channel.h datatypes.h dsp.c 
  Log:
  more dma underrun fixes, using a per-channel 2nd buffer
  
  Submitted by: tanimura
  
  Revision  ChangesPath
  1.10  +247 -87   src/sys/dev/sound/pcm/channel.c
  1.4   +10 -1 src/sys/dev/sound/pcm/channel.h
  1.7   +2 -1  src/sys/dev/sound/pcm/datatypes.h
  1.12  +2 -2  src/sys/dev/sound/pcm/dsp.c


cg  1999/12/18 14:24:50 PST

  Modified files:
sys/dev/sound/pcmchannel.c 
  Log:
  fix the buffer repetition on ^c problem
  
  Revision  ChangesPath
  1.11  +10 -13src/sys/dev/sound/pcm/channel.c


cg  1999/12/19 07:27:26 PST

  Modified files:
sys/dev/sound/pcmsound.c 
  Log:
  move make_dev operations for audio channels to pcm_addchan().  in
theory,
  with modifications to MAKEDEV this will allow use of multiple output
streams
  on cards supporting it, eg trident 4dwave.
  
  Revision  ChangesPath
  1.12  +12 -11src/sys/dev/sound/pcm/sound.c


cg  1999/12/19 14:32:56 PST

  Modified files:
sys/dev/sound/pcmchannel.c 
  Log:
  stop playing if we underrun; if there is more data to come, the next
write
  will restart
  
  Revision  ChangesPath
  1.12  +3 -1  src/sys/dev/sound/pcm/channel.c


cg  1999/12/19 16:56:53 PST

  Modified files:
sys/dev/sound/pcmsound.c 
  Log:
  allow (broken) apps to use mixer ioctls on dsp devices. eg: vmware
  
  Submitted by: "Vladimir N. Silyaev" <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.13  +5 -2  src/sys/dev/sound/pcm/sound.c


cg  1999/12/20 06:57:46 PST

  Modified files:
sys/dev/sound/isasb.c 
sys/dev/sound/pcmchannel.c 
  Log:
  minor cosmetics
  
  Revision  ChangesPath
  1.42  +1 -2  src/sys/dev/sound/isa/sb.c
  1.13  +6 -7  src/sys/dev/sound/pcm/channel.c


cg  1999/12/21 00:43:28 PST

  Modified files:
sys/dev/sound/isamss.c 
sys/dev/sound/pcmchannel.c 
  Log:
  minor cleanup
  
  Parts Submitted by:   Ville-Pertti Keinonen <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.38  +20 -23src/sys/dev/sound/isa/mss.c
  1.14  +2 -13 src/sys/dev/sound/pcm/channel.c


peter   1999/12/21 06:09:22 PST

  Modified files:
sys/dev/sound/isamss.c 
  Log:
  Collapse a bunch of unused MD_CS42nn tags into a single one.  This
saves
  going to a lot of trouble to identify it and set the tag and then not
use
  it.  Convert the pnp id matching to the preferred table based system.
  @@@0001 (CM