lkml.org 
[lkml]   [1998]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: v2.1.125: Sound problems with GUS PnP

    Here is a patch (also on ftp://linuxwww.db.erau.edu/pub/linux/andrew/gus.diff)
    against the ultra-2.99a-devel4 driver that will allow it to work with
    newer kernels. It should be wrapped with checks for the kernel version
    so that it will still compile on older kernels, but I leave that as an
    exercise for the reader.

    diff -ur ultra-2.99a-devel4/src/driver/module/driver.h ultra-2.99a-devel5/src/driver/module/driver.h
    --- ultra-2.99a-devel4/src/driver/module/driver.h Sun Jan 4 05:23:40 1998
    +++ ultra-2.99a-devel5/src/driver/module/driver.h Sat Mar 28 15:27:27 1998
    @@ -148,8 +148,8 @@
    card -> end_jiffies_##ident = current -> timeout = jiffies + (time); \
    sleep_on( &(card) -> sleeper_##ident );
    #ifdef GUS_POLL
    -#define SLEEP_POLL( card, ident, table ) \
    - poll_wait( &(card) -> sleeper_##ident, table )
    +#define SLEEP_POLL( file, card, ident, table ) \
    + poll_wait( file, &(card) -> sleeper_##ident, table )
    #else
    #define SLEEPS( card, ident, table ) \
    select_wait( &(card) -> sleeper_##ident, table );
    diff -ur ultra-2.99a-devel4/src/driver/module/gf1_daemon.c ultra-2.99a-devel5/src/driver/module/gf1_daemon.c
    --- ultra-2.99a-devel4/src/driver/module/gf1_daemon.c Tue Dec 30 08:28:42 1997
    +++ ultra-2.99a-devel5/src/driver/module/gf1_daemon.c Sat Mar 28 15:29:17 1998
    @@ -361,7 +361,7 @@

    CLI( &flags );
    GETLOCK( card, daemon ) |= WK_SLEEP;
    - SLEEP_POLL( card, daemon, wait );
    + SLEEP_POLL( file, card, daemon, wait );
    STI( &flags );

    mask = 0;
    diff -ur ultra-2.99a-devel4/src/driver/module/gf1_synth.c ultra-2.99a-devel5/src/driver/module/gf1_synth.c
    --- ultra-2.99a-devel4/src/driver/module/gf1_synth.c Tue Dec 30 08:29:18 1997
    +++ ultra-2.99a-devel5/src/driver/module/gf1_synth.c Sat Mar 28 15:28:18 1998
    @@ -624,9 +624,9 @@

    CLI( &flags );
    GETLOCK( card, rqueue ) |= WK_SLEEP;
    - SLEEP_POLL( card, rqueue, wait );
    + SLEEP_POLL( file, card, rqueue, wait );
    GETLOCK( card, wqueue ) |= WK_SLEEP;
    - SLEEP_POLL( card, wqueue, wait );
    + SLEEP_POLL( file, card, wqueue, wait );
    STI( &flags );

    mask = 0;
    diff -ur ultra-2.99a-devel4/src/driver/module/init.c ultra-2.99a-devel5/src/driver/module/init.c
    --- ultra-2.99a-devel4/src/driver/module/init.c Sat Jan 3 14:06:33 1998
    +++ ultra-2.99a-devel5/src/driver/module/init.c Sat Mar 28 13:58:01 1998
    @@ -113,7 +113,7 @@
    int l, idx, local;
    unsigned char d;

    -#if 0
    +#ifdef GUSCFG_DEBUG_DETECT
    PRINTK( "gus_mdetect: 0x%x\n", card -> gf1.port );
    #endif
    if ( card -> detection )
    @@ -204,7 +204,7 @@
    #else
    card -> gf1.memory = 256 * 1024;
    #endif
    -#if 0
    +#ifdef GUSCFG_DEBUG_MEMORY
    printk( "memory = 0x%x (%i)\n", card -> gf1.memory, card -> gf1.memory );
    #endif
    for ( l = 0, local = card -> gf1.memory; l < GUS_MEMORY_BANKS; l++, local -= 256 * 1024 )
    @@ -244,7 +244,7 @@
    {
    gus_poke( card, local, d );
    gus_poke( card, local + 1, d + 1 );
    -#if 0
    +#ifdef GUSCFG_DEBUG_MEMORY
    printk( "d = 0x%x, local = 0x%x, local + 1 = 0x%x, idx << 22 = 0x%x\n",
    d,
    gus_peek( card, local ),
    @@ -257,7 +257,7 @@
    sizes[ idx ]++;
    }
    }
    -#if 0
    +#ifdef GUSCFG_DEBUG_MEMORY
    printk( "sizes: %i %i %i %i\n", sizes[ 0 ], sizes[ 1 ], sizes[ 2 ], sizes[ 3 ] );
    #endif
    }
    @@ -312,13 +312,13 @@
    card -> pnp_pro_flag = 1;
    lmct = ( psizes[ 3 ] << 24 ) | ( psizes[ 2 ] << 16 ) |
    ( psizes[ 1 ] << 8 ) | psizes[ 0 ];
    -#if 0
    +#if 1
    printk( "lmct = 0x%08x\n", lmct );
    #endif
    for ( i = 0; i < sizeof( lmc ) / sizeof( unsigned int ); i++ )
    if ( lmct == lmc[ i ] )
    {
    -#if 0
    +#if 1
    printk( "found !!! %i\n", i );
    #endif
    gus_write16( card, 0x52, ( gus_look16( card, 0x52 ) & 0xfff0 ) | i );
    diff -ur ultra-2.99a-devel4/src/driver/module/midi.c ultra-2.99a-devel5/src/driver/module/midi.c
    --- ultra-2.99a-devel4/src/driver/module/midi.c Tue Feb 17 09:37:20 1998
    +++ ultra-2.99a-devel5/src/driver/module/midi..c Sat Mar 28 15:46:04 1998
    @@ -1269,9 +1269,9 @@

    CLI( &flags );
    GETLOCK( midi_master_card, midi_in ) |= WK_SLEEP;
    - SLEEP_POLL( midi_master_card, midi_in, wait );
    + SLEEP_POLL( file, midi_master_card, midi_in, wait );
    GETLOCK( midi_master_card, midi_out ) |= WK_SLEEP;
    - SLEEP_POLL( midi_master_card, midi_out, wait );
    + SLEEP_POLL( file, midi_master_card, midi_out, wait );
    STI( &flags );

    mask = 0;
    diff -ur ultra-2.99a-devel4/src/driver/module/midi_raw.c ultra-2.99a-devel5/src/driver/module/midi_raw.c
    --- ultra-2.99a-devel4/src/driver/module/midi_raw.c Tue Dec 30 06:13:39 1997
    +++ ultra-2.99a-devel5/src/driver/module/midi_raw.c Sat Mar 28 15:46:42 1998
    @@ -222,11 +222,11 @@
    CLI( &flags );
    if ( xflags & GUS_MIDIF_USED_IN ) {
    GETLOCK( card, midi_raw_in ) |= WK_SLEEP;
    - SLEEP_POLL( card, midi_raw_in, wait );
    + SLEEP_POLL( file, card, midi_raw_in, wait );
    }
    if ( xflags & GUS_MIDIF_USED_OUT ) {
    GETLOCK( card, midi_raw_out ) |= WK_SLEEP;
    - SLEEP_POLL( card, midi_raw_out, wait );
    + SLEEP_POLL( file, card, midi_raw_out, wait );
    }
    STI( &flags );

    diff -ur ultra-2.99a-devel4/src/driver/module/pcm.c ultra-2.99a-devel5/src/driver/module/pcm.c
    --- ultra-2.99a-devel4/src/driver/module/pcm.c Mon Feb 9 08:48:00 1998
    +++ ultra-2.99a-devel5/src/driver/module/pcm.c Sat Mar 28 15:56:00 1998
    @@ -1180,9 +1180,9 @@
    playback = &pcm -> chn[ PCM_PLAYBACK ];
    CLI( &flags );
    record -> flags |= PCM_FLG_SLEEP;
    - SLEEP_POLL( pcm, record, wait );
    + SLEEP_POLL( file, pcm, record, wait );
    playback -> flags |= PCM_FLG_SLEEP;
    - SLEEP_POLL( pcm, playback, wait );
    + SLEEP_POLL( file, pcm, playback, wait );
    STI( &flags );

    mask = 0;
    @@ -1305,7 +1305,8 @@
    atomic_inc( &inode -> i_count );
    #endif
    #else
    - vma -> vm_dentry = dget( file -> f_dentry );
    + vma -> vm_file -> f_dentry = dget( file -> f_dentry );
    + /* vma -> vm_dentry = dget( file -> f_dentry ); */
    #endif
    pchn -> _dma -> mmaped = 1;
    pchn -> flags |= PCM_FLG_MMAP;
    diff -ur ultra-2.99a-devel4/src/driver/module/sequencer.c ultra-2.99a-devel5/src/driver/module/sequencer.c
    --- ultra-2.99a-devel4/src/driver/module/sequencer.c Sun Jan 4 17:29:12 1998
    +++ ultra-2.99a-devel5/src/driver/module/sequencer.c Sat Mar 28 15:47:21 1998
    @@ -1800,9 +1800,9 @@

    CLI( &flags );
    GETLOCK( gus_cards[ 0 ], seq_in ) |= WK_SLEEP;
    - SLEEP_POLL( gus_cards[ 0 ], seq_in, wait );
    + SLEEP_POLL( file, gus_cards[ 0 ], seq_in, wait );
    GETLOCK( gus_cards[ 0 ], seq_out ) |= WK_SLEEP;
    - SLEEP_POLL( gus_cards[ 0 ], seq_out, wait );
    + SLEEP_POLL( file, gus_cards[ 0 ], seq_out, wait );
    STI( &flags );

    mask = 0;
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Andrew Anderson http://amelia.db.erau.edu/~andrew/
    if(!(family_tree=fork())){redneck=TRUE;}

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:45    [W:0.028 / U:0.084 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site