From d830eb7d9fb4e568b5ee1fd1821695c43466207d Mon Sep 17 00:00:00 2001 From: Steve Passe Date: Fri, 21 Mar 1997 17:29:54 +0000 Subject: [PATCH] Submitted by: Michael Petry Michael submitted code to activate the audio muxes. fsmp: extended those changes for different boards. auto-detection of board types. auto-detection of tuner types. auto-detection of stereo option --- sys/dev/bktr/ioctl_bt848.h | 45 +++++++++++++++++++++++----------- sys/i386/include/ioctl_bt848.h | 45 +++++++++++++++++++++++----------- sys/sys/ioctl_bt848.h | 45 +++++++++++++++++++++++----------- 3 files changed, 93 insertions(+), 42 deletions(-) diff --git a/sys/dev/bktr/ioctl_bt848.h b/sys/dev/bktr/ioctl_bt848.h index ad18dd46e6ce..be72008697de 100644 --- a/sys/dev/bktr/ioctl_bt848.h +++ b/sys/dev/bktr/ioctl_bt848.h @@ -3,14 +3,14 @@ */ /* - * tuner types for the + * frequency sets */ -#define TUNERTYPE_NABCST 1 -#define TUNERTYPE_CABLEIRC 2 -#define TUNERTYPE_CABLEHRC 3 -#define TUNERTYPE_WEUROPE 4 -#define TUNERTYPE_MIN TUNERTYPE_NABCST -#define TUNERTYPE_MAX TUNERTYPE_WEUROPE +#define CHNLSET_NABCST 1 +#define CHNLSET_CABLEIRC 2 +#define CHNLSET_CABLEHRC 3 +#define CHNLSET_WEUROPE 4 +#define CHNLSET_MIN CHNLSET_NABCST +#define CHNLSET_MAX CHNLSET_WEUROPE /* @@ -65,6 +65,19 @@ #define BT848_SATVSTEPS 512 +/* + * audio stuff + */ +#define AUDIO_TUNER 0x00 /* command for the audio routine */ +#define AUDIO_EXTERN 0x01 /* don't confuse them with bit */ +#define AUDIO_INTERN 0x02 /* settings */ +#define AUDIO_MUTE 0x80 +#define AUDIO_UNMUTE 0x81 + + +/* + * EEProm stuff + */ struct eeProm { u_char bytes[ 256 ]; }; @@ -83,24 +96,28 @@ struct eeProm { #define TVTUNER_GETFREQ _IOR('x', 36, unsigned int) /* get frequency */ -#define BT848_SHUE _IOW('x', 37, int) /* set hue */ -#define BT848_GHUE _IOR('x', 37, int) /* get hue */ +#define BT848_SHUE _IOW('x', 37, int) /* set hue */ +#define BT848_GHUE _IOR('x', 37, int) /* get hue */ #define BT848_SBRIG _IOW('x', 38, int) /* set brightness */ -#define BT848_GBRIG _IOR('x', 38, int) /* get brightness */ +#define BT848_GBRIG _IOR('x', 38, int) /* get brightness */ #define BT848_SCSAT _IOW('x', 39, int) /* set chroma sat */ -#define BT848_GCSAT _IOR('x', 39, int) /* get UV saturation */ -#define BT848_SCONT _IOW('x', 40, int) /* set contrast */ +#define BT848_GCSAT _IOR('x', 39, int) /* get UV saturation */ +#define BT848_SCONT _IOW('x', 40, int) /* set contrast */ #define BT848_GCONT _IOR('x', 40, int) /* get contrast */ #define BT848_SVSAT _IOW('x', 41, int) /* set chroma V sat */ -#define BT848_GVSAT _IOR('x', 41, int) /* get V saturation */ +#define BT848_GVSAT _IOR('x', 41, int) /* get V saturation */ #define BT848_SUSAT _IOW('x', 42, int) /* set chroma U sat */ -#define BT848_GUSAT _IOR('x', 42, int) /* get U saturation */ +#define BT848_GUSAT _IOR('x', 42, int) /* get U saturation */ #define BT848_SCBARS _IOR('x', 43, int) /* set colorbar */ #define BT848_CCBARS _IOR('x', 44, int) /* clear colorbar */ #define BT848_EEPROM _IOR('x', 45, struct eeProm) +#define BT848_SAUDIO _IOW('x', 46, int) /* set audio channel */ +#define BT848_GAUDIO _IOR('x', 47, int) /* get audio channel */ +#define BT848_SBTSC _IOW('x', 48, int) /* set audio channel */ + /* * XXX: more bad magic, * we need to fix the METEORGINPUT to return something public diff --git a/sys/i386/include/ioctl_bt848.h b/sys/i386/include/ioctl_bt848.h index ad18dd46e6ce..be72008697de 100644 --- a/sys/i386/include/ioctl_bt848.h +++ b/sys/i386/include/ioctl_bt848.h @@ -3,14 +3,14 @@ */ /* - * tuner types for the + * frequency sets */ -#define TUNERTYPE_NABCST 1 -#define TUNERTYPE_CABLEIRC 2 -#define TUNERTYPE_CABLEHRC 3 -#define TUNERTYPE_WEUROPE 4 -#define TUNERTYPE_MIN TUNERTYPE_NABCST -#define TUNERTYPE_MAX TUNERTYPE_WEUROPE +#define CHNLSET_NABCST 1 +#define CHNLSET_CABLEIRC 2 +#define CHNLSET_CABLEHRC 3 +#define CHNLSET_WEUROPE 4 +#define CHNLSET_MIN CHNLSET_NABCST +#define CHNLSET_MAX CHNLSET_WEUROPE /* @@ -65,6 +65,19 @@ #define BT848_SATVSTEPS 512 +/* + * audio stuff + */ +#define AUDIO_TUNER 0x00 /* command for the audio routine */ +#define AUDIO_EXTERN 0x01 /* don't confuse them with bit */ +#define AUDIO_INTERN 0x02 /* settings */ +#define AUDIO_MUTE 0x80 +#define AUDIO_UNMUTE 0x81 + + +/* + * EEProm stuff + */ struct eeProm { u_char bytes[ 256 ]; }; @@ -83,24 +96,28 @@ struct eeProm { #define TVTUNER_GETFREQ _IOR('x', 36, unsigned int) /* get frequency */ -#define BT848_SHUE _IOW('x', 37, int) /* set hue */ -#define BT848_GHUE _IOR('x', 37, int) /* get hue */ +#define BT848_SHUE _IOW('x', 37, int) /* set hue */ +#define BT848_GHUE _IOR('x', 37, int) /* get hue */ #define BT848_SBRIG _IOW('x', 38, int) /* set brightness */ -#define BT848_GBRIG _IOR('x', 38, int) /* get brightness */ +#define BT848_GBRIG _IOR('x', 38, int) /* get brightness */ #define BT848_SCSAT _IOW('x', 39, int) /* set chroma sat */ -#define BT848_GCSAT _IOR('x', 39, int) /* get UV saturation */ -#define BT848_SCONT _IOW('x', 40, int) /* set contrast */ +#define BT848_GCSAT _IOR('x', 39, int) /* get UV saturation */ +#define BT848_SCONT _IOW('x', 40, int) /* set contrast */ #define BT848_GCONT _IOR('x', 40, int) /* get contrast */ #define BT848_SVSAT _IOW('x', 41, int) /* set chroma V sat */ -#define BT848_GVSAT _IOR('x', 41, int) /* get V saturation */ +#define BT848_GVSAT _IOR('x', 41, int) /* get V saturation */ #define BT848_SUSAT _IOW('x', 42, int) /* set chroma U sat */ -#define BT848_GUSAT _IOR('x', 42, int) /* get U saturation */ +#define BT848_GUSAT _IOR('x', 42, int) /* get U saturation */ #define BT848_SCBARS _IOR('x', 43, int) /* set colorbar */ #define BT848_CCBARS _IOR('x', 44, int) /* clear colorbar */ #define BT848_EEPROM _IOR('x', 45, struct eeProm) +#define BT848_SAUDIO _IOW('x', 46, int) /* set audio channel */ +#define BT848_GAUDIO _IOR('x', 47, int) /* get audio channel */ +#define BT848_SBTSC _IOW('x', 48, int) /* set audio channel */ + /* * XXX: more bad magic, * we need to fix the METEORGINPUT to return something public diff --git a/sys/sys/ioctl_bt848.h b/sys/sys/ioctl_bt848.h index ad18dd46e6ce..be72008697de 100644 --- a/sys/sys/ioctl_bt848.h +++ b/sys/sys/ioctl_bt848.h @@ -3,14 +3,14 @@ */ /* - * tuner types for the + * frequency sets */ -#define TUNERTYPE_NABCST 1 -#define TUNERTYPE_CABLEIRC 2 -#define TUNERTYPE_CABLEHRC 3 -#define TUNERTYPE_WEUROPE 4 -#define TUNERTYPE_MIN TUNERTYPE_NABCST -#define TUNERTYPE_MAX TUNERTYPE_WEUROPE +#define CHNLSET_NABCST 1 +#define CHNLSET_CABLEIRC 2 +#define CHNLSET_CABLEHRC 3 +#define CHNLSET_WEUROPE 4 +#define CHNLSET_MIN CHNLSET_NABCST +#define CHNLSET_MAX CHNLSET_WEUROPE /* @@ -65,6 +65,19 @@ #define BT848_SATVSTEPS 512 +/* + * audio stuff + */ +#define AUDIO_TUNER 0x00 /* command for the audio routine */ +#define AUDIO_EXTERN 0x01 /* don't confuse them with bit */ +#define AUDIO_INTERN 0x02 /* settings */ +#define AUDIO_MUTE 0x80 +#define AUDIO_UNMUTE 0x81 + + +/* + * EEProm stuff + */ struct eeProm { u_char bytes[ 256 ]; }; @@ -83,24 +96,28 @@ struct eeProm { #define TVTUNER_GETFREQ _IOR('x', 36, unsigned int) /* get frequency */ -#define BT848_SHUE _IOW('x', 37, int) /* set hue */ -#define BT848_GHUE _IOR('x', 37, int) /* get hue */ +#define BT848_SHUE _IOW('x', 37, int) /* set hue */ +#define BT848_GHUE _IOR('x', 37, int) /* get hue */ #define BT848_SBRIG _IOW('x', 38, int) /* set brightness */ -#define BT848_GBRIG _IOR('x', 38, int) /* get brightness */ +#define BT848_GBRIG _IOR('x', 38, int) /* get brightness */ #define BT848_SCSAT _IOW('x', 39, int) /* set chroma sat */ -#define BT848_GCSAT _IOR('x', 39, int) /* get UV saturation */ -#define BT848_SCONT _IOW('x', 40, int) /* set contrast */ +#define BT848_GCSAT _IOR('x', 39, int) /* get UV saturation */ +#define BT848_SCONT _IOW('x', 40, int) /* set contrast */ #define BT848_GCONT _IOR('x', 40, int) /* get contrast */ #define BT848_SVSAT _IOW('x', 41, int) /* set chroma V sat */ -#define BT848_GVSAT _IOR('x', 41, int) /* get V saturation */ +#define BT848_GVSAT _IOR('x', 41, int) /* get V saturation */ #define BT848_SUSAT _IOW('x', 42, int) /* set chroma U sat */ -#define BT848_GUSAT _IOR('x', 42, int) /* get U saturation */ +#define BT848_GUSAT _IOR('x', 42, int) /* get U saturation */ #define BT848_SCBARS _IOR('x', 43, int) /* set colorbar */ #define BT848_CCBARS _IOR('x', 44, int) /* clear colorbar */ #define BT848_EEPROM _IOR('x', 45, struct eeProm) +#define BT848_SAUDIO _IOW('x', 46, int) /* set audio channel */ +#define BT848_GAUDIO _IOR('x', 47, int) /* get audio channel */ +#define BT848_SBTSC _IOW('x', 48, int) /* set audio channel */ + /* * XXX: more bad magic, * we need to fix the METEORGINPUT to return something public