mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] more than four ES1371 cards
@ 2001-11-18 20:18 Alex Perry
  2001-11-18 20:55 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Perry @ 2001-11-18 20:18 UTC (permalink / raw)
  To: linux-kernel

The standard es1371 card consumes two DSP devices per card,
so that you cannot use more than four of them in a single PC chassis.
This patch adds a configuration option to disable the second DSP output
so that the OSS maximum of eight cards can be installed and used together.

diff -C3 drivers/sound-orig/Config.in drivers/sound/Config.in
*** drivers/sound-orig/Config.in	Fri Nov  2 22:27:34 2001
--- drivers/sound/Config.in	Fri Nov  2 22:30:33 2001
***************
*** 36,41 ****
--- 36,42 ----
  dep_tristate '  Crystal Sound CS4281' CONFIG_SOUND_CS4281 $CONFIG_SOUND
  dep_tristate '  Ensoniq AudioPCI (ES1370)' CONFIG_SOUND_ES1370 $CONFIG_SOUND $CONFIG_PCI
  dep_tristate '  Creative Ensoniq AudioPCI 97 (ES1371)' CONFIG_SOUND_ES1371 $CONFIG_SOUND $CONFIG_PCI
+ dep_mbool    '    Disable second audio output of ES1371' CONFIG_SOUND_ES1371_NODAC $CONFIG_SOUND_ES1371
  dep_tristate '  ESS Technology Solo1' CONFIG_SOUND_ESSSOLO1 $CONFIG_SOUND
  dep_tristate '  ESS Maestro, Maestro2, Maestro2E driver' CONFIG_SOUND_MAESTRO $CONFIG_SOUND
  dep_tristate '  ESS Maestro3/Allegro driver (EXPERIMENTAL)' CONFIG_SOUND_MAESTRO3 $CONFIG_SOUND $CONFIG_PCI $CONFIG_EXPERIMENTAL
Common subdirectories: drivers/sound-orig/cs4281 and drivers/sound/cs4281
Common subdirectories: drivers/sound-orig/dmasound and drivers/sound/dmasound
Common subdirectories: drivers/sound-orig/emu10k1 and drivers/sound/emu10k1
diff -C3 drivers/sound-orig/es1371.c drivers/sound/es1371.c
*** drivers/sound-orig/es1371.c	Fri Nov  2 22:27:34 2001
--- drivers/sound/es1371.c	Fri Nov  2 22:56:56 2001
***************
*** 2858,2865 ****
  		goto err_dev1;
  	if ((res=(s->codec.dev_mixer = register_sound_mixer(&es1371_mixer_fops, -1)) < 0))
  		goto err_dev2;
! 	if ((res=(s->dev_dac = register_sound_dsp(&es1371_dac_fops, -1)) < 0))
! 		goto err_dev3;
  	if ((res=(s->dev_midi = register_sound_midi(&es1371_midi_fops, -1))<0 ))
  		goto err_dev4;
  #ifdef ES1371_DEBUG
--- 2858,2869 ----
  		goto err_dev1;
  	if ((res=(s->codec.dev_mixer = register_sound_mixer(&es1371_mixer_fops, -1)) < 0))
  		goto err_dev2;
! #ifdef CONFIG_SOUND_ES1371_NODAC
!         s->dev_dac = -1;
! #else /* NODAC */
!         if ((res=(s->dev_dac = register_sound_dsp(&es1371_dac_fops, -1)) < 0))
!                 goto err_dev3;
! #endif /* NODAC */
  	if ((res=(s->dev_midi = register_sound_midi(&es1371_midi_fops, -1))<0 ))
  		goto err_dev4;
  #ifdef ES1371_DEBUG
***************
*** 2985,2990 ****
--- 2989,2997 ----
  	if (s->gameport.io)
  		release_region(s->gameport.io, JOY_EXTENT);
   err_dev4:
+ #ifdef CONFIG_SOUND_ES1371_NODAC
+         if ( s->dev_dac != -1 )
+ #endif /* NODAC */
  	unregister_sound_dsp(s->dev_dac);
   err_dev3:
  	unregister_sound_mixer(s->codec.dev_mixer);
***************
*** 3022,3027 ****
--- 3029,3037 ----
  	release_region(s->io, ES1371_EXTENT);
  	unregister_sound_dsp(s->dev_audio);
  	unregister_sound_mixer(s->codec.dev_mixer);
+ #ifdef CONFIG_SOUND_ES1371_NODAC
+         if ( s->dev_dac != -1 )
+ #endif /* NODAC */
  	unregister_sound_dsp(s->dev_dac);
  	unregister_sound_midi(s->dev_midi);
  	kfree(s);

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

* Re: [PATCH] more than four ES1371 cards
  2001-11-18 20:18 [PATCH] more than four ES1371 cards Alex Perry
@ 2001-11-18 20:55 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2001-11-18 20:55 UTC (permalink / raw)
  To: Alex Perry; +Cc: linux-kernel

> The standard es1371 card consumes two DSP devices per card,
> so that you cannot use more than four of them in a single PC chassis.
> This patch adds a configuration option to disable the second DSP output
> so that the OSS maximum of eight cards can be installed and used together.

If you want to sort that out please instead fix the driver to use one dsp
device and allocate the play only channel to O_RDONLY when possible and
the other channel to both. This is how we handle all the newer cards like
the SB Live with hundreds of channels

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

end of thread, other threads:[~2001-11-18 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-18 20:18 [PATCH] more than four ES1371 cards Alex Perry
2001-11-18 20:55 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®