Changeset 479 for GPL/trunk/alsa-kernel


Ignore:
Timestamp:
May 1, 2010, 9:49:10 PM (15 years ago)
Author:
David Azarewicz
Message:

Cleanup compiler warnings

Location:
GPL/trunk/alsa-kernel
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/core/control.c

    r464 r479  
    2929#include <sound/info.h>
    3030#include <sound/control.h>
     31#include <proto.h>
    3132
    3233/* max number of user-defined controls */
     
    182183 * @access: the default control access
    183184 *
    184  * Allocates a new struct snd_kcontrol instance and copies the given template 
     185 * Allocates a new struct snd_kcontrol instance and copies the given template
    185186 * to the new instance. It does not copy volatile data (access).
    186187 *
     
    213214 * @private_data: the private data to set
    214215 *
    215  * Allocates a new struct snd_kcontrol instance and initialize from the given 
     216 * Allocates a new struct snd_kcontrol instance and initialize from the given
    216217 * template.  When the access field of ncontrol is 0, it's assumed as
    217218 * READWRITE access. When the count field is 0, it's assumes as one.
     
    371372 * You don't need to call snd_ctl_free_one(). You must be in
    372373 * the write lock - down_write(&card->controls_rwsem).
    373  * 
     374 *
    374375 * Returns 0 if successful, or a negative error code on failure.
    375376 */
     
    399400 * Finds the control instance with the given id, removes it from the
    400401 * card list and releases it.
    401  * 
     402 *
    402403 * Returns 0 if successful, or a negative error code on failure.
    403404 */
     
    427428 * Finds the control instance with the given id, removes it from the
    428429 * card list and releases it.
    429  * 
     430 *
    430431 * Returns 0 if successful, or a negative error code on failure.
    431432 */
     
    11311132                        goto __kctl_end;
    11321133                }
    1133                 err = kctl->tlv.c(kctl, op_flag, tlv.length, _tlv->tlv); 
     1134                err = kctl->tlv.c(kctl, op_flag, tlv.length, _tlv->tlv);
    11341135                if (err > 0) {
    11351136                        up_read(&card->controls_rwsem);
  • GPL/trunk/alsa-kernel/core/info.c

    r464 r479  
    640640int snd_info_card_register(struct snd_card *card)
    641641{
     642#ifndef TARGET_OS2
    642643        struct proc_dir_entry *p;
     644#endif
    643645
    644646        if (snd_BUG_ON(!card))
     
    651653        if (p == NULL)
    652654                return -ENOMEM;
    653 #endif
    654655        card->proc_root_link = p;
     656#endif
    655657        return 0;
    656658}
  • GPL/trunk/alsa-kernel/core/init.c

    r464 r479  
    296296        panic("%s(%p, %p) failed!", __func__, inode, file);
    297297#endif
     298        return -ENODEV;
    298299}
    299300
     
    400401
    401402                mfile->file->f_op = &snd_shutdown_f_ops;
    402                 fops_get(mfile->file->f_op);
     403                //fops_get(mfile->file->f_op); //DAZ meaningless use of expression
    403404        }
    404405        spin_unlock(&card->files_lock);
     
    832833 *  Returns zero otherwise a negative error code.
    833834 */
    834  
     835
    835836int snd_component_add(struct snd_card *card, const char *component)
    836837{
  • GPL/trunk/alsa-kernel/core/oss/pcm_oss.c

    r464 r479  
    263263 * @dir: pointer to the direction (-1,0,1) or NULL
    264264 *
    265  * Inside configuration space defined by PARAMS remove from PAR all 
     265 * Inside configuration space defined by PARAMS remove from PAR all
    266266 * values < VAL. Reduce configuration space accordingly.
    267267 * Return new minimum or -EINVAL if the configuration space is empty
     
    324324 * @dir: pointer to the direction (-1,0,1) or NULL
    325325 *
    326  * Inside configuration space defined by PARAMS remove from PAR all 
     326 * Inside configuration space defined by PARAMS remove from PAR all
    327327 *  values >= VAL + 1. Reduce configuration space accordingly.
    328328 *  Return new maximum or -EINVAL if the configuration space is empty
     
    532532 * @dir: pointer to the direction (-1,0,1) or NULL
    533533 *
    534  * Inside configuration space defined by PARAMS remove from PAR all 
     534 * Inside configuration space defined by PARAMS remove from PAR all
    535535 * values != VAL. Reduce configuration space accordingly.
    536536 *  Return VAL or -EINVAL if the configuration space is empty
     
    705705}
    706706
    707 static int snd_pcm_oss_period_size(struct snd_pcm_substream *substream, 
     707static int snd_pcm_oss_period_size(struct snd_pcm_substream *substream,
    708708                                   struct snd_pcm_hw_params *oss_params,
    709709                                   struct snd_pcm_hw_params *slave_params)
     
    937937                snd_pcm_oss_plugin_clear(substream);
    938938                if ((err = snd_pcm_plug_format_plugins(substream,
    939                                                        params, 
     939                                                       params,
    940940                                                       sparams)) < 0) {
    941941                        snd_printd("snd_pcm_plug_format_plugins failed: %i\n", err);
     
    13821382                        if (substream->oss.setup.partialfrag ||
    13831383                            runtime->oss.buffer_used == runtime->oss.period_bytes) {
    1384                                 tmp = snd_pcm_oss_write2(substream, runtime->oss.buffer + runtime->oss.period_ptr, 
     1384                                tmp = snd_pcm_oss_write2(substream, runtime->oss.buffer + runtime->oss.period_ptr,
    13851385                                                         runtime->oss.buffer_used - runtime->oss.period_ptr, 1);
    13861386                                if (tmp <= 0)
     
    17941794        _snd_pcm_hw_params_any(params);
    17951795        err = snd_pcm_hw_refine(substream, params);
    1796         format_mask = *hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 
     1796        format_mask = *hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
    17971797        kfree(params);
    17981798        if (err < 0)
     
    27532753}
    27542754
     2755#ifndef TARGET_OS2
    27552756static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
    27562757{
     
    28192820        return 0;
    28202821}
     2822#endif
    28212823
    28222824#ifdef CONFIG_SND_VERBOSE_PROCFS
     
    30213023                int duplex;
    30223024                register_oss_dsp(pcm, 0);
    3023                 duplex = (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count > 0 && 
    3024                               pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count && 
     3025                duplex = (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count > 0 &&
     3026                              pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count &&
    30253027                              !(pcm->info_flags & SNDRV_PCM_INFO_HALF_DUPLEX));
    30263028                sprintf(name, "%s%s", pcm->name, duplex ? " (DUPLEX)" : "");
  • GPL/trunk/alsa-kernel/core/pcm.c

    r470 r479  
    926926}
    927927
     928#ifndef TARGET_OS2
    928929static ssize_t show_pcm_class(struct device *dev,
    929930                              struct device_attribute *attr, char *buf)
     
    949950        return snprintf(buf, PAGE_SIZE, "%s\n", str);
    950951}
     952#endif
    951953
    952954#ifndef TARGET_OS2
  • GPL/trunk/alsa-kernel/core/pcm_compat.c

    r426 r479  
    2222
    2323#include <linux/compat.h>
     24#include <proto.h>
    2425
    2526static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream,
     
    223224/* both for HW_PARAMS and HW_REFINE */
    224225static int snd_pcm_ioctl_hw_params_compat(struct snd_pcm_substream *substream,
    225                                           int refine, 
     226                                          int refine,
    226227                                          struct snd_pcm_hw_params32 __user *data32)
    227228{
  • GPL/trunk/alsa-kernel/core/pcm_lib.c

    r470 r479  
    3030#include <sound/pcm_params.h>
    3131#include <sound/timer.h>
    32 
    33 /*
    34  * Uniaud API support
    35  */
    36 int uniaud_set_interrupted_substream(struct snd_pcm_substream *substream);
     32#include <proto.h>
    3733
    3834/*
     
    160156                snd_pcm_gettime(runtime, (struct timespec *)&runtime->status->tstamp);
    161157        snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
     158#ifdef CONFIG_SND_PCM_XRUN_DEBUG
    162159        if (xrun_debug(substream, 1)) {
    163160                char name[16];
     
    166163                dump_stack_on_xrun(substream);
    167164        }
     165#endif
    168166}
    169167
     
    230228        } while (0)
    231229#else
    232 #define hw_ptr_error
     230#define hw_ptr_error(substream, fmt, ...) ;
    233231#endif
    234232static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
     
    246244                return -EPIPE;
    247245        }
     246#ifdef CONFIG_SND_PCM_XRUN_DEBUG
    248247        if (xrun_debug(substream, 8)) {
    249248                char name[16];
     
    258257                           (unsigned long)runtime->hw_ptr_interrupt);
    259258        }
     259#endif
    260260        hw_base = runtime->hw_ptr_base;
    261261        new_hw_ptr = hw_base + pos;
     
    272272                        delta += runtime->buffer_size;
    273273                if (delta < 0) {
    274                         hw_ptr_error(substream, 
     274                        hw_ptr_error(substream,
    275275                                     "Unexpected hw_pointer value "
    276276                                     "(stream=%i, pos=%ld, intr_ptr=%ld)\n",
     
    299299
    300300        /* Do jiffies check only in xrun_debug mode */
     301#ifdef CONFIG_SND_PCM_XRUN_DEBUG
    301302        if (!xrun_debug(substream, 4))
    302303                goto no_jiffies_check;
    303 
     304#endif
    304305        /* Skip the jiffies check for hardwares with BATCH flag.
    305306         * Such hardware usually just increases the position at each IRQ,
     
    378379                return -EPIPE;
    379380        }
     381#ifdef CONFIG_SND_PCM_XRUN_DEBUG
    380382        if (xrun_debug(substream, 16)) {
    381383                char name[16];
     
    390392                           (unsigned long)runtime->hw_ptr_interrupt);
    391393        }
     394#endif
    392395
    393396        hw_base = runtime->hw_ptr_base;
     
    399402                delta += runtime->buffer_size;
    400403                if (delta < 0) {
    401                         hw_ptr_error(substream, 
     404                        hw_ptr_error(substream,
    402405                                     "Unexpected hw_pointer value [2] "
    403                                     "(stream=%i, pos=%ld, old_ptr=%ld, jdelta=%li)\n",
     406                                        "(stream=%i, pos=%ld, old_ptr=%ld, jdelta=%li)\n",
    404407                                     substream->stream, (long)pos,
    405408                                     (long)old_hw_ptr, jdelta);
     
    412415        }
    413416        /* Do jiffies check only in xrun_debug mode */
     417#ifdef CONFIG_SND_PCM_XRUN_DEBUG
    414418        if (!xrun_debug(substream, 4))
    415419                goto no_jiffies_check;
     420#endif
    416421        if (delta < runtime->delay)
    417422                goto no_jiffies_check;
     
    484489 */
    485490
    486 static inline unsigned int div32(unsigned int a, unsigned int b, 
     491static inline unsigned int div32(unsigned int a, unsigned int b,
    487492                                 unsigned int *r)
    488493{
     
    743748 * snd_interval_ratnum - refine the interval value
    744749 * @i: interval to refine
    745  * @rats_count: number of ratnum_t 
     750 * @rats_count: number of ratnum_t
    746751 * @rats: ratnum_t array
    747752 * @nump: pointer to store the resultant numerator
     
    10531058        va_end(args);
    10541059        return 0;
    1055 }                                  
     1060}                               
    10561061
    10571062EXPORT_SYMBOL(snd_pcm_hw_rule_add);
     
    11191124 * @min: the minimal value
    11201125 * @max: the maximal value
    1121  * 
     1126 *
    11221127 * Apply the min/max range constraint to an interval parameter.
    11231128 */
     
    11501155 * @var: hw_params variable to apply the list constraint
    11511156 * @l: list
    1152  * 
     1157 *
    11531158 * Apply the list of constraints to an interval parameter.
    11541159 */
     
    11871192 * @r: struct snd_ratnums constriants
    11881193 */
    1189 int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 
     1194int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
    11901195                                  unsigned int cond,
    11911196                                  snd_pcm_hw_param_t var,
     
    12201225 * @r: struct snd_ratdens constriants
    12211226 */
    1222 int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, 
     1227int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime,
    12231228                                  unsigned int cond,
    12241229                                  snd_pcm_hw_param_t var,
     
    12511256 * @msbits: msbits width
    12521257 */
    1253 int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime, 
     1258int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime,
    12541259                                 unsigned int cond,
    12551260                                 unsigned int width,
     
    12841289                               unsigned long step)
    12851290{
    1286         return snd_pcm_hw_rule_add(runtime, cond, var, 
     1291        return snd_pcm_hw_rule_add(runtime, cond, var,
    12871292                                   snd_pcm_hw_rule_step, (void *) step,
    12881293                                   var, -1);
     
    13131318                               snd_pcm_hw_param_t var)
    13141319{
    1315         return snd_pcm_hw_rule_add(runtime, cond, var, 
     1320        return snd_pcm_hw_rule_add(runtime, cond, var,
    13161321                                   snd_pcm_hw_rule_pow2, NULL,
    13171322                                   var, -1);
     
    14311436 * Return the minimum.
    14321437 */
    1433 int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, 
    1434                            struct snd_pcm_hw_params *params, 
     1438int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm,
     1439                           struct snd_pcm_hw_params *params,
    14351440                           snd_pcm_hw_param_t var, int *dir)
    14361441{
     
    14771482 * Return the maximum.
    14781483 */
    1479 int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, 
     1484int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm,
    14801485                          struct snd_pcm_hw_params *params,
    14811486                          snd_pcm_hw_param_t var, int *dir)
     
    17091714                        if (is_playback)
    17101715                                err = -EPIPE;
    1711                         else 
     1716                        else
    17121717                                avail = 0; /* indicate draining */
    17131718                        goto _endloop;
     
    17551760        return 0;
    17561761}
    1757  
     1762
    17581763typedef int (*transfer_f)(struct snd_pcm_substream *substream, unsigned int hwoff,
    17591764                          unsigned long data, unsigned int off,
    17601765                          snd_pcm_uframes_t size);
    17611766
    1762 static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream, 
     1767static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream,
    17631768                                            unsigned long data,
    17641769                                            snd_pcm_uframes_t size,
     
    19281933        return 0;
    19291934}
    1930  
     1935
    19311936snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream,
    19321937                                     void __user **bufs,
     
    19511956EXPORT_SYMBOL(snd_pcm_lib_writev);
    19521957
    1953 static int snd_pcm_lib_read_transfer(struct snd_pcm_substream *substream, 
     1958static int snd_pcm_lib_read_transfer(struct snd_pcm_substream *substream,
    19541959                                     unsigned int hwoff,
    19551960                                     unsigned long data, unsigned int off,
     
    21252130        return 0;
    21262131}
    2127  
     2132
    21282133snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream,
    21292134                                    void __user **bufs,
  • GPL/trunk/alsa-kernel/core/pcm_native.c

    r464 r479  
    3838#include <sound/minors.h>
    3939#include <asm/io.h>
     40#include <proto.h>
    4041
    4142/*
     
    165166#endif
    166167
    167 int snd_pcm_hw_refine(struct snd_pcm_substream *substream, 
     168int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
    168169                      struct snd_pcm_hw_params *params)
    169170{
     
    222223                        printk("empty");
    223224                else
    224                         printk("%c%u %u%c", 
     225                        printk("%c%u %u%c",
    225226                               i->openmin ? '(' : '[', i->min,
    226227                               i->max, i->openmax ? ')' : ']');
     
    231232                if (i->empty)
    232233                        printk("empty\n");
    233                 else 
    234                         printk("%c%u %u%c\n", 
     234                else
     235                        printk("%c%u %u%c\n",
    235236                               i->openmin ? '(' : '[', i->min,
    236237                               i->max, i->openmax ? ')' : ']');
     
    244245        for (k = 0; k < constrs->rules_num; k++)
    245246                rstamps[k] = 0;
    246         for (k = 0; k <= SNDRV_PCM_HW_PARAM_LAST_INTERVAL; k++) 
     247        for (k = 0; k <= SNDRV_PCM_HW_PARAM_LAST_INTERVAL; k++)
    247248                vstamps[k] = (params->rmask & (1 << k)) ? 1 : 0;
    248249        do {
     
    274275                                                printk("empty");
    275276                                        else
    276                                                 printk("%c%u %u%c", 
     277                                                printk("%c%u %u%c",
    277278                                                       i->openmin ? '(' : '[', i->min,
    278279                                                       i->max, i->openmax ? ')' : ']');
     
    290291                                                printk("empty");
    291292                                        else
    292                                                 printk("%c%u %u%c", 
     293                                                printk("%c%u %u%c",
    293294                                                       i->openmin ? '(' : '[', i->min,
    294295                                                       i->max, i->openmax ? ')' : ']');
     
    18331834        if (err < 0)
    18341835                return err;
    1835         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, 
     1836        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
    18361837                                  snd_pcm_hw_rule_sample_bits, NULL,
    1837                                   SNDRV_PCM_HW_PARAM_FORMAT, 
     1838                                  SNDRV_PCM_HW_PARAM_FORMAT,
    18381839                                  SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1);
    18391840        if (err < 0)
    18401841                return err;
    1841         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, 
     1842        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
    18421843                                  snd_pcm_hw_rule_div, NULL,
    18431844                                  SNDRV_PCM_HW_PARAM_FRAME_BITS, SNDRV_PCM_HW_PARAM_CHANNELS, -1);
    18441845        if (err < 0)
    18451846                return err;
    1846         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS, 
     1847        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
    18471848                                  snd_pcm_hw_rule_mul, NULL,
    18481849                                  SNDRV_PCM_HW_PARAM_SAMPLE_BITS, SNDRV_PCM_HW_PARAM_CHANNELS, -1);
    18491850        if (err < 0)
    18501851                return err;
    1851         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS, 
     1852        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
    18521853                                  snd_pcm_hw_rule_mulkdiv, (void*) 8,
    18531854                                  SNDRV_PCM_HW_PARAM_PERIOD_BYTES, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1);
    18541855        if (err < 0)
    18551856                return err;
    1856         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS, 
     1857        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS,
    18571858                                  snd_pcm_hw_rule_mulkdiv, (void*) 8,
    18581859                                  SNDRV_PCM_HW_PARAM_BUFFER_BYTES, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, -1);
    18591860        if (err < 0)
    18601861                return err;
    1861         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 
     1862        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
    18621863                                  snd_pcm_hw_rule_div, NULL,
    18631864                                  SNDRV_PCM_HW_PARAM_FRAME_BITS, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1);
    18641865        if (err < 0)
    18651866                return err;
    1866         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 
     1867        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
    18671868                                  snd_pcm_hw_rule_mulkdiv, (void*) 1000000,
    18681869                                  SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_PERIOD_TIME, -1);
    18691870        if (err < 0)
    18701871                return err;
    1871         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 
     1872        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
    18721873                                  snd_pcm_hw_rule_mulkdiv, (void*) 1000000,
    18731874                                  SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_BUFFER_TIME, -1);
    18741875        if (err < 0)
    18751876                return err;
    1876         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS, 
     1877        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS,
    18771878                                  snd_pcm_hw_rule_div, NULL,
    18781879                                  SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1);
    18791880        if (err < 0)
    18801881                return err;
    1881         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 
     1882        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
    18821883                                  snd_pcm_hw_rule_div, NULL,
    18831884                                  SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_PERIODS, -1);
    18841885        if (err < 0)
    18851886                return err;
    1886         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 
     1887        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
    18871888                                  snd_pcm_hw_rule_mulkdiv, (void*) 8,
    18881889                                  SNDRV_PCM_HW_PARAM_PERIOD_BYTES, SNDRV_PCM_HW_PARAM_FRAME_BITS, -1);
    18891890        if (err < 0)
    18901891                return err;
    1891         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 
     1892        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
    18921893                                  snd_pcm_hw_rule_muldivk, (void*) 1000000,
    18931894                                  SNDRV_PCM_HW_PARAM_PERIOD_TIME, SNDRV_PCM_HW_PARAM_RATE, -1);
    18941895        if (err < 0)
    18951896                return err;
    1896         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 
     1897        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
    18971898                                  snd_pcm_hw_rule_mul, NULL,
    18981899                                  SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_PERIODS, -1);
    18991900        if (err < 0)
    19001901                return err;
    1901         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 
     1902        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
    19021903                                  snd_pcm_hw_rule_mulkdiv, (void*) 8,
    19031904                                  SNDRV_PCM_HW_PARAM_BUFFER_BYTES, SNDRV_PCM_HW_PARAM_FRAME_BITS, -1);
    19041905        if (err < 0)
    19051906                return err;
    1906         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 
     1907        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
    19071908                                  snd_pcm_hw_rule_muldivk, (void*) 1000000,
    19081909                                  SNDRV_PCM_HW_PARAM_BUFFER_TIME, SNDRV_PCM_HW_PARAM_RATE, -1);
    19091910        if (err < 0)
    19101911                return err;
    1911         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 
     1912        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
    19121913                                  snd_pcm_hw_rule_muldivk, (void*) 8,
    19131914                                  SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_FRAME_BITS, -1);
    19141915        if (err < 0)
    19151916                return err;
    1916         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 
     1917        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
    19171918                                  snd_pcm_hw_rule_muldivk, (void*) 8,
    19181919                                  SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_FRAME_BITS, -1);
    19191920        if (err < 0)
    19201921                return err;
    1921         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_TIME, 
     1922        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_TIME,
    19221923                                  snd_pcm_hw_rule_mulkdiv, (void*) 1000000,
    19231924                                  SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_RATE, -1);
    19241925        if (err < 0)
    19251926                return err;
    1926         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_TIME, 
     1927        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_TIME,
    19271928                                  snd_pcm_hw_rule_mulkdiv, (void*) 1000000,
    19281929                                  SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_RATE, -1);
     
    19921993                return err;
    19931994
    1994         err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 
     1995        err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
    19951996                                  snd_pcm_hw_rule_buffer_bytes_max, substream,
    19961997                                  SNDRV_PCM_HW_PARAM_BUFFER_BYTES, -1);
     
    20052006        }
    20062007        if (!(hw->rates & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS))) {
    2007                 err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 
     2008                err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
    20082009                                          snd_pcm_hw_rule_rate, hw,
    20092010                                          SNDRV_PCM_HW_PARAM_RATE, -1);
  • GPL/trunk/alsa-kernel/core/rawmidi.c

    r464 r479  
    385385        struct snd_ctl_file *kctl;
    386386
    387         if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK)) 
     387        if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK))
    388388                return -EINVAL;         /* invalid combination */
    389389
     
    574574}
    575575
     576#ifndef TARGET_OS2
    576577static int snd_rawmidi_info_user(struct snd_rawmidi_substream *substream,
    577578                                 struct snd_rawmidi_info __user * _info)
     
    585586        return 0;
    586587}
     588#endif
    587589
    588590int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info)
     
    683685}
    684686
     687#ifndef TARGET_OS2
    685688static int snd_rawmidi_output_status(struct snd_rawmidi_substream *substream,
    686689                                     struct snd_rawmidi_status * status)
     
    820823        return -ENOTTY;
    821824}
     825#endif
    822826
    823827static int snd_rawmidi_control_ioctl(struct snd_card *card,
     
    10311035 * snd_rawmidi_transmit_empty - check whether the output buffer is empty
    10321036 * @substream: the rawmidi substream
    1033  * 
     1037 *
    10341038 * Returns 1 if the internal output buffer is empty, 0 if not.
    10351039 */
     
    11441148 * @buffer: the buffer pointer
    11451149 * @count: the data size to transfer
    1146  * 
     1150 *
    11471151 * Copies data from the buffer to the device and advances the pointer.
    11481152 *
  • GPL/trunk/alsa-kernel/core/seq/seq_compat.c

    r426 r479  
    2222
    2323#include <linux/compat.h>
     24#include <proto.h>
    2425
    2526struct snd_seq_port_info32 {
  • GPL/trunk/alsa-kernel/core/seq/seq_virmidi.c

    r399 r479  
    4747#include <sound/seq_midi_event.h>
    4848#include <sound/seq_virmidi.h>
     49#include <proto.h>
    4950
    5051MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
  • GPL/trunk/alsa-kernel/core/sgbuf.c

    r426 r479  
    2727#include <linux/vmalloc.h>
    2828#include <sound/memalloc.h>
    29 
     29#include <proto.h>
    3030
    3131/* table entries are align to 32 */
     
    6666}
    6767#else
     68/*
     69 * shrink to the given pages.
     70 * free the unused pages
     71 */
     72static void sgbuf_shrink(struct snd_sg_buf *sgbuf, int pages)
     73{
     74        if (! sgbuf->table)
     75                return;
     76        while (sgbuf->pages > pages) {
     77                sgbuf->pages--;
     78                snd_free_dev_pages(sgbuf->dev, PAGE_SIZE,
     79                                   sgbuf->table[sgbuf->pages].buf,
     80                                   sgbuf->table[sgbuf->pages].addr);
     81        }
     82}
     83
    6884/* base this fn on the one in Uniaud 1.1.4 */
    6985int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab)
     
    8298        return 0;
    8399}
    84 
    85 /*
    86  * shrink to the given pages.
    87  * free the unused pages
    88  */
    89 static void sgbuf_shrink(struct snd_sg_buf *sgbuf, int pages)
    90 {
    91         if (! sgbuf->table)
    92                 return;
    93         while (sgbuf->pages > pages) {
    94                 sgbuf->pages--;
    95                 snd_free_dev_pages(sgbuf->dev, PAGE_SIZE,
    96                                    sgbuf->table[sgbuf->pages].buf,
    97                                    sgbuf->table[sgbuf->pages].addr);
    98         }
    99 }
    100100#endif
    101101
     
    123123        dmab->addr = 0;
    124124        dmab->private_data = sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL);
    125         if (! sgbuf) 
     125        if (! sgbuf)
    126126                return NULL;
    127127        sgbuf->dev = device;
  • GPL/trunk/alsa-kernel/core/sound_oss.c

    r399 r479  
    158158        return 0;
    159159
     160#ifndef TARGET_OS2
    160161      __end:
    161162        if (register2 >= 0)
     
    167168        kfree(preg);
    168169        return -EBUSY;
     170#endif
    169171}
    170172
  • GPL/trunk/alsa-kernel/core/timer.c

    r447 r479  
    3434#include <sound/initval.h>
    3535#include <linux/kmod.h>
     36#include <proto.h>
    3637
    3738#if defined(CONFIG_SND_HPET) || defined(CONFIG_SND_HPET_MODULE)
  • GPL/trunk/alsa-kernel/isa/sb/sb16_csp.c

    r426 r479  
    66 *
    77 *  CSP microcode loader:
    8  *   alsa-tools/sb16_csp/ 
     8 *   alsa-tools/sb16_csp/
    99 *
    10  *   This program is free software; you can redistribute it and/or modify 
     10 *   This program is free software; you can redistribute it and/or modify
    1111 *   it under the terms of the GNU General Public License as published by
    1212 *   the Free Software Foundation; either version 2 of the License, or
     
    3232#include <sound/sb16_csp.h>
    3333#include <sound/initval.h>
     34#include <proto.h>
    3435
    3536MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>");
     
    300301
    301302/*
    302  * load microcode via ioctl: 
     303 * load microcode via ioctl:
    303304 * code is user-space pointer
    304305 */
     
    682683        return result;
    683684}
    684  
     685
    685686static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags)
    686687{
     
    731732
    732733        /* if CSP is running or manually loaded then exit */
    733         if (p->running & (SNDRV_SB_CSP_ST_RUNNING | SNDRV_SB_CSP_ST_LOADED)) 
     734        if (p->running & (SNDRV_SB_CSP_ST_RUNNING | SNDRV_SB_CSP_ST_LOADED))
    734735                return -EBUSY;
    735736
     
    764765                        }
    765766                        p->acc_format = SNDRV_PCM_FMTBIT_IMA_ADPCM;
    766                         break;                           
     767                        break;                         
    767768                default:
    768769                        /* Decouple CSP from IRQ and DMAREQ lines */
     
    788789                        p->acc_channels = SNDRV_SB_CSP_MONO | SNDRV_SB_CSP_STEREO;
    789790                        p->acc_rates = SNDRV_SB_CSP_RATE_ALL;   /* HW codecs accept all rates */
    790                 }   
     791                }
    791792
    792793        }
  • GPL/trunk/alsa-kernel/isa/wavefront/wavefront_fx.c

    r426 r479  
    2525#include <sound/snd_wavefront.h>
    2626#include <sound/initval.h>
     27#include <proto.h>
    2728
    2829/* Control bits for the Load Control Register
     
    152153}
    153154
    154 int 
     155int
    155156snd_wavefront_fx_release (struct snd_hwdep *hw, struct file *file)
    156157
  • GPL/trunk/alsa-kernel/pci/cmipci.c

    r464 r479  
    1717 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    1818 */
    19  
     19
    2020/* Does not work. Warning may block system in capture mode */
    2121/* #define USE_VAR48KRATE */
     
    13001300                    substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE &&
    13011301                    substream->runtime->channels == 2);
    1302         if (do_spdif && cm->can_ac3_hw) 
     1302        if (do_spdif && cm->can_ac3_hw)
    13031303                do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO;
    13041304        if ((err = setup_spdif_playback(cm, substream, do_spdif, do_ac3)) < 0)
     
    13131313        int err, do_ac3;
    13141314
    1315         if (cm->can_ac3_hw) 
     1315        if (cm->can_ac3_hw)
    13161316                do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO;
    13171317        else
     
    20362036        return 0;
    20372037}
    2038  
     2038
    20392039static int snd_cmipci_get_volume(struct snd_kcontrol *kcontrol,
    20402040                                 struct snd_ctl_elem_value *ucontrol)
     
    21182118        return 0;
    21192119}
    2120  
     2120
    21212121static int snd_cmipci_get_input_sw(struct snd_kcontrol *kcontrol,
    21222122                                   struct snd_ctl_elem_value *ucontrol)
     
    23862386        else
    23872387                val = snd_cmipci_read(cm, args->reg);
    2388         change = (val & args->mask) != (ucontrol->value.integer.value[0] ? 
     2388        change = (val & args->mask) != (ucontrol->value.integer.value[0] ?
    23892389                        args->mask_on : (args->mask & ~args->mask_on));
    23902390        if (change) {
     
    25892589        /* same bit as spdi_phase */
    25902590        spin_lock_irq(&cm->reg_lock);
    2591         ucontrol->value.enumerated.item[0] = 
     2591        ucontrol->value.enumerated.item[0] =
    25922592                (snd_cmipci_read_b(cm, CM_REG_MISC) & CM_SPDIF_INVERSE) ? 1 : 0;
    25932593        spin_unlock_irq(&cm->reg_lock);
     
    27832783
    27842784#ifdef CONFIG_PROC_FS
    2785 static void snd_cmipci_proc_read(struct snd_info_entry *entry, 
     2785static void snd_cmipci_proc_read(struct snd_info_entry *entry,
    27862786                                 struct snd_info_buffer *buffer)
    27872787{
     
    31323132        case PCI_DEVICE_ID_CMEDIA_CM8738:
    31333133        case PCI_DEVICE_ID_CMEDIA_CM8738B:
    3134                 if (!pci_dev_present(intel_82437vx)) 
     3134                if (!pci_dev_present(intel_82437vx))
    31353135                        snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_TXVX);
    31363136                break;
  • GPL/trunk/alsa-kernel/pci/emu10k1/emufx.c

    r426 r479  
    4040#include <sound/tlv.h>
    4141#include <sound/emu10k1.h>
     42#include <proto.h>
    4243
    4344#if 0           /* for testing purposes - digital out -> capture */
     
    5354/*
    5455 *  Tables
    55  */ 
     56 */
    5657
    5758static char *fxbuses[16] = {
     
    304305/*
    305306 */
    306  
     307
    307308static inline mm_segment_t snd_enter_user(void)
    308309{
     
    12561257        snd_emu10k1_init_stereo_control(&controls[nctl++], "Synth Capture Volume", gpr, 0);
    12571258        gpr += 2;
    1258      
     1259
    12591260        /*
    12601261         * inputs
     
    13321333                                        gpr, 0);
    13331334        gpr += 2;
    1334        
     1335
    13351336        /* Philips ADC Playback Volume */
    13361337        A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_ADC_L);
     
    15301531        }
    15311532
    1532         /* IEC958 Optical Raw Playback Switch */ 
     1533        /* IEC958 Optical Raw Playback Switch */
    15331534        gpr_map[gpr++] = 0;
    15341535        gpr_map[gpr++] = 0x1008;
     
    15701571                        snd_printk(KERN_INFO "EMU2 inputs on\n");
    15711572                        for (z = 0; z < 0x10; z++) {
    1572                                 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, 
     1573                                snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp,
    15731574                                                                        bit_shifter16,
    15741575                                                                        A3_EMU32IN(z),
     
    22952296                 * and EXTOUT_ALFE, so we can't connect inputs to them for multitrack recording.
    22962297                 *
    2297                  * Since only 14 of the 16 EXTINs are used, this is not a big problem. 
    2298                  * We route AC97L and R to FX capture 14 and 15, SPDIF CD in to FX capture 
    2299                  * 0 and 3, then the rest of the EXTINs to the corresponding FX capture 
    2300                  * channel.  Multitrack recorders will still see the center/lfe output signal 
     2298                 * Since only 14 of the 16 EXTINs are used, this is not a big problem.
     2299                 * We route AC97L and R to FX capture 14 and 15, SPDIF CD in to FX capture
     2300                 * 0 and 3, then the rest of the EXTINs to the corresponding FX capture
     2301                 * channel.  Multitrack recorders will still see the center/lfe output signal
    23012302                 * on the second and third channels.
    23022303                 */
     
    23112312                        OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z));
    23122313        }
    2313            
     2314       
    23142315
    23152316        if (gpr > tmp) {
  • GPL/trunk/alsa-kernel/pci/emu10k1/io.c

    r426 r479  
    102102EXPORT_SYMBOL(snd_emu10k1_ptr_write);
    103103
    104 unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, 
    105                                           unsigned int reg, 
     104unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu,
     105                                          unsigned int reg,
    106106                                          unsigned int chn)
    107107{
    108108        unsigned long flags;
    109109        unsigned int regptr, val;
    110  
     110
    111111        regptr = (reg << 16) | chn;
    112112
     
    118118}
    119119
    120 void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, 
    121                                    unsigned int reg, 
    122                                    unsigned int chn, 
     120void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu,
     121                                   unsigned int reg,
     122                                   unsigned int chn,
    123123                                   unsigned int data)
    124124{
     
    245245                err = -EINVAL;
    246246        }
    247    
     247
    248248        spin_unlock(&emu->i2c_lock);
    249249        return err;
     
    257257                return 1;
    258258        reg += 0x40; /* 0x40 upwards are registers. */
    259         if (value < 0 || value > 0x3f) /* 0 to 0x3f are values */
     259        if (value > 0x3f) /* 0 to 0x3f are values */
    260260                return 1;
    261261        spin_lock_irqsave(&emu->emu_lock, flags);
  • GPL/trunk/alsa-kernel/pci/hda/hda_codec.c

    r464 r479  
    432432 * process queued unsolicited events
    433433 */
     434#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    434435static void process_unsol_events(struct work_struct *work)
    435436{
     
    453454        }
    454455}
     456#endif
    455457
    456458/*
     
    615617                return NULL; /* use the generic parser */
    616618
     619#ifndef TARGET_OS2
    617620 again:
     621#endif
    618622        mutex_lock(&preset_mutex);
    619623        list_for_each_entry(tbl, &hda_preset_tables, list, struct hda_codec_preset_list) {
     
    25012505                if (err < 0) {
    25022506                        printk(KERN_ERR "hda_codec: cannot build controls"
    2503                                "for #%d (error %d)\n", codec->addr, err); 
     2507                               "for #%d (error %d)\n", codec->addr, err);
    25042508                        err = snd_hda_codec_reset(codec);
    25052509                        if (err < 0) {
     
    29632967                if (err < 0) {
    29642968                        printk(KERN_ERR "hda_codec: cannot build PCMs"
    2965                                "for #%d (error %d)\n", codec->addr, err); 
     2969                               "for #%d (error %d)\n", codec->addr, err);
    29662970                        err = snd_hda_codec_reset(codec);
    29672971                        if (err < 0) {
     
    34003404        /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */
    34013405        if (codec->spdif_status_reset && (codec->spdif_ctls & AC_DIG1_ENABLE))
    3402                 set_dig_out_convert(codec, nid, 
     3406                set_dig_out_convert(codec, nid,
    34033407                                    codec->spdif_ctls & ~AC_DIG1_ENABLE & 0xff,
    34043408                                    -1);
     
    36603664 * output, i.e. to line_out_pins[0].  So, line_outs is always positive
    36613665 * if any analog output exists.
    3662  * 
     3666 *
    36633667 * The analog input pins are assigned to input_pins array.
    36643668 * The digital input/output pins are assigned to dig_in_pin and dig_out_pin,
Note: See TracChangeset for help on using the changeset viewer.