50a26cbdf5217aca3b389c0599af0ddfc696c32a
[librecmc/librecmc.git] / target / linux / pxa / patches-2.6.21 / 026-pcm-gcc-411-bugfix.patch
1 Index: linux-2.6.21gum/include/sound/pcm_params.h
2 ===================================================================
3 --- linux-2.6.21gum.orig/include/sound/pcm_params.h
4 +++ linux-2.6.21gum/include/sound/pcm_params.h
5 @@ -179,16 +179,8 @@ static inline int snd_mask_single(const 
6         return 1;
7  }
8  
9 -static inline int snd_mask_refine(struct snd_mask *mask,
10 -                                 const struct snd_mask *v)
11 -{
12 -       struct snd_mask old;
13 -       snd_mask_copy(&old, mask);
14 -       snd_mask_intersect(mask, v);
15 -       if (snd_mask_empty(mask))
16 -               return -EINVAL;
17 -       return !snd_mask_eq(mask, &old);
18 -}
19 +void snd_mask_print( const struct snd_mask *m1, const struct snd_mask *m2 );
20 +int snd_mask_refine(struct snd_mask *mask, const struct snd_mask *v);
21  
22  static inline int snd_mask_refine_first(struct snd_mask *mask)
23  {
24 Index: linux-2.6.21gum/sound/core/pcm_lib.c
25 ===================================================================
26 --- linux-2.6.21gum.orig/sound/core/pcm_lib.c
27 +++ linux-2.6.21gum/sound/core/pcm_lib.c
28 @@ -2128,3 +2128,18 @@ snd_pcm_sframes_t snd_pcm_lib_readv(stru
29  }
30  
31  EXPORT_SYMBOL(snd_pcm_lib_readv);
32 +
33 +int snd_mask_refine(struct snd_mask *mask,
34 +                                 const struct snd_mask *v)
35 +{
36 +       struct snd_mask old;
37 +       snd_mask_copy(&old, mask);
38 +       snd_mask_print(mask, v);
39 +       snd_mask_intersect(mask, v);
40 +       snd_mask_print(mask, v);
41 +       if (snd_mask_empty(mask))
42 +               return -EINVAL;
43 +       return !snd_mask_eq(mask, &old);
44 +}
45 +
46 +EXPORT_SYMBOL(snd_mask_refine);
47 Index: linux-2.6.21gum/sound/core/pcm_native.c
48 ===================================================================
49 --- linux-2.6.21gum.orig/sound/core/pcm_native.c
50 +++ linux-2.6.21gum/sound/core/pcm_native.c
51 @@ -3450,3 +3450,9 @@ const struct file_operations snd_pcm_f_o
52                 .fasync =               snd_pcm_fasync,
53         }
54  };
55 +
56 +void snd_mask_print( const struct snd_mask *m1, const struct snd_mask *m2 )
57 +{
58 +//    printk( "0x%08x %08x v: 0x%08x %08x\n", m1->bits[1], m1->bits[0], m2->bits[1], m2->bits[0] );
59 +}
60 +