summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-09-21 03:27:51 +0000
committerpeter <peter@FreeBSD.org>1997-09-21 03:27:51 +0000
commit1419fcb42b4e1e5a73f4574739f4c232fde357e2 (patch)
tree1ccd2de4a87a886ad77d8ba0b3d9fddab34da188
parent831db910278a7297bda86ae9af54c4aab7fe3a1d (diff)
downloadFreeBSD-src-1419fcb42b4e1e5a73f4574739f4c232fde357e2.zip
FreeBSD-src-1419fcb42b4e1e5a73f4574739f4c232fde357e2.tar.gz
Recognize the CS4326 on the Intel PR440FX motherboard. (It works just like
the normal CS4326 except that it's had it's ID's tweaked for some reason) Also mark the device as alive in the attach routine so that the pnp system doesn't think the attach failed.
-rw-r--r--sys/dev/pcm/isa/mss.c35
-rw-r--r--sys/dev/sound/isa/mss.c35
-rw-r--r--sys/i386/isa/snd/ad1848.c35
3 files changed, 72 insertions, 33 deletions
diff --git a/sys/dev/pcm/isa/mss.c b/sys/dev/pcm/isa/mss.c
index c7a3551..1188d32 100644
--- a/sys/dev/pcm/isa/mss.c
+++ b/sys/dev/pcm/isa/mss.c
@@ -1182,6 +1182,7 @@ mss_detect(struct isa_device *dev)
break;
case 0x83: /* CS4236 */
+ case 0x03: /* CS4236 on Intel PR440FX motherboard */
name = "CS4236";
d->bd_id = MD_CS4236;
break ;
@@ -1291,6 +1292,8 @@ cs4236_probe(u_long csn, u_long vend_id)
s = "CS4237" ;
else if (vend_id == 0x3642630e)
s = "CS4236" ;
+ else if (vend_id == 0x360b630e)
+ s = "CS4236" ;
else if (vend_id == 0x3242630e)
s = "CS4232" ;
if (s) {
@@ -1323,18 +1326,27 @@ cs4236_attach(u_long csn, u_long vend_id, char *name,
snddev_last_probed = &tmp_d;
if (d.flags & DV_PNP_SBCODEC) {
printf("CS423x use sb-compatible codec\n");
- dev->id_iobase = d.port[2] ;
- tmp_d = sb_op_desc ;
- tmp_d.alt_base = d.port[0] - 4;
- d.drq[1] = 4 ; /* disable, it is not used ... */
+ dev->id_iobase = d.port[2] ;
+ tmp_d = sb_op_desc ;
+ tmp_d.alt_base = d.port[0] - 4;
+ d.drq[1] = 4 ; /* disable, it is not used ... */
} else {
- /* mss-compatible codec */
- dev->id_iobase = d.port[0] -4 ; /* XXX old mss have 4 bytes before... */
- tmp_d = mss_op_desc ;
- tmp_d.bd_id = MD_CS4232 ; /* to short-circuit the detect routine */
- tmp_d.alt_base = d.port[2];
- strcpy(tmp_d.name, name);
- tmp_d.audio_fmt |= AFMT_FULLDUPLEX ;
+ /* mss-compatible codec */
+ dev->id_iobase = d.port[0] -4 ; /* XXX old mss have 4 bytes before... */
+ tmp_d = mss_op_desc ;
+ switch (vend_id) {
+ case 0x3742630e: /* CS4237 */
+ case 0x3642630e: /* CS4236 */
+ case 0x360b630e: /* CS4236 on Intel PR440FX motherboard */
+ tmp_d.bd_id = MD_CS4236 ; /* to short-circuit the detect routine */
+ break;
+ default:
+ tmp_d.bd_id = MD_CS4232 ; /* to short-circuit the detect routine */
+ break;
+ }
+ tmp_d.alt_base = d.port[2];
+ strcpy(tmp_d.name, name);
+ tmp_d.audio_fmt |= AFMT_FULLDUPLEX ;
}
write_pnp_parms( &d, ldn );
enable_pnp_card();
@@ -1344,6 +1356,7 @@ cs4236_attach(u_long csn, u_long vend_id, char *name,
dev->id_intr = pcmintr ;
dev->id_flags = DV_F_DUAL_DMA | (d.drq[1] ) ;
+ dev->id_alive = 1;
pcmattach(dev);
}
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c
index c7a3551..1188d32 100644
--- a/sys/dev/sound/isa/mss.c
+++ b/sys/dev/sound/isa/mss.c
@@ -1182,6 +1182,7 @@ mss_detect(struct isa_device *dev)
break;
case 0x83: /* CS4236 */
+ case 0x03: /* CS4236 on Intel PR440FX motherboard */
name = "CS4236";
d->bd_id = MD_CS4236;
break ;
@@ -1291,6 +1292,8 @@ cs4236_probe(u_long csn, u_long vend_id)
s = "CS4237" ;
else if (vend_id == 0x3642630e)
s = "CS4236" ;
+ else if (vend_id == 0x360b630e)
+ s = "CS4236" ;
else if (vend_id == 0x3242630e)
s = "CS4232" ;
if (s) {
@@ -1323,18 +1326,27 @@ cs4236_attach(u_long csn, u_long vend_id, char *name,
snddev_last_probed = &tmp_d;
if (d.flags & DV_PNP_SBCODEC) {
printf("CS423x use sb-compatible codec\n");
- dev->id_iobase = d.port[2] ;
- tmp_d = sb_op_desc ;
- tmp_d.alt_base = d.port[0] - 4;
- d.drq[1] = 4 ; /* disable, it is not used ... */
+ dev->id_iobase = d.port[2] ;
+ tmp_d = sb_op_desc ;
+ tmp_d.alt_base = d.port[0] - 4;
+ d.drq[1] = 4 ; /* disable, it is not used ... */
} else {
- /* mss-compatible codec */
- dev->id_iobase = d.port[0] -4 ; /* XXX old mss have 4 bytes before... */
- tmp_d = mss_op_desc ;
- tmp_d.bd_id = MD_CS4232 ; /* to short-circuit the detect routine */
- tmp_d.alt_base = d.port[2];
- strcpy(tmp_d.name, name);
- tmp_d.audio_fmt |= AFMT_FULLDUPLEX ;
+ /* mss-compatible codec */
+ dev->id_iobase = d.port[0] -4 ; /* XXX old mss have 4 bytes before... */
+ tmp_d = mss_op_desc ;
+ switch (vend_id) {
+ case 0x3742630e: /* CS4237 */
+ case 0x3642630e: /* CS4236 */
+ case 0x360b630e: /* CS4236 on Intel PR440FX motherboard */
+ tmp_d.bd_id = MD_CS4236 ; /* to short-circuit the detect routine */
+ break;
+ default:
+ tmp_d.bd_id = MD_CS4232 ; /* to short-circuit the detect routine */
+ break;
+ }
+ tmp_d.alt_base = d.port[2];
+ strcpy(tmp_d.name, name);
+ tmp_d.audio_fmt |= AFMT_FULLDUPLEX ;
}
write_pnp_parms( &d, ldn );
enable_pnp_card();
@@ -1344,6 +1356,7 @@ cs4236_attach(u_long csn, u_long vend_id, char *name,
dev->id_intr = pcmintr ;
dev->id_flags = DV_F_DUAL_DMA | (d.drq[1] ) ;
+ dev->id_alive = 1;
pcmattach(dev);
}
diff --git a/sys/i386/isa/snd/ad1848.c b/sys/i386/isa/snd/ad1848.c
index c7a3551..1188d32 100644
--- a/sys/i386/isa/snd/ad1848.c
+++ b/sys/i386/isa/snd/ad1848.c
@@ -1182,6 +1182,7 @@ mss_detect(struct isa_device *dev)
break;
case 0x83: /* CS4236 */
+ case 0x03: /* CS4236 on Intel PR440FX motherboard */
name = "CS4236";
d->bd_id = MD_CS4236;
break ;
@@ -1291,6 +1292,8 @@ cs4236_probe(u_long csn, u_long vend_id)
s = "CS4237" ;
else if (vend_id == 0x3642630e)
s = "CS4236" ;
+ else if (vend_id == 0x360b630e)
+ s = "CS4236" ;
else if (vend_id == 0x3242630e)
s = "CS4232" ;
if (s) {
@@ -1323,18 +1326,27 @@ cs4236_attach(u_long csn, u_long vend_id, char *name,
snddev_last_probed = &tmp_d;
if (d.flags & DV_PNP_SBCODEC) {
printf("CS423x use sb-compatible codec\n");
- dev->id_iobase = d.port[2] ;
- tmp_d = sb_op_desc ;
- tmp_d.alt_base = d.port[0] - 4;
- d.drq[1] = 4 ; /* disable, it is not used ... */
+ dev->id_iobase = d.port[2] ;
+ tmp_d = sb_op_desc ;
+ tmp_d.alt_base = d.port[0] - 4;
+ d.drq[1] = 4 ; /* disable, it is not used ... */
} else {
- /* mss-compatible codec */
- dev->id_iobase = d.port[0] -4 ; /* XXX old mss have 4 bytes before... */
- tmp_d = mss_op_desc ;
- tmp_d.bd_id = MD_CS4232 ; /* to short-circuit the detect routine */
- tmp_d.alt_base = d.port[2];
- strcpy(tmp_d.name, name);
- tmp_d.audio_fmt |= AFMT_FULLDUPLEX ;
+ /* mss-compatible codec */
+ dev->id_iobase = d.port[0] -4 ; /* XXX old mss have 4 bytes before... */
+ tmp_d = mss_op_desc ;
+ switch (vend_id) {
+ case 0x3742630e: /* CS4237 */
+ case 0x3642630e: /* CS4236 */
+ case 0x360b630e: /* CS4236 on Intel PR440FX motherboard */
+ tmp_d.bd_id = MD_CS4236 ; /* to short-circuit the detect routine */
+ break;
+ default:
+ tmp_d.bd_id = MD_CS4232 ; /* to short-circuit the detect routine */
+ break;
+ }
+ tmp_d.alt_base = d.port[2];
+ strcpy(tmp_d.name, name);
+ tmp_d.audio_fmt |= AFMT_FULLDUPLEX ;
}
write_pnp_parms( &d, ldn );
enable_pnp_card();
@@ -1344,6 +1356,7 @@ cs4236_attach(u_long csn, u_long vend_id, char *name,
dev->id_intr = pcmintr ;
dev->id_flags = DV_F_DUAL_DMA | (d.drq[1] ) ;
+ dev->id_alive = 1;
pcmattach(dev);
}
OpenPOWER on IntegriCloud