Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fa40b2237ab6ed239967f76432438080232b88fe
Commit:     fa40b2237ab6ed239967f76432438080232b88fe
Parent:     82e67246cd2a860637ee9d27776ad48d32734f6c
Author:     Trent Piepho <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 17 05:50:22 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 22:05:21 2007 -0300

    V4L/DVB (6034): cx88: Add parameter to control radio deemphasis time 
constant
    
    FM radio transmission use a preemphasis/deemphasis scheme to reduce
    high-frequency noise.  The cx88 audio decoder is supposedly set to no
    deemphasis by the current driver.
    
    However, the "no deemphasis" setting doesn't work.  On my chip, cx23883, it
    produces the same result as the 75 us time constant.  Maybe the default
    settings on the cx23881 are for 50 us?
    
    Since the deemphasis time constant varies by country, allow setting it via a
    module parameter.
    
    Signed-off-by: Trent Piepho <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/cx88/cx88-tvaudio.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-tvaudio.c 
b/drivers/media/video/cx88/cx88-tvaudio.c
index 99e1204..9aee8c5 100644
--- a/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/drivers/media/video/cx88/cx88-tvaudio.c
@@ -62,6 +62,10 @@ static unsigned int always_analog = 0;
 module_param(always_analog,int,0644);
 MODULE_PARM_DESC(always_analog,"force analog audio out");
 
+static unsigned int radio_deemphasis = 0;
+module_param(radio_deemphasis,int,0644);
+MODULE_PARM_DESC(radio_deemphasis, "Radio deemphasis time constant, "
+                "0=None, 1=50us (elsewhere), 2=75us (USA)");
 
 #define dprintk(fmt, arg...)   if (audio_debug) \
        printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg)
@@ -678,6 +682,10 @@ static void set_audio_standard_FM(struct cx88_core *core,
        };
 
        /* It is enough to leave default values? */
+       /* No, it's not!  The deemphasis registers are reset to the 75us
+        * values by default.  Analyzing the spectrum of the decoded audio
+        * reveals that "no deemphasis" is the same as 75 us, while the 50 us
+        * setting results in less deemphasis.  */
        static const struct rlist fm_no_deemph[] = {
 
                {AUD_POLYPH80SCALEFAC, 0x0003},
@@ -688,6 +696,7 @@ static void set_audio_standard_FM(struct cx88_core *core,
        set_audio_start(core, SEL_FMRADIO);
 
        switch (deemph) {
+       default:
        case FM_NO_DEEMPH:
                set_audio_registers(core, fm_no_deemph);
                break;
@@ -757,7 +766,7 @@ void cx88_set_tvaudio(struct cx88_core *core)
                set_audio_standard_EIAJ(core);
                break;
        case WW_FM:
-               set_audio_standard_FM(core, FM_NO_DEEMPH);
+               set_audio_standard_FM(core, radio_deemphasis);
                break;
        case WW_NONE:
        default:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to