• W
    aty128fb: fix blanking · 125e1137
    Witold Filipczyk 提交于
    I have a problem with blanking. The soundcard uses speakers of the monitor.
    Sound is muted when the screen blanks due to a bug in aty128fb.c.
    
    Here is a fragment of linux/fb.h
    /* VESA Blanking Levels */
    #define VESA_NO_BLANKING        0
    #define VESA_VSYNC_SUSPEND      1
    #define VESA_HSYNC_SUSPEND      2
    #define VESA_POWERDOWN          3
    
    enum {
            /* screen: unblanked, hsync: on,  vsync: on */
            FB_BLANK_UNBLANK       = VESA_NO_BLANKING,
    
            /* screen: blanked,   hsync: on,  vsync: on */
            FB_BLANK_NORMAL        = VESA_NO_BLANKING + 1,
    
            /* screen: blanked,   hsync: on,  vsync: off */
            FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1,
    
            /* screen: blanked,   hsync: off, vsync: on */
            FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1,
    
            /* screen: blanked,   hsync: off, vsync: off */
            FB_BLANK_POWERDOWN     = VESA_POWERDOWN + 1
    };
    
    So FB_BLANK_NORMAL is 1, FB_BLANK_VSYNC_SUSPEND is 2,
    FB_BLANK_HSYNC_SUSPEND is 3, FB_BLANK_POWERDOWN is 4.
    And now:
    blank = FB_BLANK_NORMAL (1)
    blank & FB_BLANK_HSYNC_SUSPEND (1 & 3) is true,
    so normal blank caused hsync suspend and sound is muted.
    
    Cc: James Simmons <jsimmons@infradead.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    125e1137
aty128fb.c 65.4 KB