Hannu Savolainen пишет: > Hi Yair, > > Massive thanks. This indeed seems to be a bug. Possibility of letting > somebody to spot thi skind of ones was the main reason wy we open > sourced OSS. > > Best regards, > > Hannu > -------- > Yair K. wrote: > >> Hi, >> >> I found a possible bug in oss_sblive.c. SPDIF/OUT3 wasn't set on audigy2 >> cards, since the check only covered card_type == SB_AUDIGY. This change >> helped 'lash444' in a thread in the forums[1] to use analog output. >> >> [1] http://4front-tech.com/forum/viewtopic.php?t=2674 >> >> diff -r 0d92a9bcdfad kernel/drv/oss_sblive/oss_sblive.c >> --- a/kernel/drv/oss_sblive/oss_sblive.c Wed May 14 23:48:51 2008 +0300 >> +++ b/kernel/drv/oss_sblive/oss_sblive.c Sat May 17 01:48:05 2008 +0300 >> @@ -2742,7 +2742,7 @@ >> /* switch the shared SPDIF/OUT3 to DIGITAL or ANALOG mode */ >> /* depending on whether the port is SPDIF or analog */ >> >> - if (devc->card_type == SB_AUDIGY) >> + if (devc->card_type & SB_AUDIGY) >> { >> reg = INL (devc->osdev, devc->base + 0x18) & ~A_IOCFG_GPOUT0; >> val = (audigy_digital_din) ? 0x4 : 0; >> _______________________________________________ >> >> SB_LIVE also?
diff -ru oss-v4.0-build1015-src-gpl/kernel/drv/sblive/sblive.c oss-v4.0-build1015-src-gpl.good/kernel/drv/sblive/sblive.c --- oss-v4.0-build1015-src-gpl/kernel/drv/sblive/sblive.c 2008-03-24 07:33:06.000000000 +0200 +++ oss-v4.0-build1015-src-gpl.good/kernel/drv/sblive/sblive.c 2008-05-17 04:09:13.000000000 +0300 @@ -2748,14 +2748,14 @@ /* switch the shared SPDIF/OUT3 to DIGITAL or ANALOG mode */ /* depending on whether the port is SPDIF or analog */ - if (devc->card_type == SB_AUDIGY) + if (devc->card_type & SB_AUDIGY) { reg = INL (devc->osdev, devc->base + 0x18) & ~A_IOCFG_GPOUT0; val = (audigy_digital_din) ? 0x4 : 0; reg |= val; OUTL (devc->osdev, reg, devc->base + 0x18); } - if (devc->card_type == SB_LIVE) /* SBLIVE */ + if (devc->card_type & SB_LIVE) /* SBLIVE */ { reg = INL (devc->osdev, devc->base + 0x14) & ~HCFG_GPOUT0; val = (sblive_digital_din) ? HCFG_GPOUT0 : 0; @@ -3862,7 +3862,7 @@ devc->voice_busy[i * 2] = 1; devc->voice_busy[i * 2 + 1] = 1; portc->resetvol = 0; - if (devc->card_type == SB_LIVE) + if (devc->card_type & SB_LIVE) { /* * Do not enable vmix by default on Live! It would cause enormous _______________________________________________ oss-devel mailing list oss-devel@mailman.opensound.com http://mailman.opensound.com/mailman/listinfo/oss-devel