[ltp] Serial/PCMCIA problems with TP600E

Tom Grydeland linux-thinkpad@www.bm-soft.com
Fri, 16 Feb 2001 19:40:06 +0100 (MET)


On Fri, 16 Feb 2001, Thomas Hood wrote:

> > Having the MIDI player work for the first time was fun, though.  I never
> > use the parallel port, so I think I'll rather move it to IRQ 7.
> 
> How did you get it to work?  What exact commands did you 
> issue in order to play MIDI files through the sequencer?

Okay -- I have moved the MIDI synthesizer to IRQ 7 and that works.
Here's what I've done:

(I've tried reconfiguring my kernel to use pnp in order to run 'lspnp'
and 'setpnp' instead of PS2, but I've had no luck so far.  Enabling pnp
from the kernel config does not seem to trigger any recompilation, and
the /drivers/pnp directory does not contain any source code -- when I
try to run 'lspnp', the error message I get is 'lspnp: /proc/bus/pnp not
available', something I can verify for myself.)

PS2 setup:
==========

Output of 'PS2 ? IRQ':
------------------------------------------------------------
Command Syntax : PS2 ? IRQ
Description    : Display the current IRQ assignments.
Current State  :
                        System IRQ Assignment

                                            IRQ Level
                                            3 4 5   7 9 10 11 15
Serial-A (3 or 4)                   :         O                  
Parallel (5 or 7)                   :               X            
Internal Modem First IRQ            :                    O       
     (3, 4, 5, 7, 10, 11, or 15)
Internal Modem Second IRQ (3 or 4)  :       O                    
WSS/Sound Blaster/FM                :           O                
     (5, 7, 9, 10, 11 or 15)
MIDI port (5, 7, 9, 10, 11 or 15)   :                 O          
IR (3, 4, 5, 7)                     :         X                  
Secondary IDE (UltraBay)            :                          O 
Secondary IDE (Docking station)     :                          X 
Third IDE                           :                       X    
PCI IRQ                             :                       O    

  where    O: Currently assigned,
           X: Will be assigned after "Enable" is selected.
------------------------------------------------------------

(note that PS2 would not let me enable both the serial port and hte IR port on
the same address.)

Output of 'PS2 ? AU':
------------------------------------------------------------
Command Syntax : PS2  AUdio Enable|Disable
                            ADDress           530|604|E80|F40
                            IRQ               5|7|9|10|11|15
                            SBaddress         220|240|260|280
                            DMA               First DMA  (Second DMA)

                         Valid DMAs  :  0|1|3

Current State  : Enable
When "Enable" is selected, following parameters will be effective:
      ADDress  : 530
      IRQ      : 5
      SBaddress: 220
      DMA      : 0 1 
Description    : Use this parameter to set up Sound Blaster/WSS/FM.

   Note: To use audio devices(Sound Blaster/WSS/FM), assign DMA resources.
------------------------------------------------------------

Output of 'PS2 ? AUDIOCTRL':
------------------------------------------------------------
Command Syntax : PS2  AUDIOCTRL   Enable|Disable
                                  ADDress           538|D38|E88|FF0
Current State  : Enable
When "Enable" is selected, following parameters will be effective:
      ADDress  : 538
Description    : Use this parameter to set up Audio Control Port.

   Note: Audio Control Port is used for device setting and power management
         function of audio devices (WSS/Sound Blaster/FM/MIDI).
         When you use audio devices, it is recommended to set 'AUDIOCTRL'
         as 'Enable'.
------------------------------------------------------------

Output of 'PS2 ? MIDI':
------------------------------------------------------------
Command Syntax : PS2  MIDIport  Enable|Disable
                                ADDress           300|310|320|330
                                IRQ               5|7|9|10|11|15
Current State  : Enable
When "Enable" is selected, following parameter will be effective:
     ADDress   : 330
     IRQ       : 7
Description    : Use this parameter to set up the MIDI function.
------------------------------------------------------------


Linux setup:
============

I'm using the OSS/Free drivers supplied with the kernel.  I previously
tried using ALSA, but after an upgrade that broke things that had worked
previously (from 0.3.something to 0.4.1 IIRC) and where "downgrading"
proved to be impossible, I gave up on it.  After the recipe from IBM on
how to get sound going with the kernel-supplied drivers, I never felt
the need to try ALSA again.

sound-related part of /usr/src/linux/.config:
------------------------------------------------------------
#
# Sound
#
CONFIG_SOUND=m
# CONFIG_SOUND_CMPCI is not set
CONFIG_SOUND_CS4281=m
# CONFIG_SOUND_FUSION is not set
# CONFIG_SOUND_EMU10K1 is not set
# CONFIG_SOUND_ES1370 is not set
# CONFIG_SOUND_ES1371 is not set
# CONFIG_SOUND_MAESTRO is not set
# CONFIG_SOUND_ESSSOLO1 is not set
# CONFIG_SOUND_ICH is not set
# CONFIG_SOUND_SONICVIBES is not set
# CONFIG_SOUND_TRIDENT is not set
# CONFIG_SOUND_MSNDCLAS is not set
# CONFIG_SOUND_MSNDPIN is not set
# CONFIG_SOUND_VIA82CXXX is not set
CONFIG_SOUND_OSS=m
# CONFIG_SOUND_PAS is not set
# CONFIG_SOUND_SB is not set
# CONFIG_SOUND_GUS is not set
CONFIG_SOUND_MPU401=m
CONFIG_SOUND_PSS=m
# CONFIG_PSS_MIXER is not set
# CONFIG_SOUND_MSS is not set
# CONFIG_SOUND_SSCAPE is not set
# CONFIG_SOUND_TRIX is not set
# CONFIG_SOUND_MAD16 is not set
# CONFIG_SOUND_WAVEFRONT is not set
CONFIG_SOUND_CS4232=m
# CONFIG_SOUND_OPL3SA2 is not set
# CONFIG_SOUND_MAUI is not set
# CONFIG_SOUND_SGALAXY is not set
# CONFIG_SOUND_AD1816 is not set
# CONFIG_SOUND_OPL3SA1 is not set
# CONFIG_SOUND_SOFTOSS is not set
CONFIG_SOUND_YM3812=m
# CONFIG_SOUND_VMIDI is not set
# CONFIG_SOUND_UART6850 is not set
# CONFIG_SOUND_NM256 is not set
# CONFIG_SOUND_YMPCI is not set
# CONFIG_SOUND_YMFPCI is not set

#
# Additional low level sound drivers
#
# CONFIG_LOWLEVEL_SOUND is not set
------------------------------------------------------------


sound-related part of /etc/conf.modules:
------------------------------------------------------------
alias char-major-14     cs4232
alias sound             cs4232
pre-install sound insmod sound dmabuf=1
alias midi              opl3
options opl3            io=0x388
options cs4232 io=0x530 irq=5 dma=1 dma2=0 mpuio=0x330 mpuirq=7
------------------------------------------------------------

Contents of /proc/modules:
------------------------------------------------------------
af_packet               5676   2 (autoclean)
3c589_cs                8136   1
serial                 18324   0 (autoclean)
cs4232                  2408   1
ds                      6120   2 [3c589_cs]
i82365                 21556   2
pcmcia_core            44512   0 [3c589_cs ds i82365]
nls_cp437               3676   2 (autoclean)
vfat                    9348   1 (autoclean)
fat                    30240   1 (autoclean) [vfat]
opl3                   11208   1
uart401                 5904   1 [cs4232]
ad1848                 15984   1 [cs4232]
sound                  56364   0 [cs4232 opl3 uart401 ad1848]
soundcore               2148   6 [sound]
------------------------------------------------------------

Contents of /proc/interrupts:
------------------------------------------------------------
           CPU0       
  0:     218728          XT-PIC  timer
  1:       4762          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  3:       2459          XT-PIC  3c589_cs
  5:      21976          XT-PIC  Crystal audio controller
  7:          1          XT-PIC  MPU-401 UART
  8:          2          XT-PIC  rtc
 11:         12          XT-PIC  usb-uhci, i82365
 12:       9726          XT-PIC  PS/2 Mouse
 13:          1          XT-PIC  fpu
 14:       9386          XT-PIC  ide0
 15:          0          XT-PIC  ide1
NMI:          0
------------------------------------------------------------

Contents of /proc/ioports:
------------------------------------------------------------
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
0300-030f : 3c589_cs
0330-0333 : MPU-401 UART
0376-0376 : ide1
0388-038b : Yamaha OPL3
03c0-03df : vga+
03f6-03f6 : ide0
0530-0533 : Crystal audio controller
8400-8413 : usb-uhci
fcf0-fcf7 : ide0
fcf8-fcff : ide1
------------------------------------------------------------

I can now play mp3 files using 'mpg123' (or x11amp)

$ mpg123 ~/pub/musikk/Arild_Andersen/track01.mp3

and I can play midi files using 'playmidi'

$ playmidi /mnt/dos/windows/media/passport.mid

$ rpm -qf `which mpg123; which playmidi`
mpg123-0.59r-2
playmidi-2.4-7

Now I can no longer autoconfig /dev/ttyS2 (the IR port) through
setserial, even after enabling it with tpctl

# tpctl --rs2=en --rs2=0x3e8 --rs2=irq4
tpctl: serial port 2 has been enabled
tpctl: serial port 2 interrupt has been set to IRQ4
tpctl: serial port 2 base address has been set to 0x3e8
resource state:                                       current
   serial port 2:                                     enable  0x3e8 IRQ4
# setserial /dev/ttyS2 autoconfig
# setserial /dev/ttyS2 
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4


The machine still complains about resource conflicts or (with serial ports
disabled) hangs whenever trying to insert the modem PCMCIA card.  The ethernet
card works fine.

> Thomas

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>


----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html