[PATCH] Add include/linux/freezer.h and move definitions from sched.h
[pandora-kernel.git] / drivers / media / video / msp3400-driver.c
index dbb75a7..e1b56dc 100644 (file)
@@ -56,7 +56,7 @@
 #include <media/tvaudio.h>
 #include <media/msp3400.h>
 #include <linux/kthread.h>
-#include <linux/suspend.h>
+#include <linux/freezer.h>
 #include "msp3400-driver.h"
 
 /* ---------------------------------------------------------------------- */
@@ -362,7 +362,7 @@ int msp_sleep(struct msp_state *state, int timeout)
 }
 
 /* ------------------------------------------------------------------------ */
-
+#ifdef CONFIG_VIDEO_V4L1
 static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode)
 {
        if (rxsubchans == V4L2_TUNER_SUB_MONO)
@@ -384,6 +384,7 @@ static int msp_mode_v4l1_to_v4l2(int mode)
                return V4L2_TUNER_MODE_LANG1;
        return V4L2_TUNER_MODE_MONO;
 }
+#endif
 
 static int msp_get_ctrl(struct i2c_client *client, struct v4l2_control *ctrl)
 {
@@ -509,6 +510,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
        /* --- v4l ioctls --- */
        /* take care: bttv does userspace copying, we'll get a
           kernel pointer here... */
+#ifdef CONFIG_VIDEO_V4L1
        case VIDIOCGAUDIO:
        {
                struct video_audio *va = arg;
@@ -577,6 +579,12 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
        }
 
        case VIDIOCSFREQ:
+       {
+               /* new channel -- kick audio carrier scan */
+               msp_wake_thread(client);
+               break;
+       }
+#endif
        case VIDIOC_S_FREQUENCY:
        {
                /* new channel -- kick audio carrier scan */
@@ -896,6 +904,8 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
        state->has_virtual_dolby_surround = msp_revision == 'G' && msp_prod_lo == 1;
        /* Has Virtual Dolby Surround & Dolby Pro Logic: only in msp34x2 */
        state->has_dolby_pro_logic = msp_revision == 'G' && msp_prod_lo == 2;
+       /* The msp343xG supports BTSC only and cannot do Automatic Standard Detection. */
+       state->force_btsc = msp_family == 3 && msp_revision == 'G' && msp_prod_hi == 3;
 
        state->opmode = opmode;
        if (state->opmode == OPMODE_AUTO) {