diff options
author | Robert Nagy <robert@cvs.openbsd.org> | 2005-12-02 15:01:33 +0000 |
---|---|---|
committer | Robert Nagy <robert@cvs.openbsd.org> | 2005-12-02 15:01:33 +0000 |
commit | 37de9a357a948d9addb29a4fe7b521c08c53b12a (patch) | |
tree | 252897768d8cf509a59acab5cee6f31b026c3595 /sys/dev/pci/bktr | |
parent | 34ad0926df6f0b6919714b1994b60ac42002c995 (diff) |
Check if the given FM frequency is between 87.5Mhz and 108Mhz.
If the given value is too small default to 87.5Mhz, if it is
too high default to 108Mhz.
ok mickey@
Diffstat (limited to 'sys/dev/pci/bktr')
-rw-r--r-- | sys/dev/pci/bktr/bktr_os.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c index 99fd0455ce3..4b62d103f32 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.20 2005/11/21 18:16:41 millert Exp $ */ +/* $OpenBSD: bktr_os.c,v 1.21 2005/12/02 15:01:32 robert Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp $ */ /* @@ -1278,6 +1278,11 @@ bktr_set_info(void *v, struct radio_info *ri) init_audio_devices(sc); } + if (ri->freq < MIN_FM_FREQ) + ri->freq = MIN_FM_FREQ; + if (ri->freq > MAX_FM_FREQ) + ri->freq = MAX_FM_FREQ; + freq = ri->freq / 10; set_audio(sc, AUDIO_INTERN); /* use internal audio */ temp_mute(sc, TRUE); |