diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/bktr/bktr_os.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/fmsradio.c | 17 |
2 files changed, 12 insertions, 15 deletions
diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c index 5903b62fa17..696c3bf1b12 100644 --- a/sys/dev/pci/bktr/bktr_os.c +++ b/sys/dev/pci/bktr/bktr_os.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bktr_os.c,v 1.10 2002/03/14 03:16:07 millert Exp $ */ +/* $OpenBSD: bktr_os.c,v 1.11 2002/06/06 16:29:37 mickey Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp $ */ /* @@ -1760,7 +1760,6 @@ bktr_get_info(void *v, struct radio_info *ri) #define STATUSBIT_STEREO 0x10 ri->mute = (int)sc->audio_mute_state ? 1 : 0; - ri->stereo = (status & STATUSBIT_STEREO) ? 1 : 0; ri->caps = RADIO_CAPS_DETECT_STEREO | RADIO_CAPS_HW_AFC; ri->freq = tv->frequency * 10; ri->info = (status & STATUSBIT_STEREO) ? RADIO_INFO_STEREO : 0; @@ -1768,6 +1767,13 @@ bktr_get_info(void *v, struct radio_info *ri) /* not yet supported */ ri->volume = ri->rfreq = ri->lock = 0; + /* + * The field ri->stereo is used to forcible switch to + * mono/stereo, not as an indicator of received signal quality. + * The ri->info is for that purpose. + */ + ri->stereo = 1; /* Can't switch to mono, always stereo */ + return (0); } #endif /* NRADIO */ diff --git a/sys/dev/pci/fmsradio.c b/sys/dev/pci/fmsradio.c index 24e8c33f27e..5ab13f2ea5b 100644 --- a/sys/dev/pci/fmsradio.c +++ b/sys/dev/pci/fmsradio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmsradio.c,v 1.5 2002/06/03 16:54:10 mickey Exp $ */ +/* $OpenBSD: fmsradio.c,v 1.6 2002/06/06 16:29:37 mickey Exp $ */ /* * Copyright (c) 2002 Vladimir Popov <jumbo@narod.ru> @@ -212,7 +212,7 @@ sf256pcs_probe(struct fms_softc *sc) radio->tea.ioh, radio->tea.offset), radio->tea.flags & TEA5757_TEA5759); if (freq != radio->freq) - return TUNER_UNKNOWN; + return TUNER_UNKNOWN; return TUNER_SF256PCS; } @@ -298,7 +298,7 @@ sf256pcpr_probe(struct fms_softc *sc) radio->tea.ioh, radio->tea.offset), radio->tea.flags & TEA5757_TEA5759); if (freq != radio->freq) - return TUNER_UNKNOWN; + return TUNER_UNKNOWN; return TUNER_SF256PCPR; } @@ -384,7 +384,7 @@ sf64pcr_probe(struct fms_softc *sc) radio->tea.ioh, radio->tea.offset), radio->tea.flags & TEA5757_TEA5759); if (freq != radio->freq) - return TUNER_UNKNOWN; + return TUNER_UNKNOWN; return TUNER_SF64PCR; } @@ -509,9 +509,6 @@ fmsradio_get_info(void *v, struct radio_info *ri) struct fmsradio_if *radio = (struct fmsradio_if *)sc->radio; u_int32_t buf; - if (radio->type == TUNER_UNKNOWN) - return (ENXIO); - ri->mute = radio->mute; ri->volume = radio->vol ? 255 : 0; ri->stereo = radio->stereo == TEA5757_STEREO ? 1 : 0; @@ -560,9 +557,6 @@ fmsradio_set_info(void *v, struct radio_info *ri) struct fms_softc *sc = v; struct fmsradio_if *radio = (struct fmsradio_if *)sc->radio; - if (radio->type == TUNER_UNKNOWN) - return (ENXIO); - radio->mute = ri->mute ? 1 : 0; radio->vol = ri->volume ? 255 : 0; radio->stereo = ri->stereo ? TEA5757_STEREO: TEA5757_MONO; @@ -580,9 +574,6 @@ fmsradio_search(void *v, int f) struct fms_softc *sc = v; struct fmsradio_if *radio = (struct fmsradio_if *)sc->radio; - if (radio->type == TUNER_UNKNOWN) - return (ENXIO); - tea5757_search(&radio->tea, radio->lock, radio->stereo, f); fmsradio_set_mute(sc); |