~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to sound/core/oss/linear.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
                               struct snd_pcm_plugin_channel *dst_channels,
91
91
                               snd_pcm_uframes_t frames)
92
92
{
93
 
        struct linear_priv *data;
94
 
 
95
93
        if (snd_BUG_ON(!plugin || !src_channels || !dst_channels))
96
94
                return -ENXIO;
97
 
        data = (struct linear_priv *)plugin->extra_data;
98
95
        if (frames == 0)
99
96
                return 0;
100
97
#ifdef CONFIG_SND_DEBUG
114
111
        return frames;
115
112
}
116
113
 
117
 
static void init_data(struct linear_priv *data, int src_format, int dst_format)
 
114
static void init_data(struct linear_priv *data,
 
115
                      snd_pcm_format_t src_format, snd_pcm_format_t dst_format)
118
116
{
119
117
        int src_le, dst_le, src_bytes, dst_bytes;
120
118
 
140
138
        if (snd_pcm_format_signed(src_format) !=
141
139
            snd_pcm_format_signed(dst_format)) {
142
140
                if (dst_le)
143
 
                        data->flip = cpu_to_le32(0x80000000);
 
141
                        data->flip = (__force u32)cpu_to_le32(0x80000000);
144
142
                else
145
 
                        data->flip = cpu_to_be32(0x80000000);
 
143
                        data->flip = (__force u32)cpu_to_be32(0x80000000);
146
144
        }
147
145
}
148
146