[media] radio-rtrack2: fix mute bug
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 25 Feb 2013 11:00:15 +0000 (08:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Mar 2013 18:20:07 +0000 (15:20 -0300)
Setting the frequency would unmute the card. Fixed the mute handling in the
s_frequency code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/radio/radio-rtrack2.c

index b1f844c64fdeddad89a8c58e47b63d3d91936a4c..09cfbc373c92919e3259f5a5e5a1afe2a332578b 100644 (file)
@@ -8,6 +8,8 @@
  *
  * Converted to the radio-isa framework by Hans Verkuil <hans.verkuil@cisco.com>
  * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>
+ *
+ * Fully tested with actual hardware and the v4l2-compliance tool.
  */
 
 #include <linux/module.h>      /* Modules                      */
@@ -81,8 +83,7 @@ static int rtrack2_s_frequency(struct radio_isa_card *isa, u32 freq)
                        zero(isa);
 
        outb_p(0xc8, isa->io);
-       if (!v4l2_ctrl_g_ctrl(isa->mute))
-               outb_p(0, isa->io);
+       outb_p(v4l2_ctrl_g_ctrl(isa->mute), isa->io);
        return 0;
 }