Skip to contentSkip to conversation

Add support for Cyrix/NatSemi Geode CS5530 (VSA1)

PATCH In review Ash Willis 2 participants 2 messages May 24, 2007 Documentation

lore
Share & tools
lore

Ash Willis

author
#0 lore raw

PATCH 1/1 Add support for Cyrix/NatSemi Geode CS5530 (VSA1)

Takashi, here are my modified patches.
One small one for alsa-driver.
I took your advice and merged the rest into alsa-kernel. Everything should be in order this time.

Add support for Cyrix/NatSemi Geode SC5530 (VSA1)

Signed-off-by Ash Willis <[email protected]>
---

pci/cs5530.c new file +2 -0
diff -r fb391138d29c -r 994136cf989e pci/cs5530.c
@@ -0,0 +1,2 @@
+#include "../alsa-kernel/pci/cs5530.c"
+EXPORT_NO_SYMBOLS;

---

Documentation/ALSA-Configuration.txt +6 -1
diff -r 45179b325c8e -r 0b0c03c6c6ca Documentation/ALSA-Configuration.txt
@@ -467,7 +467,12 @@ Prior to version 0.9.0rc4 options had a 
     above explicitly.
 
     The power-management is supported.
-    
+
+  Module snd-cs5530
+  _________________
+
+    Module for Cyrix/NatSemi Geode 5530 chip. 
+  
   Module snd-cs5535audio
   ----------------------
 
include/sb.h +1 -0
diff -r 45179b325c8e -r 0b0c03c6c6ca include/sb.h
@@ -38,6 +38,7 @@ enum sb_hw_type {
 	SB_HW_ALS100,		/* Avance Logic ALS100 chip */
 	SB_HW_ALS4000,		/* Avance Logic ALS4000 chip */
 	SB_HW_DT019X,		/* Diamond Tech. DT-019X / Avance Logic ALS-007 */
+	SB_HW_CS5530,		/* Cyrix/NatSemi 5530 VSA1 */
 };
 
 #define SB_OPEN_PCM			0x01
isa/sb/sb16_main.c +10 -0
diff -r 45179b325c8e -r 0b0c03c6c6ca isa/sb/sb16_main.c
@@ -563,6 +563,11 @@ static int snd_sb16_playback_open(struct
       __open_ok:
 	if (chip->hardware == SB_HW_ALS100)
 		runtime->hw.rate_max = 48000;
+	if (chip->hardware == SB_HW_CS5530) {
+		runtime->hw.buffer_bytes_max = 32 * 1024;
+		runtime->hw.periods_min = 2;
+		runtime->hw.rate_min = 44100;
+	}
 	if (chip->mode & SB_RATE_LOCK)
 		runtime->hw.rate_min = runtime->hw.rate_max = chip->locked_rate;
 	chip->playback_substream = substream;
@@ -633,6 +638,11 @@ static int snd_sb16_capture_open(struct 
       __open_ok:
 	if (chip->hardware == SB_HW_ALS100)
 		runtime->hw.rate_max = 48000;
+	if (chip->hardware == SB_HW_CS5530) {
+		runtime->hw.buffer_bytes_max = 32 * 1024;
+		runtime->hw.periods_min = 2;
+		runtime->hw.rate_min = 44100;
+	}
 	if (chip->mode & SB_RATE_LOCK)
 		runtime->hw.rate_min = runtime->hw.rate_max = chip->locked_rate;
 	chip->capture_substream = substream;
isa/sb/sb_common.c +4 -1
diff -r 45179b325c8e -r 0b0c03c6c6ca isa/sb/sb_common.c
@@ -128,7 +128,7 @@ static int snd_sbdsp_probe(struct snd_sb
 	minor = version & 0xff;
 	snd_printdd("SB [0x%lx]: DSP chip found, version = %i.%i\n",
 		    chip->port, major, minor);
-	
+
 	switch (chip->hardware) {
 	case SB_HW_AUTO:
 		switch (major) {
@@ -167,6 +167,9 @@ static int snd_sbdsp_probe(struct snd_sb
 		break;
 	case SB_HW_DT019X:
 		str = "(DT019X/ALS007)";
+		break;
+	case SB_HW_CS5530:
+		str = "16 (CS5530)";
 		break;
 	default:
 		return -ENODEV;
isa/sb/sb_mixer.c +3 -0
diff -r 45179b325c8e -r 0b0c03c6c6ca isa/sb/sb_mixer.c
@@ -821,6 +821,7 @@ int snd_sbmixer_new(struct snd_sb *chip)
 		break;
 	case SB_HW_16:
 	case SB_HW_ALS100:
+	case SB_HW_CS5530:
 		if ((err = snd_sbmixer_init(chip,
 					    snd_sb16_controls,
 					    ARRAY_SIZE(snd_sb16_controls),
@@ -950,6 +951,7 @@ void snd_sbmixer_suspend(struct snd_sb *
 		break;
 	case SB_HW_16:
 	case SB_HW_ALS100:
+	case SB_HW_CS5530:
 		save_mixer(chip, sb16_saved_regs, ARRAY_SIZE(sb16_saved_regs));
 		break;
 	case SB_HW_ALS4000:
@@ -975,6 +977,7 @@ void snd_sbmixer_resume(struct snd_sb *c
 		break;
 	case SB_HW_16:
 	case SB_HW_ALS100:
+	case SB_HW_CS5530:
 		restore_mixer(chip, sb16_saved_regs, ARRAY_SIZE(sb16_saved_regs));
 		break;
 	case SB_HW_ALS4000:
pci/Kconfig +10 -0
diff -r 45179b325c8e -r 0b0c03c6c6ca pci/Kconfig
@@ -214,6 +214,16 @@ config SND_CS46XX_NEW_DSP
 	  Say Y here to use a new DSP image for SPDIF and dual codecs.
 
 	  This works better than the old code, so say Y.
+
+config SND_CS5530
+	tristate "CS5530 Audio"
+	depends on SND
+	select SND_SB16
+	help
+	  Say Y here to include support for audio on Cyrix/NatSemi CS5530 chips.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called snd-cs5530.
 
 config SND_CS5535AUDIO
 	tristate "CS5535/CS5536 Audio"
pci/Makefile +2 -0
diff -r 45179b325c8e -r 0b0c03c6c6ca pci/Makefile
@@ -12,6 +12,7 @@ snd-bt87x-objs := bt87x.o
 snd-bt87x-objs := bt87x.o
 snd-cmipci-objs := cmipci.o
 snd-cs4281-objs := cs4281.o
+snd-cs5530-objs := cs5530.o
 snd-ens1370-objs := ens1370.o
 snd-ens1371-objs := ens1371.o
 snd-es1938-objs := es1938.o
@@ -36,6 +37,7 @@ obj-$(CONFIG_SND_BT87X) += snd-bt87x.o
 obj-$(CONFIG_SND_BT87X) += snd-bt87x.o
 obj-$(CONFIG_SND_CMIPCI) += snd-cmipci.o
 obj-$(CONFIG_SND_CS4281) += snd-cs4281.o
+obj-$(CONFIG_SND_CS5530) += snd-cs5530.o
 obj-$(CONFIG_SND_ENS1370) += snd-ens1370.o
 obj-$(CONFIG_SND_ENS1371) += snd-ens1371.o
 obj-$(CONFIG_SND_ES1938) += snd-es1938.o
pci/cs5530.c new file +306 -0

306 lines not on this page · raw message

=

#1 lore raw

At Thu, 24 May 2007 09:09:29 -0500,

Quoted 9 lines · Ash Willis

Takashi, here are my modified patches.
One small one for alsa-driver.
I took your advice and merged the rest into alsa-kernel. Everything should be in order this time.

Add support for Cyrix/NatSemi Geode SC5530 (VSA1)

Signed-off-by Ash Willis <[email protected]>

Thanks. One thing I overlooked at the previous review is the kconfig dependency below:

pci/Kconfig config SND_CS46XX_NEW_DSP · line 220

Quoted 11 lines

diff -r 45179b325c8e -r 0b0c03c6c6ca pci/Kconfig

pci/Kconfig +4 -0
@@ -214,6 +214,16 @@ config SND_CS46XX_NEW_DSP
 	  Say Y here to use a new DSP image for SPDIF and dual codecs.
 
 	  This works better than the old code, so say Y.
+
+config SND_CS5530
+	tristate "CS5530 Audio"
+	depends on SND

The driver should also depend on ISA_DMA_API. Look at SND_ALS4000 entry. Otherwise it looks fine.

Takashi