Changeset 479 for GPL/trunk


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

Cleanup compiler warnings

Location:
GPL/trunk
Files:
1 added
37 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,
  • GPL/trunk/drv32/dispatch.c

    r235 r479  
    9696
    9797#ifdef DEBUG
    98     printk("StratIOCtl\n");
     98    printk("StratIOCtl %d\n", rp->Function);
    9999#endif
    100100    if (rp->Category != CAT_IOCTL_OSS32)
  • GPL/trunk/drv32/idc.c

    r386 r479  
    8484       OSSSTREAMID streamId = 0;
    8585
    86        rc = OSS32_WaveOpen(pPacket->open.devicenr, pPacket->open.streamtype, &streamId, pcm_device, pPacket->fileid);
     86       rc = OSS32_WaveOpen(pPacket->open.devicenr, pPacket->open.streamtype, &streamId, pcm_device, (USHORT)pPacket->fileid); /* DAZ cast added to stop compiler warning */
    8787       pPacket->streamid = streamId;
    8888       return rc;
     
    137137  }
    138138
    139       case IDC32_WAVE_GETHWPTR:
     139  case IDC32_WAVE_GETHWPTR:
    140140  {
    141141       ULONG position = 0;
     
    145145  }
    146146
    147     case IDC32_WAVE_SETVOLUME:
     147  case IDC32_WAVE_SETVOLUME:
    148148       return OSS32_WaveSetVolume(pPacket->streamid, pPacket->setwavevol.volume);
    149149
  • GPL/trunk/drv32/parse.c

    r32 r479  
    4646extern "C" short int midi_port;
    4747
    48 #ifdef DEBUG
     48#ifdef COMM_DEBUG
    4949extern "C" short int MAGIC_COMM_PORT;
    5050#endif
     
    223223        break;
    224224#endif
    225 #ifdef DEBUG
     225#ifdef COMM_DEBUG
    226226    case 'P':
    227227        if(*pszOption == '0') {
  • GPL/trunk/include/dbgos2.h

    r269 r479  
    4343#define DebugInt3()     ; //_asm int 3;
    4444#define DebInt3()       _asm int 3;
    45 #else // #ifndef DEBUG
     45#else // #ifdef DEBUG
    4646#define dprintf(a)
    4747#define dprintf2(a)
    4848#define dprintf3(a)
    4949#define DebugInt3()     ;
    50 #endif // if DEBUG
     50#endif // #ifdef DEBUG
    5151
    5252#endif //__COMMDBG_H__
  • GPL/trunk/include/linux/math64.h

    r463 r479  
    6363        u32 q1 = 0;
    6464        int c = 32;
    65         while (n > 0xffffffffU) {
     65        while (n > 0xffffffffUi64) {
    6666                q1 <<= 1;
    6767                if (n >= d) {
     
    110110                u32 low1 = low;
    111111                high /= div;
    112                 divl(high1, low1, div, &low, rem);
     112                divl(high1, low1, div, &low, &rem);
    113113                return (u64)high << 32 | low;
    114114        } else {
  • GPL/trunk/include/linux/pci.h

    r463 r479  
    7373/*
    7474 * Base addresses specify locations in memory or I/O space.
    75  * Decoded size can be determined by writing a value of 
    76  * 0xffffffff to the register, and reading it back.  Only 
     75 * Decoded size can be determined by writing a value of
     76 * 0xffffffff to the register, and reading it back.  Only
    7777 * 1 bits are decoded.
    7878 */
     
    9898#define PCI_CARDBUS_CIS         0x28
    9999#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
    100 #define PCI_SUBSYSTEM_ID        0x2e 
     100#define PCI_SUBSYSTEM_ID        0x2e
    101101#define PCI_ROM_ADDRESS         0x30    /* Bits 31..11 are address, 10..1 reserved */
    102102#define  PCI_ROM_ADDRESS_ENABLE 0x01
     
    389389#define PCI_BRIDGE_RESOURCES 7
    390390#define PCI_NUM_RESOURCES 11
    391  
     391
    392392#define PCI_REGION_FLAG_MASK 0x0f       /* These bits of resource flags tell us the PCI region flags */
    393393
     
    517517 * simple PCI probing for drivers (drivers/pci/helper.c)
    518518 */
    519  
     519
    520520struct pci_simple_probe_entry;
    521521typedef int (*pci_simple_probe_callback) (struct pci_dev *dev, int match_num,
  • GPL/trunk/include/linux/time.h

    r442 r479  
    4646        value->tv_sec = jiffies / HZ;
    4747}
    48  
     48
    4949struct timeval {
    5050        time_t          tv_sec;         /* seconds */
     
    9494static __inline__ unsigned int jiffies_to_msecs(const unsigned long j)
    9595{
    96         if (HZ <= 1000 && !(1000 % HZ))
     96#if (HZ <= 1000 && !(1000 % HZ))
    9797                return (1000 / HZ) * j;
    98         else if (HZ > 1000 && !(HZ % 1000))
     98#elif (HZ > 1000 && !(HZ % 1000))
    9999                return (j + (HZ / 1000) - 1)/(HZ / 1000);
    100         else
     100#else
    101101                return (j * 1000) / HZ;
     102#endif
    102103}
    103104static __inline__ unsigned long msecs_to_jiffies(const unsigned int m)
     
    105106        if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
    106107                return MAX_JIFFY_OFFSET;
    107         if (HZ <= 1000 && !(1000 % HZ))
     108#if (HZ <= 1000 && !(1000 % HZ))
    108109                return (m + (1000 / HZ) - 1) / (1000 / HZ);
    109         else if (HZ > 1000 && !(HZ % 1000))
     110#elif (HZ > 1000 && !(HZ % 1000))
    110111                return m * (HZ / 1000);
    111         else
     112#else
    112113                return (m * HZ + 999) / 1000;
     114#endif
    113115}
    114116#endif
  • GPL/trunk/include/ossdefos2.h

    r451 r479  
    8484#define OSS_MIXER_RADIO         23      /* Radio in */
    8585#define OSS_MIXER_MONITOR       24      /* Monitor (usually mic) volume */
    86 #define OSS_MIXER_3DDEPTH       25   
     86#define OSS_MIXER_3DDEPTH       25
    8787#define OSS_MIXER_3DCENTER      26
    8888#define OSS_MIXER_FRONT         27
  • GPL/trunk/lib32/debug.c

    r421 r479  
    3434#define SIGNIFICANT_FIELD       0x0007
    3535
     36//#define COMM_DEBUG
     37
    3638BOOL  fLineTerminate=TRUE;
    3739int   DebugLevel = 1;
     
    123125
    124126      if (Power==0xF0000000)                  // 1 billion
    125          Power=0xF000000;     
     127         Power=0xF000000;
    126128      else if (Power==0xF000000)
    127129         Power=0xF00000;
     
    144146}
    145147
    146 #define DEBUG1
    147 
    148 #ifdef  DEBUG1
    149 char BuildString[1024];
    150 #endif          // DEBUG
    151 
    152 //------------------------- PrintfOut -
    153 void _cdecl DPD(int level, char *DbgStr, ...)
    154 {
    155 #ifdef DEBUG1
    156    char *BuildPtr=BuildString;
    157    char *pStr=(char *) DbgStr;
    158    char *SubStr;
    159    union {
    160          void   *VoidPtr;
    161          USHORT *WordPtr;
    162          ULONG  *LongPtr;
    163          ULONG  *StringPtr;
    164          } Parm;
    165    USHORT wBuildOption;
    166 
    167    Parm.VoidPtr=(void *) &DbgStr;
    168    Parm.StringPtr++;                            // skip size of string pointer
    169 
    170    while (*pStr)
    171       {
    172       // don't overflow target
    173       if (BuildPtr >= (char *) &BuildString[1024-2])
    174          break;
    175 
    176       switch (*pStr)
    177          {
    178          case '%':
    179             wBuildOption=0;
    180             pStr++;
    181             if (*pStr=='0')
    182                {
    183                wBuildOption|=LEADING_ZEROES;
    184                pStr++;
    185                }
    186             if (*pStr=='u')                                                         // always unsigned
    187                pStr++;
    188             if (*pStr=='#')
    189                pStr++;
    190 
    191             switch(*pStr)
    192                {
    193                case 'x':
    194                case 'X':
    195                case 'p':
    196                case 'P':
    197                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    198                   pStr++;
    199                   continue;
    200 
    201                case 'd':
    202                   BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    203                   pStr++;
    204                   continue;
    205 
    206                case 's':
    207                   SubStr=(char *)*Parm.StringPtr;
    208                   while (*BuildPtr++ = *SubStr++);
    209                   Parm.StringPtr++;
    210                   BuildPtr--;                      // remove the \0
    211                   pStr++;
    212                   continue;
    213 
    214                case 'l':
    215                   pStr++;
    216                   switch (*pStr)
    217                   {
    218                   case 'x':
    219                   case 'X':
    220                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    221                   pStr++;
    222                   continue;
    223 
    224                   case 'd':
    225                      BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    226                      pStr++;
    227                      continue;
    228                   } // end switch
    229                   continue;                        // dunno what he wants
    230 
    231                case 0:
    232                   continue;
    233                } // end switch
    234             break;
    235 
    236       case '\\':
    237          pStr++;
    238          switch (*pStr)
    239             {
    240             case 'n':
    241             *BuildPtr++=LF;
    242             pStr++;
    243             continue;
    244 
    245             case 'r':
    246             *BuildPtr++=CR;
    247             pStr++;
    248             continue;
    249 
    250             case 0:
    251             continue;
    252             break;
    253             } // end switch
    254 
    255          break;
    256          } // end switch
    257 
    258       *BuildPtr++=*pStr++;
    259       } // end while
    260 
    261    *BuildPtr=0;                                 // cauterize the string
    262    StringOut((char *) BuildString);         // print to comm port
    263 #endif                            //DEBUG
    264 }
    265 
    266 
    267 void _cdecl DPE(char *DbgStr, ...)
    268 {
    269 #ifdef DEBUG1
    270    char *BuildPtr=BuildString;
    271    char *pStr = (char *) DbgStr;
    272    char *SubStr;
    273    union {
    274          void   *VoidPtr;
    275          USHORT *WordPtr;
    276          ULONG  *LongPtr;
    277          ULONG  *StringPtr;
    278          } Parm;
    279    USHORT wBuildOption;
    280 
    281    Parm.VoidPtr=(void *) &DbgStr;
    282    Parm.StringPtr++;                            // skip size of string pointer
    283 
    284    while (*pStr)
    285       {
    286       // don't overflow target
    287       if (BuildPtr >= (char *) &BuildString[1024-2])
    288          break;
    289 
    290       switch (*pStr)
    291          {
    292          case '%':
    293             wBuildOption=0;
    294             pStr++;
    295             if (*pStr=='0')
    296                {
    297                wBuildOption|=LEADING_ZEROES;
    298                pStr++;
    299                }
    300 //            if (*pStr=='u')                                                         // always unsigned
    301 //               pStr++;
    302 
    303             switch(*pStr)
    304                {
    305                case 'x':
    306                case 'X':
    307                case 'p':
    308                case 'P':
    309                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    310                   pStr++;
    311                   continue;
    312 
    313                case 'd':
    314                case 'u':
    315                   BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    316                   pStr++;
    317                   continue;
    318 
    319                case 's':
    320                   SubStr=(char *)*Parm.StringPtr;
    321                   while (*BuildPtr++ = *SubStr++);
    322                   Parm.StringPtr++;
    323                   BuildPtr--;                      // remove the \0
    324                   pStr++;
    325                   continue;
    326 
    327                case 'c':
    328                   *BuildPtr++ = (char)*Parm.LongPtr;
    329                   Parm.LongPtr++;
    330                   pStr++;
    331                   continue;
    332 
    333                case 'l':
    334                   pStr++;
    335                   switch (*pStr)
    336                   {
    337                   case 'x':
    338                   case 'X':
    339                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    340                   pStr++;
    341                   continue;
    342 
    343                   case 'd':
    344                      BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    345                      pStr++;
    346                      continue;
    347                   } // end switch
    348                   continue;                        // dunno what he wants
    349 
    350                case 0:
    351                   continue;
    352                } // end switch
    353             break;
    354 
    355       case '\\':
    356          pStr++;
    357          switch (*pStr)
    358             {
    359             case 'n':
    360             *BuildPtr++=LF;
    361             pStr++;
    362             continue;
    363 
    364             case 'r':
    365             *BuildPtr++=CR;
    366             pStr++;
    367             continue;
    368 
    369             case 0:
    370             continue;
    371             break;
    372             } // end switch
    373 
    374          break;
    375          } // end switch
    376 
    377       *BuildPtr++=*pStr++;
    378       } // end while
    379 
    380    *BuildPtr=0;                                 // cauterize the string
    381    StringOut((char *) BuildString);         // print to comm port
    382 #endif                            //DEBUG
    383 }
    384 
    385 struct snd_info_buffer {
    386         char *buffer;           /* pointer to begin of buffer */
    387         char *curr;             /* current position in buffer */
    388         unsigned long size;     /* current size */
    389         unsigned long len;      /* total length of buffer */
    390         int stop;               /* stop flag */
    391         int error;              /* error code */
    392 };
    393 
    394 typedef struct snd_info_buffer snd_info_buffer_t;
    395 
    396 int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...)
    397 {
    398    char *BuildPtr=buffer->curr;
    399    char *pStr=(char *) fmt;
    400    char *SubStr;
    401    int   res;
    402    union {
    403          void   *VoidPtr;
    404          USHORT *WordPtr;
    405          ULONG  *LongPtr;
    406          ULONG  *StringPtr;
    407          } Parm;
    408    USHORT wBuildOption;
    409 
    410    Parm.VoidPtr=(void *) &fmt;
    411    Parm.StringPtr++;                            // skip size of string pointer
    412 
    413    if (buffer->stop || buffer->error)
    414        return 0;
    415 
    416    while (*pStr)
    417       {
    418       // don't overflow target
    419       if (BuildPtr >= (char *) &buffer->curr[buffer->len - 4])
    420          break;
    421 
    422       switch (*pStr)
    423          {
    424          case '%':
    425             wBuildOption=0;
    426             pStr++;
    427             if (*pStr=='0')
    428                {
    429                wBuildOption|=LEADING_ZEROES;
    430                pStr++;
    431                }
    432 //            if (*pStr=='u')                                                         // always unsigned
    433 //               pStr++;
    434             if (*pStr=='#')
    435                pStr++;
    436 
    437             switch(*pStr)
    438                {
    439                case 'x':
    440                case 'X':
    441                case 'p':
    442                case 'P':
    443                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    444                   pStr++;
    445                   continue;
    446 
    447                case 'd':
    448                case 'u':
    449                   BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    450                   pStr++;
    451                   continue;
    452 
    453                case 's':
    454                   SubStr=(char *)*Parm.StringPtr;
    455                   while (*BuildPtr++ = *SubStr++);
    456                   Parm.StringPtr++;
    457                   BuildPtr--;                      // remove the \0
    458                   pStr++;
    459                   continue;
    460 
    461                case 'c':
    462                   *BuildPtr++ = (char)*Parm.LongPtr;
    463                   Parm.LongPtr++;
    464                   pStr++;
    465                   continue;
    466 
    467                case 'l':
    468                   pStr++;
    469                   switch (*pStr)
    470                   {
    471                   case 'x':
    472                   case 'X':
    473                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    474                   pStr++;
    475                   continue;
    476 
    477                   case 'd':
    478                      BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    479                      pStr++;
    480                      continue;
    481                   } // end switch
    482                   continue;                        // dunno what he wants
    483 
    484                case 0:
    485                   continue;
    486                } // end switch
    487             break;
    488 
    489       case '\\':
    490          pStr++;
    491          switch (*pStr)
    492             {
    493             case 'n':
    494             *BuildPtr++=LF;
    495             pStr++;
    496             continue;
    497 
    498             case 'r':
    499             *BuildPtr++=CR;
    500             pStr++;
    501             continue;
    502 
    503             case 0:
    504             continue;
    505             break;
    506             } // end switch
    507 
    508          break;
    509          } // end switch
    510 
    511       *BuildPtr++=*pStr++;
    512       } // end while
    513 
    514    *BuildPtr=0;                                 // cauterize the string
    515 
    516    res = strlen(buffer->curr);
    517    if (buffer->size + res >= buffer->len) {
    518        buffer->stop = 1;
    519        return 0;
    520    }
    521    buffer->curr += res;
    522    buffer->size += res;
    523    return res;
    524 }
    525 
    526 #ifdef DEBUG1
     148#ifdef DEBUG
    527149//------------------------- StringOut --------------------------//
    528150
     
    546168    return psz - pszC;
    547169}
    548 //PS+++ Changes for right debug output
    549 #ifdef DEBUG
    550 short int MAGIC_COMM_PORT =  0;           // pulled from word ptr 40:0
     170
     171#ifdef COMM_DEBUG
     172short int MAGIC_COMM_PORT =  0; // pulled from word ptr 40:0
    551173
    552174
     
    562184
    563185#define DELAY   nop
    564 #else
    565 short int MAGIC_COMM_PORT =  0x0;           // pulled from word ptr 40:0
     186
     187void CharOut(char c)
     188{
     189    if( MAGIC_COMM_PORT )
     190    {
     191
     192        _asm    {
     193
     194        mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
     195        add     dx, UART_LINE_STAT
     196
     197ReadyCheck:
     198        in      al, dx                                                          // wait for comm port ready signal
     199
     200        DELAY
     201        DELAY
     202        DELAY
     203
     204        test    al, 020h
     205        jz      ReadyCheck
     206
     207        // Send the character
     208
     209        add     dx, UART_DATA - UART_LINE_STAT
     210        mov     al,c
     211        out     dx, al
     212
     213        DELAY
     214        DELAY
     215        DELAY
     216        }
     217    }
     218}
    566219#endif
    567220
     
    569222{
    570223   int len;
    571 #ifdef DEBUG
     224#ifdef COMM_DEBUG
    572225   int i;
    573226#endif /* DEBUG */
    574    
     227
    575228   len= _strnlen( DbgStr, 1024 );
    576 /*   
     229/*
    577230   while (*DbgStr)
    578231      CharOut(*DbgStr++);
    579232      */
    580 #ifdef DEBUG
     233#ifdef COMM_DEBUG
    581234   if (MAGIC_COMM_PORT)   //PS+++ If have comport - out to it
    582235   {
     
    631284#endif
    632285
    633 
    634 #ifdef DEBUG                            //--------------------------- CharOut -
    635 void CharOut(char c)
    636 {
    637     if( MAGIC_COMM_PORT )
    638     {
    639 
    640         _asm    {
    641 
    642         mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
    643         add     dx, UART_LINE_STAT
    644 
    645 ReadyCheck:
    646         in      al, dx                                                          // wait for comm port ready signal
    647 
    648         DELAY
    649         DELAY
    650         DELAY
    651 
    652         test    al, 020h
    653         jz      ReadyCheck
    654 
    655         // Send the character
    656 
    657         add     dx, UART_DATA - UART_LINE_STAT
    658         mov     al,c
    659         out     dx, al
    660 
    661         DELAY
    662         DELAY
    663         DELAY
    664         }
    665     }
    666 }
    667 #endif
     286#ifdef  DEBUG
     287char BuildString[1024];
     288#endif          // DEBUG
     289
     290//------------------------- PrintfOut -
     291void _cdecl DPD(int level, char *DbgStr, ...)
     292{
     293#ifdef DEBUG
     294   char *BuildPtr=BuildString;
     295   char *pStr=(char *) DbgStr;
     296   char *SubStr;
     297   union {
     298         void   *VoidPtr;
     299         USHORT *WordPtr;
     300         ULONG  *LongPtr;
     301         ULONG  *StringPtr;
     302         } Parm;
     303   USHORT wBuildOption;
     304
     305   Parm.VoidPtr=(void *) &DbgStr;
     306   Parm.StringPtr++;                            // skip size of string pointer
     307
     308   while (*pStr)
     309      {
     310      // don't overflow target
     311      if (BuildPtr >= (char *) &BuildString[1024-2])
     312         break;
     313
     314      switch (*pStr)
     315         {
     316         case '%':
     317            wBuildOption=0;
     318            pStr++;
     319            if (*pStr=='0')
     320               {
     321               wBuildOption|=LEADING_ZEROES;
     322               pStr++;
     323               }
     324            if (*pStr=='u')                                                         // always unsigned
     325               pStr++;
     326            if (*pStr=='#')
     327               pStr++;
     328
     329            switch(*pStr)
     330               {
     331               case 'x':
     332               case 'X':
     333               case 'p':
     334               case 'P':
     335                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     336                  pStr++;
     337                  continue;
     338
     339               case 'd':
     340                  BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     341                  pStr++;
     342                  continue;
     343
     344               case 's':
     345                  SubStr=(char *)*Parm.StringPtr;
     346                  while (*BuildPtr++ = *SubStr++);
     347                  Parm.StringPtr++;
     348                  BuildPtr--;                      // remove the \0
     349                  pStr++;
     350                  continue;
     351
     352               case 'l':
     353                  pStr++;
     354                  switch (*pStr)
     355                  {
     356                  case 'x':
     357                  case 'X':
     358                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     359                  pStr++;
     360                  continue;
     361
     362                  case 'd':
     363                     BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     364                     pStr++;
     365                     continue;
     366                  } // end switch
     367                  continue;                        // dunno what he wants
     368
     369               case 0:
     370                  continue;
     371               } // end switch
     372            break;
     373
     374      case '\\':
     375         pStr++;
     376         switch (*pStr)
     377            {
     378            case 'n':
     379            *BuildPtr++=LF;
     380            pStr++;
     381            continue;
     382
     383            case 'r':
     384            *BuildPtr++=CR;
     385            pStr++;
     386            continue;
     387
     388            case 0:
     389            continue;
     390            break;
     391            } // end switch
     392
     393         break;
     394         } // end switch
     395
     396      *BuildPtr++=*pStr++;
     397      } // end while
     398
     399   *BuildPtr=0;                                 // cauterize the string
     400   StringOut((char *) BuildString);
     401#endif                            //DEBUG
     402}
     403
     404
     405void _cdecl DPE(char *DbgStr, ...)
     406{
     407#ifdef DEBUG
     408   char *BuildPtr=BuildString;
     409   char *pStr = (char *) DbgStr;
     410   char *SubStr;
     411   union {
     412         void   *VoidPtr;
     413         USHORT *WordPtr;
     414         ULONG  *LongPtr;
     415         ULONG  *StringPtr;
     416         } Parm;
     417   USHORT wBuildOption;
     418
     419   Parm.VoidPtr=(void *) &DbgStr;
     420   Parm.StringPtr++;                            // skip size of string pointer
     421
     422   while (*pStr)
     423      {
     424      // don't overflow target
     425      if (BuildPtr >= (char *) &BuildString[1024-2])
     426         break;
     427
     428      switch (*pStr)
     429         {
     430         case '%':
     431            wBuildOption=0;
     432            pStr++;
     433            if (*pStr=='0')
     434               {
     435               wBuildOption|=LEADING_ZEROES;
     436               pStr++;
     437               }
     438//            if (*pStr=='u')                                                         // always unsigned
     439//               pStr++;
     440
     441            switch(*pStr)
     442               {
     443               case 'x':
     444               case 'X':
     445               case 'p':
     446               case 'P':
     447                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     448                  pStr++;
     449                  continue;
     450
     451               case 'd':
     452               case 'u':
     453                  BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     454                  pStr++;
     455                  continue;
     456
     457               case 's':
     458                  SubStr=(char *)*Parm.StringPtr;
     459                  while (*BuildPtr++ = *SubStr++);
     460                  Parm.StringPtr++;
     461                  BuildPtr--;                      // remove the \0
     462                  pStr++;
     463                  continue;
     464
     465               case 'c':
     466                  *BuildPtr++ = (char)*Parm.LongPtr;
     467                  Parm.LongPtr++;
     468                  pStr++;
     469                  continue;
     470
     471               case 'l':
     472                  pStr++;
     473                  switch (*pStr)
     474                  {
     475                  case 'x':
     476                  case 'X':
     477                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     478                  pStr++;
     479                  continue;
     480
     481                  case 'd':
     482                     BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     483                     pStr++;
     484                     continue;
     485                  } // end switch
     486                  continue;                        // dunno what he wants
     487
     488               case 0:
     489                  continue;
     490               } // end switch
     491            break;
     492
     493      case '\\':
     494         pStr++;
     495         switch (*pStr)
     496            {
     497            case 'n':
     498            *BuildPtr++=LF;
     499            pStr++;
     500            continue;
     501
     502            case 'r':
     503            *BuildPtr++=CR;
     504            pStr++;
     505            continue;
     506
     507            case 0:
     508            continue;
     509            break;
     510            } // end switch
     511
     512         break;
     513         } // end switch
     514
     515      *BuildPtr++=*pStr++;
     516      } // end while
     517
     518   *BuildPtr=0;                                 // cauterize the string
     519   StringOut((char *) BuildString);
     520#endif                            //DEBUG
     521}
     522
     523struct snd_info_buffer {
     524        char *buffer;           /* pointer to begin of buffer */
     525        char *curr;             /* current position in buffer */
     526        unsigned long size;     /* current size */
     527        unsigned long len;      /* total length of buffer */
     528        int stop;               /* stop flag */
     529        int error;              /* error code */
     530};
     531
     532typedef struct snd_info_buffer snd_info_buffer_t;
     533
     534int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...)
     535{
     536   char *BuildPtr=buffer->curr;
     537   char *pStr=(char *) fmt;
     538   char *SubStr;
     539   int   res;
     540   union {
     541         void   *VoidPtr;
     542         USHORT *WordPtr;
     543         ULONG  *LongPtr;
     544         ULONG  *StringPtr;
     545         } Parm;
     546   USHORT wBuildOption;
     547
     548   Parm.VoidPtr=(void *) &fmt;
     549   Parm.StringPtr++;                            // skip size of string pointer
     550
     551   if (buffer->stop || buffer->error)
     552       return 0;
     553
     554   while (*pStr)
     555      {
     556      // don't overflow target
     557      if (BuildPtr >= (char *) &buffer->curr[buffer->len - 4])
     558         break;
     559
     560      switch (*pStr)
     561         {
     562         case '%':
     563            wBuildOption=0;
     564            pStr++;
     565            if (*pStr=='0')
     566               {
     567               wBuildOption|=LEADING_ZEROES;
     568               pStr++;
     569               }
     570//            if (*pStr=='u')                                                         // always unsigned
     571//               pStr++;
     572            if (*pStr=='#')
     573               pStr++;
     574
     575            switch(*pStr)
     576               {
     577               case 'x':
     578               case 'X':
     579               case 'p':
     580               case 'P':
     581                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     582                  pStr++;
     583                  continue;
     584
     585               case 'd':
     586               case 'u':
     587                  BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     588                  pStr++;
     589                  continue;
     590
     591               case 's':
     592                  SubStr=(char *)*Parm.StringPtr;
     593                  while (*BuildPtr++ = *SubStr++);
     594                  Parm.StringPtr++;
     595                  BuildPtr--;                      // remove the \0
     596                  pStr++;
     597                  continue;
     598
     599               case 'c':
     600                  *BuildPtr++ = (char)*Parm.LongPtr;
     601                  Parm.LongPtr++;
     602                  pStr++;
     603                  continue;
     604
     605               case 'l':
     606                  pStr++;
     607                  switch (*pStr)
     608                  {
     609                  case 'x':
     610                  case 'X':
     611                  BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     612                  pStr++;
     613                  continue;
     614
     615                  case 'd':
     616                     BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
     617                     pStr++;
     618                     continue;
     619                  } // end switch
     620                  continue;                        // dunno what he wants
     621
     622               case 0:
     623                  continue;
     624               } // end switch
     625            break;
     626
     627      case '\\':
     628         pStr++;
     629         switch (*pStr)
     630            {
     631            case 'n':
     632            *BuildPtr++=LF;
     633            pStr++;
     634            continue;
     635
     636            case 'r':
     637            *BuildPtr++=CR;
     638            pStr++;
     639            continue;
     640
     641            case 0:
     642            continue;
     643            break;
     644            } // end switch
     645
     646         break;
     647         } // end switch
     648
     649      *BuildPtr++=*pStr++;
     650      } // end while
     651
     652   *BuildPtr=0;                                 // cauterize the string
     653
     654   res = strlen(buffer->curr);
     655   if (buffer->size + res >= buffer->len) {
     656       buffer->stop = 1;
     657       return 0;
     658   }
     659   buffer->curr += res;
     660   buffer->size += res;
     661   return res;
     662}
     663
  • GPL/trunk/lib32/ioctl.c

    r470 r479  
    3838int pcm_instances(int card_id);
    3939
    40 int uniaud_set_interrupted_substream(struct snd_pcm_substream *substream)
     40void uniaud_set_interrupted_substream(struct snd_pcm_substream *substream)
    4141{
    4242    int i;
     
    257257    }
    258258    return max_ch;
    259 }
    260 
    261 void FillCaps(ULONG deviceid)
    262 {
    263     int pcms = 0;
    264 
    265     pcms = pcm_instances(deviceid);
    266 
    267     printk("pcms = %i\n", pcms); //uncommented
    268     if (!pcmcaps[deviceid])
    269     {
    270         pcmcaps[deviceid] = (POSS32_DEVCAPS)kmalloc(sizeof(OSS32_DEVCAPS)*pcms, GFP_KERNEL);
    271         if (pcmcaps[deviceid])
    272         {
    273             memset(pcmcaps[deviceid], 0, sizeof(OSS32_DEVCAPS)*pcms);
    274             GetUniaudPcmCaps1(deviceid, (void *)pcmcaps[deviceid]);
    275         }
    276     }
    277     return;
    278 }
    279 
    280 int GetUniaudPcmCaps(ULONG deviceid, void *caps)
    281 {
    282     int pcms = 0;
    283 
    284     pcms = pcm_instances(deviceid);
    285 
    286 //    printk("pcms = %i\n", pcms);
    287     if (pcmcaps[deviceid])
    288     {
    289         memcpy((unsigned char*)caps,(unsigned char*)pcmcaps[deviceid],sizeof(OSS32_DEVCAPS)*pcms);
    290         return 0;
    291     }
    292     else
    293     {
    294         return -1;
    295     }
    296259}
    297260
     
    316279    if (!pcaps || !pcms) return -1;
    317280
    318    
     281
    319282    //these structures are too big to put on the stack
    320283    pcminfo = (struct snd_pcm_info *)kmalloc(sizeof(struct snd_pcm_info)+sizeof(struct snd_pcm_hw_params), GFP_KERNEL);
     
    434397}
    435398
     399void FillCaps(ULONG deviceid)
     400{
     401    int pcms = 0;
     402
     403    pcms = pcm_instances(deviceid);
     404
     405    printk("pcms = %i\n", pcms); //uncommented
     406    if (!pcmcaps[deviceid])
     407    {
     408        pcmcaps[deviceid] = (POSS32_DEVCAPS)kmalloc(sizeof(OSS32_DEVCAPS)*pcms, GFP_KERNEL);
     409        if (pcmcaps[deviceid])
     410        {
     411            memset(pcmcaps[deviceid], 0, sizeof(OSS32_DEVCAPS)*pcms);
     412            GetUniaudPcmCaps1(deviceid, (void *)pcmcaps[deviceid]);
     413        }
     414    }
     415    return;
     416}
     417
     418int GetUniaudPcmCaps(ULONG deviceid, void *caps)
     419{
     420    int pcms = 0;
     421
     422    pcms = pcm_instances(deviceid);
     423
     424//    printk("pcms = %i\n", pcms);
     425    if (pcmcaps[deviceid])
     426    {
     427        memcpy((unsigned char*)caps,(unsigned char*)pcmcaps[deviceid],sizeof(OSS32_DEVCAPS)*pcms);
     428        return 0;
     429    }
     430    else
     431    {
     432        return -1;
     433    }
     434}
     435
    436436/*
    437437 returns power state of given card
     
    469469    }
    470470    //retrieve mixer information
    471     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    472                                     SNDRV_CTL_IOCTL_POWER_STATE, 
     471    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     472                                    SNDRV_CTL_IOCTL_POWER_STATE,
    473473                                    (ULONG)state);
    474474
     
    522522    }
    523523    //retrieve mixer information
    524     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    525                                     SNDRV_CTL_IOCTL_POWER, 
     524    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     525                                    SNDRV_CTL_IOCTL_POWER,
    526526                                    (ULONG)state);
    527527
     
    576576    }
    577577    //retrieve mixer information
    578     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    579                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     578    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     579                                    SNDRV_CTL_IOCTL_CARD_INFO,
    580580                                    (ULONG)(struct snd_ctl_card_info *)info);
    581581    if(ret) {
     
    630630    }
    631631    //retrieve mixer information
    632     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    633                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     632    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     633                                    SNDRV_CTL_IOCTL_CARD_INFO,
    634634                                    (ULONG)&pHandle->info);
    635635    if(ret) {
     
    640640    pHandle->list.offset = 0;
    641641    pHandle->list.space  = 0;
    642     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    643                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     642    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     643                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    644644                                    (ULONG)&pHandle->list);
    645645    if(ret) {
     
    695695    }
    696696    //retrieve mixer information
    697     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    698                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     697    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     698                                    SNDRV_CTL_IOCTL_CARD_INFO,
    699699                                    (ULONG)&pHandle->info);
    700700    if(ret) {
     
    705705    pHandle->list.offset = 0;
    706706    pHandle->list.space  = 0;
    707     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    708                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     707    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     708                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    709709                                    (ULONG)&pHandle->list);
    710710    if(ret) {
     
    724724    pHandle->list.space  = pHandle->list.count;
    725725    pHandle->list.pids   = pHandle->pids;
    726     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    727                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     726    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     727                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    728728                                    (ULONG)&pHandle->list);
    729729    if(ret) {
  • GPL/trunk/lib32/irq.c

    r437 r479  
    206206#endif
    207207
    208                 // HDA Hardware generates controller interrupts and stream interrupts 
     208                // HDA Hardware generates controller interrupts and stream interrupts
    209209                // the uniaud16 driver only cares about stream interrupts.
    210                 // azx_interrupt in alsa-kernel/pci/hda/hda_intel.c will return rc 2 if 
    211                 // the interrupt is from the  controller. There is no need to call uniaud16 
    212                 // for these interrupts
    213                 if ( rc == 2 ) { 
     210                // azx_interrupt in alsa-kernel/pci/hda/hda_intel.c will return rc 2 if
     211                // the interrupt is from the  controller. There is no need to call uniaud16
     212                                // for these interrupts
     213                if ( rc == 2 ) {
    214214                    fInInterrupt = FALSE;
    215215                    *pulIrq = pSlot->irqNo;
  • GPL/trunk/lib32/misc.c

    r445 r479  
    4646mem_map_t *mem_map = 0;
    4747int this_module[64] = {0};
    48                
     48
    4949#include <stdarg.h>
    5050
     
    6464
    6565    char *pszLastALSAError;
    66    
     66
    6767    pszLastALSAError= iLastError ? szLastALSAError2 : szLastALSAError1;
    6868
     
    7575        DebugInt3();
    7676    }
    77    
     77
    7878    dprintf( (pszLastALSAError) );
    7979    if(++iLastError > 1) {
     
    240240        }
    241241        return 0;
     242}
     243//******************************************************************************
     244//******************************************************************************
     245static void run_workqueue(struct workqueue_struct *wq)
     246{
     247        unsigned long flags;
     248
     249        spin_lock_irqsave(&wq->lock, flags);
     250        while (!list_empty(&wq->worklist)) {
     251                struct work_struct *work = list_entry(wq->worklist.next,
     252                                                      struct work_struct, entry);
     253                void (*f) (void *) = work->func;
     254                void *data = work->data;
     255
     256                list_del_init(wq->worklist.next);
     257                spin_unlock_irqrestore(&wq->lock, flags);
     258                clear_bit(0, &work->pending);
     259                f(data);
     260                spin_lock_irqsave(&wq->lock, flags);
     261                wake_up(&wq->work_done);
     262        }
     263        spin_unlock_irqrestore(&wq->lock, flags);
    242264}
    243265//******************************************************************************
     
    263285                spin_unlock_irq(&wq->lock);
    264286        }
    265 }
    266 //******************************************************************************
    267 //******************************************************************************
    268 static void run_workqueue(struct workqueue_struct *wq)
    269 {
    270         unsigned long flags;
    271 
    272         spin_lock_irqsave(&wq->lock, flags);
    273         while (!list_empty(&wq->worklist)) {
    274                 struct work_struct *work = list_entry(wq->worklist.next,
    275                                                       struct work_struct, entry);
    276                 void (*f) (void *) = work->func;
    277                 void *data = work->data;
    278 
    279                 list_del_init(wq->worklist.next);
    280                 spin_unlock_irqrestore(&wq->lock, flags);
    281                 clear_bit(0, &work->pending);
    282                 f(data);
    283                 spin_lock_irqsave(&wq->lock, flags);
    284                 wake_up(&wq->work_done);
    285         }
    286         spin_unlock_irqrestore(&wq->lock, flags);
    287287}
    288288//******************************************************************************
  • GPL/trunk/lib32/ossidc.cpp

    r455 r479  
    270270    }
    271271    if((ForceCard == CARD_NONE || ForceCard == CARD_AZX) &&
    272        nrCardsDetected < (OSS32_MAX_AUDIOCARDS-1) && call_module_init(alsa_card_azx_init) == 0) 
     272       nrCardsDetected < (OSS32_MAX_AUDIOCARDS-1) && call_module_init(alsa_card_azx_init) == 0)
    273273    {
    274274        fnCardExitCall[nrCardsDetected] = name_module_exit(alsa_card_azx_exit);
  • GPL/trunk/lib32/sound.c

    r475 r479  
    3636#include <stacktoflat.h>
    3737#include <stdlib.h>
     38#include <proto.h>
    3839#include "soundoss.h"
    3940
     
    11121113
    11131114#ifdef DEBUG
    1114     printk("OSS32_WaveAddBuffer N:%d hw %d app %d avail %d, orig size: %d, size %d\n",CountWv, samples_to_bytes(status.hw_ptr), samples_to_bytes(status.appl_ptr), samples_to_bytes(status.avail), size1, size);
     1115    printk("OSS32_WaveAddBuffer N:%d hw %x app %x avail %x, orig size: %x, size %x\n",CountWv, samples_to_bytes(status.hw_ptr), samples_to_bytes(status.appl_ptr), samples_to_bytes(status.avail), size1, size);
    11151116#endif
    11161117
     
    13251326}
    13261327//******************************************************************************
    1327 //******************************************************************************
    1328 
     1328
  • GPL/trunk/lib32/soundmixer.c

    r457 r479  
    8080};
    8181
    82 static unsigned char LinToLog[OSS32_MAX_VOLUME+1] = { 
     82static unsigned char LinToLog[OSS32_MAX_VOLUME+1] = {
    8383  0,   0,   0,   0,   1,   2,   2,   5,   5,  10,
    84  10,  10,  16,  19,  20,  22,  24,  25,  27,  27, 
    85  28,  28,  29,  30,  30,  35,  35,  35,  39,  39, 
    86  43,  44,  45,  47,  48,  49,  50,  51,  52,  53, 
    87  55,  56,  57,  59,  60,  62,  63,  64,  65,  66, 
     84 10,  10,  16,  19,  20,  22,  24,  25,  27,  27,
     85 28,  28,  29,  30,  30,  35,  35,  35,  39,  39,
     86 43,  44,  45,  47,  48,  49,  50,  51,  52,  53,
     87 55,  56,  57,  59,  60,  62,  63,  64,  65,  66,
    8888 67,  68,  69,  70,  71,  72,  73,  74,  74,  75,
    89  76,  77,  78,  79,  79,  80,  81,  82,  83,  84, 
    90  85,  86,  87,  88,  89,  90,  91,  92,  92,  93, 
    91  93,  94,  94,  95,  95,  96,  96,  97,  97,  98, 
     89 76,  77,  78,  79,  79,  80,  81,  82,  83,  84,
     90 85,  86,  87,  88,  89,  90,  91,  92,  92,  93,
     91 93,  94,  94,  95,  95,  96,  96,  97,  97,  98,
    9292 98,  99,  99,  99,  99, 100, 100, 100, 100, 100,
    9393 100
     
    148148    }
    149149    //retrieve mixer information
    150     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    151                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     150    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     151                                    SNDRV_CTL_IOCTL_CARD_INFO,
    152152                                    (ULONG)&pHandle->info);
    153153    if(ret) {
     
    157157    pHandle->list.offset = 0;
    158158    pHandle->list.space  = 0;
    159     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    160                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     159    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     160                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    161161                                    (ULONG)&pHandle->list);
    162162    if(ret) {
     
    172172    pHandle->list.space  = pHandle->list.count;
    173173    pHandle->list.pids   = pHandle->pids;
    174     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    175                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     174    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     175                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    176176                                    (ULONG)&pHandle->list);
    177177    if(ret) {
     
    188188
    189189    //Extract standard mixer controls from array with control names
    190     for(j=0;j<OSS_MIXER_NRDEVICES;j++) 
     190    for(j=0;j<OSS_MIXER_NRDEVICES;j++)
    191191    {
    192192        int namelen = strlen(ossid[j].name);
     
    197197        pHandle->controls[j].idxCaptureSwitch = -1;
    198198
    199         for(i=0;i<pHandle->list.count;i++) 
     199        for(i=0;i<pHandle->list.count;i++)
    200200        {
    201201            if (pHandle->pids[i].index == ossid[j].index &&
     
    209209                    break;
    210210                }
    211                 else 
    212                 {//first part of the control name is correct; now find out what 
     211                else
     212                {//first part of the control name is correct; now find out what
    213213                 //is it exactly
    214214                    char *nextword = &pHandle->pids[i].name[namelen];
     
    216216
    217217                    if(strncmp(nextword, MIXER_PLAYBACKVOLUME, sizeof(MIXER_PLAYBACKVOLUME)-1) == 0 ||
    218                        strncmp(nextword, MIXER_VOLUME, sizeof(MIXER_VOLUME)-1) == 0) 
     218                       strncmp(nextword, MIXER_VOLUME, sizeof(MIXER_VOLUME)-1) == 0)
    219219                    {//volume control
    220220                        pHandle->controls[j].idxVolume = i;
     
    222222                    else
    223223                    if(strncmp(nextword, MIXER_PLAYBACKSWITCH, sizeof(MIXER_PLAYBACKSWITCH)-1) == 0 ||
    224                        strncmp(nextword, MIXER_SWITCH, sizeof(MIXER_SWITCH)-1) == 0) 
     224                       strncmp(nextword, MIXER_SWITCH, sizeof(MIXER_SWITCH)-1) == 0)
    225225                    {//mute control
    226226                        pHandle->controls[j].idxMute = i;
     
    229229                    }
    230230                    else
    231                     if(strncmp(nextword, MIXER_SOURCE, sizeof(MIXER_SOURCE)-1) == 0) 
     231                    if(strncmp(nextword, MIXER_SOURCE, sizeof(MIXER_SOURCE)-1) == 0)
    232232                    {//source control (e.g. recording source)
    233233                        pHandle->controls[j].idxCustom = i;
     
    235235                    else
    236236                    if(strncmp(nextword, MIXER_CAPTUREROUTE, sizeof(MIXER_CAPTUREROUTE)-1) == 0 ||
    237                        strncmp(nextword, MIXER_CAPTURESWITCH, sizeof(MIXER_CAPTURESWITCH)-1) == 0) 
     237                       strncmp(nextword, MIXER_CAPTURESWITCH, sizeof(MIXER_CAPTURESWITCH)-1) == 0)
    238238                    {//source control for recording (per input)
    239239                        pHandle->controls[j].idxCaptureSwitch = i;
     
    241241                    else
    242242                    if(i == OSS_MIXER_MIC) {
    243                         if(strncmp(nextword, MIXER_BOOST, sizeof(MIXER_BOOST)-1) == 0) 
     243                        if(strncmp(nextword, MIXER_BOOST, sizeof(MIXER_BOOST)-1) == 0)
    244244                        {//mic boost switch
    245245                            pHandle->controls[j].idxCustom = i;
     
    257257
    258258    //request information about available capture sources
    259     if(pHandle->controls[OSS_MIXER_IGAIN].idxCustom != -1) 
     259    if(pHandle->controls[OSS_MIXER_IGAIN].idxCustom != -1)
    260260    {
    261         struct snd_ctl_elem_info  *pElemInfo = NULL; 
     261        struct snd_ctl_elem_info  *pElemInfo = NULL;
    262262        int                   idx, j;
    263263
     
    266266        //set operation to non-blocking
    267267        pHandle->file.f_flags = O_NONBLOCK;
    268        
     268
    269269        pHandle->rectype = RECTYPE_SELECTOR;
    270270
     
    277277
    278278        pElemInfo->value.enumerated.items = 1;
    279         for(i=0;i<pElemInfo->value.enumerated.items;i++) 
     279        for(i=0;i<pElemInfo->value.enumerated.items;i++)
    280280        {
    281281            pElemInfo->value.enumerated.item = i;
     
    307307            pHandle->idxRecCaps[j] = -1;
    308308        }
    309         for(j=0;j<OSS_MIXER_NRDEVICES;j++) 
     309        for(j=0;j<OSS_MIXER_NRDEVICES;j++)
    310310        {
    311311            if(pHandle->controls[j].idxCaptureSwitch != -1) {
     
    364364    //set operation to non-blocking
    365365    pHandle->file.f_flags = O_NONBLOCK;
    366  
     366
    367367    return OSSERR_NOT_SUPPORTED;
    368368}
     
    373373    mixerhandle          *pHandle = (mixerhandle *)streamid;
    374374    struct snd_ctl_elem_value *pElem = NULL;
    375     struct snd_ctl_elem_info  *pElemInfo; 
     375    struct snd_ctl_elem_info  *pElemInfo;
    376376    int                   ret, idx, lVol, rVol = 0, idxMute, cnt;
    377377
     378    dprintf(("OSS32_MixSetVolume line=%d\n", line));
    378379    if(pHandle == NULL || pHandle->magic != MAGIC_MIXER_ALSA32) {
    379380        printk("Invalid handle in OSS32_MixSetVolume\n");
     
    450451        idxMute = pHandle->controls[OSS_MIXER_PHONEOUT].idxMute;
    451452        break;
    452     case OSS32_MIX_VOLUME_HEADPHONE: 
     453    case OSS32_MIX_VOLUME_HEADPHONE:
    453454        idx = pHandle->controls[OSS_MIXER_HEADPHONE].idxVolume;
    454455        idxMute = pHandle->controls[OSS_MIXER_HEADPHONE].idxMute;
     
    557558    mixerhandle          *pHandle = (mixerhandle *)streamid;
    558559    struct snd_ctl_elem_value *pElem = NULL;
    559     struct snd_ctl_elem_info  *pElemInfo; 
     560    struct snd_ctl_elem_info  *pElemInfo;
    560561    int                   ret, idx = -1, lVol, rVol = 0, j, i;
    561562
     
    566567    //set operation to non-blocking
    567568    pHandle->file.f_flags = O_NONBLOCK;
    568  
     569
    569570    //too big to put on the stack
    570571    pElem = (struct snd_ctl_elem_value *)kmalloc(sizeof(struct snd_ctl_elem_value) + sizeof(struct snd_ctl_elem_info), GFP_KERNEL);
     
    591592        else {//capture switch for each input source
    592593            //first turn off all capture switches...
    593             for(j=0;j<OSS32_MIX_RECSRC_MAX;j++) 
     594            for(j=0;j<OSS32_MIX_RECSRC_MAX;j++)
    594595            {
    595596                if(pHandle->idxRecCaps[j] != -1) {
     
    641642
    642643        break;
    643    
     644
    644645    case OSS32_MIX_SWITCH_MICBOOST:
    645646        idx = pHandle->controls[OSS_MIXER_MIC].idxCustom;
     
    729730    //set operation to non-blocking
    730731    pHandle->file.f_flags = O_NONBLOCK;
    731  
     732
    732733    return OSSERR_NOT_SUPPORTED;
    733734}
     
    767768    case OSS_MIXER_BASS:
    768769        return OSS32_MIX_LEVEL_BASS;
    769     case OSS_MIXER_HEADPHONE: 
     770    case OSS_MIXER_HEADPHONE:
    770771        return OSS32_MIX_VOLUME_HEADPHONE;
    771772    case OSS_MIXER_SPEAKER:
     
    792793    pCaps->fuRecCaps  = 0;
    793794
    794     for(i=0;i<OSS_MIXER_NRDEVICES;i++) 
     795    for(i=0;i<OSS_MIXER_NRDEVICES;i++)
    795796    {
    796797        if(pHandle->controls[i].idxVolume != -1) {
    797798            ULONG volidx = OSSToALSAVolume(i);
    798             if(volidx != -1) 
     799            if(volidx != -1)
    799800                pCaps->fuCtrlCaps |= OSS32_MIX_FLAG(volidx);
    800801        }
     
    804805    //then we support intput source selection
    805806    if(pHandle->controls[OSS_MIXER_IGAIN].idxCustom != -1 ||
    806        pHandle->rectype == RECTYPE_SWITCH) 
    807     {       
     807       pHandle->rectype == RECTYPE_SWITCH)
     808    {
    808809        pCaps->fuCtrlCaps |= OSS32_MIX_FLAG(OSS32_MIX_INPUTSRC);
    809810        pCaps->fuRecCaps   = pHandle->reccaps;
     
    843844    }
    844845    //retrieve mixer information
    845     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    846                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     846    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     847                                    SNDRV_CTL_IOCTL_CARD_INFO,
    847848                                    (ULONG)&pHandle->info);
    848849    if(ret) {
     
    904905    }
    905906    //retrieve mixer information
    906     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    907                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     907    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     908                                    SNDRV_CTL_IOCTL_CARD_INFO,
    908909                                    (ULONG)&pHandle->info);
    909910    if(ret) {
  • GPL/trunk/lib32/task.c

    r305 r479  
    4646        t->next = NULL;
    4747        t->sync = 0;
    48         t->func = func;
    49         t->data = data;
     48        t->func = (void *)func; /* DAZ cast added to stop compiler warning */
     49        t->data = (void *)data; /* DAZ cast added to stop compiiler warning */
    5050}
    5151
  • GPL/trunk/uniaud.inc

    r465 r479  
    77# BUILDVERSION must be 3 parts, and only numbers like 5.44.108
    88# It is best that 2'nd number is always 2 digits, eg at least 10
    9 BUILDVERSION = 1.9.21
     9BUILDVERSION = 1.9.22
    1010
    1111# Fixpack version
     
    1313# ex RC3  GA  FIXPACK2 beta_47
    1414# Comment out to avoid a fixpack line in bldlevel
    15 FIXPACK = SVN r465
     15FIXPACK = SVN r478
    1616
    1717# ALSA BUILD VERSION
Note: See TracChangeset for help on using the changeset viewer.