Beispiel #1
0
int
rt_get_info(void *v, struct radio_info *ri)
{
	struct rt_softc *sc = v;

	switch (sc->sc_ct) {
	case CARD_RADIOTRACK:
		ri->caps = RTRACK_CAPABILITIES;
		ri->info = 3 & rt_state(sc->lm.iot, sc->lm.ioh);
		ri->volume = rt_unconv_vol(sc->sc_vol);
		break;
	case CARD_SF16FMI:
		ri->caps = SF16FMI_CAPABILITIES;
		ri->volume = sc->sc_vol ? 255 : 0;
		ri->info = 0; /* UNSUPPORTED */
		break;
	default:
		/* No such card */
		return (1);
	}

	ri->mute = sc->sc_mute;
	ri->stereo = sc->sc_stereo == LM700X_STEREO ? 0 : 1;
	ri->rfreq = lm700x_decode_ref(sc->sc_rf);
	ri->freq = sc->sc_freq;

	/* UNSUPPORTED */
	ri->lock = 0;

	return (0);
}
int
rt_get_info(void *v, struct radio_info *ri)
{
    struct rt_softc *sc = v;

    ri->mute = sc->mute;
    ri->volume = rt_unconv_vol(sc->vol);
    ri->stereo = sc->stereo == LM700X_STEREO ? 0 : 1;
    ri->caps = RTRACK_CAPABILITIES;
    ri->rfreq = lm700x_decode_ref(sc->rf);
    ri->info = 3 & rt_state(sc->lm.iot, sc->lm.ioh);
    ri->freq = sc->freq;

    /* UNSUPPORTED */
    ri->lock = 0;

    return (0);
}