Ignore:
Timestamp:
May 9, 2009, 11:45:26 AM (16 years ago)
Author:
Paul Smedley
Message:

Update alsa-kernel to ALSA 1.0.20 level

Location:
GPL/trunk/alsa-kernel/include/sound
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/include/sound/ad1816a.h

    r398 r426  
    170170extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm);
    171171extern int snd_ad1816a_mixer(struct snd_ad1816a *chip);
     172extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device,
     173                             struct snd_timer **rtimer);
    172174
    173175#endif  /* __SOUND_AD1816A_H */
  • GPL/trunk/alsa-kernel/include/sound/asound.h

    r402 r426  
    2424#define __SOUND_ASOUND_H
    2525
     26#include <linux/types.h>
     27
    2628#ifdef __KERNEL__
    2729#include <linux/ioctl.h>
    28 #include <linux/types.h>
    2930#include <linux/time.h>
    3031#include <asm/byteorder.h>
     
    150151};
    151152
    152 enum {
    153         SNDRV_HWDEP_IOCTL_PVERSION = _IOR ('H', 0x00, int),
    154         SNDRV_HWDEP_IOCTL_INFO = _IOR ('H', 0x01, struct snd_hwdep_info),
    155         SNDRV_HWDEP_IOCTL_DSP_STATUS = _IOR('H', 0x02, struct snd_hwdep_dsp_status),
    156         SNDRV_HWDEP_IOCTL_DSP_LOAD   = _IOW('H', 0x03, struct snd_hwdep_dsp_image)
    157 };
     153#define SNDRV_HWDEP_IOCTL_PVERSION      _IOR ('H', 0x00, int)
     154#define SNDRV_HWDEP_IOCTL_INFO          _IOR ('H', 0x01, struct snd_hwdep_info)
     155#define SNDRV_HWDEP_IOCTL_DSP_STATUS    _IOR('H', 0x02, struct snd_hwdep_dsp_status)
     156#define SNDRV_HWDEP_IOCTL_DSP_LOAD      _IOW('H', 0x03, struct snd_hwdep_dsp_image)
    158157
    159158/*****************************************************************************
     
    369368
    370369struct snd_mask {
    371         u_int32_t bits[(SNDRV_MASK_MAX+31)/32];
     370        __u32 bits[(SNDRV_MASK_MAX+31)/32];
    372371};
    373372
     
    412411struct snd_pcm_channel_info {
    413412        unsigned int channel;
    414         off_t offset;                   /* mmap offset */
     413        __kernel_off_t offset;          /* mmap offset */
    415414        unsigned int first;             /* offset to first sample in bits */
    416415        unsigned int step;              /* samples distance in bits */
     
    478477};
    479478
    480 enum {
    481         SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int),
    482         SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct snd_pcm_info),
    483         SNDRV_PCM_IOCTL_TSTAMP = _IOW('A', 0x02, int),
    484         SNDRV_PCM_IOCTL_TTSTAMP = _IOW('A', 0x03, int),
    485         SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct snd_pcm_hw_params),
    486         SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct snd_pcm_hw_params),
    487         SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12),
    488         SNDRV_PCM_IOCTL_SW_PARAMS = _IOWR('A', 0x13, struct snd_pcm_sw_params),
    489         SNDRV_PCM_IOCTL_STATUS = _IOR('A', 0x20, struct snd_pcm_status),
    490         SNDRV_PCM_IOCTL_DELAY = _IOR('A', 0x21, snd_pcm_sframes_t),
    491         SNDRV_PCM_IOCTL_HWSYNC = _IO('A', 0x22),
    492         SNDRV_PCM_IOCTL_SYNC_PTR = _IOWR('A', 0x23, struct snd_pcm_sync_ptr),
    493         SNDRV_PCM_IOCTL_CHANNEL_INFO = _IOR('A', 0x32, struct snd_pcm_channel_info),
    494         SNDRV_PCM_IOCTL_PREPARE = _IO('A', 0x40),
    495         SNDRV_PCM_IOCTL_RESET = _IO('A', 0x41),
    496         SNDRV_PCM_IOCTL_START = _IO('A', 0x42),
    497         SNDRV_PCM_IOCTL_DROP = _IO('A', 0x43),
    498         SNDRV_PCM_IOCTL_DRAIN = _IO('A', 0x44),
    499         SNDRV_PCM_IOCTL_PAUSE = _IOW('A', 0x45, int),
    500         SNDRV_PCM_IOCTL_REWIND = _IOW('A', 0x46, snd_pcm_uframes_t),
    501         SNDRV_PCM_IOCTL_RESUME = _IO('A', 0x47),
    502         SNDRV_PCM_IOCTL_XRUN = _IO('A', 0x48),
    503         SNDRV_PCM_IOCTL_FORWARD = _IOW('A', 0x49, snd_pcm_uframes_t),
    504         SNDRV_PCM_IOCTL_WRITEI_FRAMES = _IOW('A', 0x50, struct snd_xferi),
    505         SNDRV_PCM_IOCTL_READI_FRAMES = _IOR('A', 0x51, struct snd_xferi),
    506         SNDRV_PCM_IOCTL_WRITEN_FRAMES = _IOW('A', 0x52, struct snd_xfern),
    507         SNDRV_PCM_IOCTL_READN_FRAMES = _IOR('A', 0x53, struct snd_xfern),
    508         SNDRV_PCM_IOCTL_LINK = _IOW('A', 0x60, int),
    509         SNDRV_PCM_IOCTL_UNLINK = _IO('A', 0x61),
    510 };
    511 
    512 /* Trick to make alsa-lib/acinclude.m4 happy */
    513 #define SNDRV_PCM_IOCTL_REWIND SNDRV_PCM_IOCTL_REWIND
     479#define SNDRV_PCM_IOCTL_PVERSION        _IOR('A', 0x00, int)
     480#define SNDRV_PCM_IOCTL_INFO            _IOR('A', 0x01, struct snd_pcm_info)
     481#define SNDRV_PCM_IOCTL_TSTAMP          _IOW('A', 0x02, int)
     482#define SNDRV_PCM_IOCTL_TTSTAMP         _IOW('A', 0x03, int)
     483#define SNDRV_PCM_IOCTL_HW_REFINE       _IOWR('A', 0x10, struct snd_pcm_hw_params)
     484#define SNDRV_PCM_IOCTL_HW_PARAMS       _IOWR('A', 0x11, struct snd_pcm_hw_params)
     485#define SNDRV_PCM_IOCTL_HW_FREE         _IO('A', 0x12)
     486#define SNDRV_PCM_IOCTL_SW_PARAMS       _IOWR('A', 0x13, struct snd_pcm_sw_params)
     487#define SNDRV_PCM_IOCTL_STATUS          _IOR('A', 0x20, struct snd_pcm_status)
     488#define SNDRV_PCM_IOCTL_DELAY           _IOR('A', 0x21, snd_pcm_sframes_t)
     489#define SNDRV_PCM_IOCTL_HWSYNC          _IO('A', 0x22)
     490#define SNDRV_PCM_IOCTL_SYNC_PTR        _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
     491#define SNDRV_PCM_IOCTL_CHANNEL_INFO    _IOR('A', 0x32, struct snd_pcm_channel_info)
     492#define SNDRV_PCM_IOCTL_PREPARE         _IO('A', 0x40)
     493#define SNDRV_PCM_IOCTL_RESET           _IO('A', 0x41)
     494#define SNDRV_PCM_IOCTL_START           _IO('A', 0x42)
     495#define SNDRV_PCM_IOCTL_DROP            _IO('A', 0x43)
     496#define SNDRV_PCM_IOCTL_DRAIN           _IO('A', 0x44)
     497#define SNDRV_PCM_IOCTL_PAUSE           _IOW('A', 0x45, int)
     498#define SNDRV_PCM_IOCTL_REWIND          _IOW('A', 0x46, snd_pcm_uframes_t)
     499#define SNDRV_PCM_IOCTL_RESUME          _IO('A', 0x47)
     500#define SNDRV_PCM_IOCTL_XRUN            _IO('A', 0x48)
     501#define SNDRV_PCM_IOCTL_FORWARD         _IOW('A', 0x49, snd_pcm_uframes_t)
     502#define SNDRV_PCM_IOCTL_WRITEI_FRAMES   _IOW('A', 0x50, struct snd_xferi)
     503#define SNDRV_PCM_IOCTL_READI_FRAMES    _IOR('A', 0x51, struct snd_xferi)
     504#define SNDRV_PCM_IOCTL_WRITEN_FRAMES   _IOW('A', 0x52, struct snd_xfern)
     505#define SNDRV_PCM_IOCTL_READN_FRAMES    _IOR('A', 0x53, struct snd_xfern)
     506#define SNDRV_PCM_IOCTL_LINK            _IOW('A', 0x60, int)
     507#define SNDRV_PCM_IOCTL_UNLINK          _IO('A', 0x61)
    514508
    515509/*****************************************************************************
     
    565559};
    566560
    567 enum {
    568         SNDRV_RAWMIDI_IOCTL_PVERSION = _IOR('W', 0x00, int),
    569         SNDRV_RAWMIDI_IOCTL_INFO = _IOR('W', 0x01, struct snd_rawmidi_info),
    570         SNDRV_RAWMIDI_IOCTL_PARAMS = _IOWR('W', 0x10, struct snd_rawmidi_params),
    571         SNDRV_RAWMIDI_IOCTL_STATUS = _IOWR('W', 0x20, struct snd_rawmidi_status),
    572         SNDRV_RAWMIDI_IOCTL_DROP = _IOW('W', 0x30, int),
    573         SNDRV_RAWMIDI_IOCTL_DRAIN = _IOW('W', 0x31, int),
    574 };
     561#define SNDRV_RAWMIDI_IOCTL_PVERSION    _IOR('W', 0x00, int)
     562#define SNDRV_RAWMIDI_IOCTL_INFO        _IOR('W', 0x01, struct snd_rawmidi_info)
     563#define SNDRV_RAWMIDI_IOCTL_PARAMS      _IOWR('W', 0x10, struct snd_rawmidi_params)
     564#define SNDRV_RAWMIDI_IOCTL_STATUS      _IOWR('W', 0x20, struct snd_rawmidi_status)
     565#define SNDRV_RAWMIDI_IOCTL_DROP        _IOW('W', 0x30, int)
     566#define SNDRV_RAWMIDI_IOCTL_DRAIN       _IOW('W', 0x31, int)
    575567
    576568/*
     
    681673};
    682674
    683 enum {
    684         SNDRV_TIMER_IOCTL_PVERSION = _IOR('T', 0x00, int),
    685         SNDRV_TIMER_IOCTL_NEXT_DEVICE = _IOWR('T', 0x01, struct snd_timer_id),
    686         SNDRV_TIMER_IOCTL_TREAD = _IOW('T', 0x02, int),
    687         SNDRV_TIMER_IOCTL_GINFO = _IOWR('T', 0x03, struct snd_timer_ginfo),
    688         SNDRV_TIMER_IOCTL_GPARAMS = _IOW('T', 0x04, struct snd_timer_gparams),
    689         SNDRV_TIMER_IOCTL_GSTATUS = _IOWR('T', 0x05, struct snd_timer_gstatus),
    690         SNDRV_TIMER_IOCTL_SELECT = _IOW('T', 0x10, struct snd_timer_select),
    691         SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct snd_timer_info),
    692         SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct snd_timer_params),
    693         SNDRV_TIMER_IOCTL_STATUS = _IOR('T', 0x14, struct snd_timer_status),
    694         /* The following four ioctls are changed since 1.0.9 due to confliction */
    695         SNDRV_TIMER_IOCTL_START = _IO('T', 0xa0),
    696         SNDRV_TIMER_IOCTL_STOP = _IO('T', 0xa1),
    697         SNDRV_TIMER_IOCTL_CONTINUE = _IO('T', 0xa2),
    698         SNDRV_TIMER_IOCTL_PAUSE = _IO('T', 0xa3),
    699 };
     675#define SNDRV_TIMER_IOCTL_PVERSION      _IOR('T', 0x00, int)
     676#define SNDRV_TIMER_IOCTL_NEXT_DEVICE   _IOWR('T', 0x01, struct snd_timer_id)
     677#define SNDRV_TIMER_IOCTL_TREAD         _IOW('T', 0x02, int)
     678#define SNDRV_TIMER_IOCTL_GINFO         _IOWR('T', 0x03, struct snd_timer_ginfo)
     679#define SNDRV_TIMER_IOCTL_GPARAMS       _IOW('T', 0x04, struct snd_timer_gparams)
     680#define SNDRV_TIMER_IOCTL_GSTATUS       _IOWR('T', 0x05, struct snd_timer_gstatus)
     681#define SNDRV_TIMER_IOCTL_SELECT        _IOW('T', 0x10, struct snd_timer_select)
     682#define SNDRV_TIMER_IOCTL_INFO          _IOR('T', 0x11, struct snd_timer_info)
     683#define SNDRV_TIMER_IOCTL_PARAMS        _IOW('T', 0x12, struct snd_timer_params)
     684#define SNDRV_TIMER_IOCTL_STATUS        _IOR('T', 0x14, struct snd_timer_status)
     685/* The following four ioctls are changed since 1.0.9 due to confliction */
     686#define SNDRV_TIMER_IOCTL_START         _IO('T', 0xa0)
     687#define SNDRV_TIMER_IOCTL_STOP          _IO('T', 0xa1)
     688#define SNDRV_TIMER_IOCTL_CONTINUE      _IO('T', 0xa2)
     689#define SNDRV_TIMER_IOCTL_PAUSE         _IO('T', 0xa3)
    700690
    701691struct snd_timer_read {
     
    816806        unsigned int access;            /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */
    817807        unsigned int count;             /* count of values */
    818         pid_t owner;                    /* owner's PID of this control */
     808        __kernel_pid_t owner;           /* owner's PID of this control */
    819809        union {
    820810                struct {
     
    878868};
    879869
    880 enum {
    881         SNDRV_CTL_IOCTL_PVERSION = _IOR('U', 0x00, int),
    882         SNDRV_CTL_IOCTL_CARD_INFO = _IOR('U', 0x01, struct snd_ctl_card_info),
    883         SNDRV_CTL_IOCTL_ELEM_LIST = _IOWR('U', 0x10, struct snd_ctl_elem_list),
    884         SNDRV_CTL_IOCTL_ELEM_INFO = _IOWR('U', 0x11, struct snd_ctl_elem_info),
    885         SNDRV_CTL_IOCTL_ELEM_READ = _IOWR('U', 0x12, struct snd_ctl_elem_value),
    886         SNDRV_CTL_IOCTL_ELEM_WRITE = _IOWR('U', 0x13, struct snd_ctl_elem_value),
    887         SNDRV_CTL_IOCTL_ELEM_LOCK = _IOW('U', 0x14, struct snd_ctl_elem_id),
    888         SNDRV_CTL_IOCTL_ELEM_UNLOCK = _IOW('U', 0x15, struct snd_ctl_elem_id),
    889         SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS = _IOWR('U', 0x16, int),
    890         SNDRV_CTL_IOCTL_ELEM_ADD = _IOWR('U', 0x17, struct snd_ctl_elem_info),
    891         SNDRV_CTL_IOCTL_ELEM_REPLACE = _IOWR('U', 0x18, struct snd_ctl_elem_info),
    892         SNDRV_CTL_IOCTL_ELEM_REMOVE = _IOWR('U', 0x19, struct snd_ctl_elem_id),
    893         SNDRV_CTL_IOCTL_TLV_READ = _IOWR('U', 0x1a, struct snd_ctl_tlv),
    894         SNDRV_CTL_IOCTL_TLV_WRITE = _IOWR('U', 0x1b, struct snd_ctl_tlv),
    895         SNDRV_CTL_IOCTL_TLV_COMMAND = _IOWR('U', 0x1c, struct snd_ctl_tlv),
    896         SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE = _IOWR('U', 0x20, int),
    897         SNDRV_CTL_IOCTL_HWDEP_INFO = _IOR('U', 0x21, struct snd_hwdep_info),
    898         SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE = _IOR('U', 0x30, int),
    899         SNDRV_CTL_IOCTL_PCM_INFO = _IOWR('U', 0x31, struct snd_pcm_info),
    900         SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE = _IOW('U', 0x32, int),
    901         SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE = _IOWR('U', 0x40, int),
    902         SNDRV_CTL_IOCTL_RAWMIDI_INFO = _IOWR('U', 0x41, struct snd_rawmidi_info),
    903         SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE = _IOW('U', 0x42, int),
    904         SNDRV_CTL_IOCTL_POWER = _IOWR('U', 0xd0, int),
    905         SNDRV_CTL_IOCTL_POWER_STATE = _IOR('U', 0xd1, int),
     870#define SNDRV_CTL_IOCTL_PVERSION        _IOR('U', 0x00, int)
     871#define SNDRV_CTL_IOCTL_CARD_INFO       _IOR('U', 0x01, struct snd_ctl_card_info)
     872#define SNDRV_CTL_IOCTL_ELEM_LIST       _IOWR('U', 0x10, struct snd_ctl_elem_list)
     873#define SNDRV_CTL_IOCTL_ELEM_INFO       _IOWR('U', 0x11, struct snd_ctl_elem_info)
     874#define SNDRV_CTL_IOCTL_ELEM_READ       _IOWR('U', 0x12, struct snd_ctl_elem_value)
     875#define SNDRV_CTL_IOCTL_ELEM_WRITE      _IOWR('U', 0x13, struct snd_ctl_elem_value)
     876#define SNDRV_CTL_IOCTL_ELEM_LOCK       _IOW('U', 0x14, struct snd_ctl_elem_id)
     877#define SNDRV_CTL_IOCTL_ELEM_UNLOCK     _IOW('U', 0x15, struct snd_ctl_elem_id)
     878#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
     879#define SNDRV_CTL_IOCTL_ELEM_ADD        _IOWR('U', 0x17, struct snd_ctl_elem_info)
     880#define SNDRV_CTL_IOCTL_ELEM_REPLACE    _IOWR('U', 0x18, struct snd_ctl_elem_info)
     881#define SNDRV_CTL_IOCTL_ELEM_REMOVE     _IOWR('U', 0x19, struct snd_ctl_elem_id)
     882#define SNDRV_CTL_IOCTL_TLV_READ        _IOWR('U', 0x1a, struct snd_ctl_tlv)
     883#define SNDRV_CTL_IOCTL_TLV_WRITE       _IOWR('U', 0x1b, struct snd_ctl_tlv)
     884#define SNDRV_CTL_IOCTL_TLV_COMMAND     _IOWR('U', 0x1c, struct snd_ctl_tlv)
     885#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
     886#define SNDRV_CTL_IOCTL_HWDEP_INFO      _IOR('U', 0x21, struct snd_hwdep_info)
     887#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int)
     888#define SNDRV_CTL_IOCTL_PCM_INFO        _IOWR('U', 0x31, struct snd_pcm_info)
     889#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
     890#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
     891#define SNDRV_CTL_IOCTL_RAWMIDI_INFO    _IOWR('U', 0x41, struct snd_rawmidi_info)
     892#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
     893#define SNDRV_CTL_IOCTL_POWER           _IOWR('U', 0xd0, int)
     894#define SNDRV_CTL_IOCTL_POWER_STATE     _IOR('U', 0xd1, int)
    906895#ifdef TARGET_OS2
    907         SNDRV_PCM_IOCTL_SETVOLUME = _IOW('A', 0x62, struct snd_pcm_volume),
    908         SNDRV_PCM_IOCTL_GETVOLUME = _IOR('A', 0x63, struct snd_pcm_volume),
     896#define SNDRV_PCM_IOCTL_SETVOLUME       _IOW('A', 0x62, struct snd_pcm_volume)
     897#define SNDRV_PCM_IOCTL_GETVOLUME       _IOR('A', 0x63, struct snd_pcm_volume)
    909898#endif
    910 };
    911899
    912900/*
     
    954942#define SNDRV_CTL_NAME_IEC958(expl,direction,what)      "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what
    955943
    956 /*
    957  *
    958  */
    959 
    960 struct snd_xferv {
    961         const struct iovec *vector;
    962         unsigned long count;
    963 };
    964 
    965 enum {
    966         SNDRV_IOCTL_READV = _IOW('K', 0x00, struct snd_xferv),
    967         SNDRV_IOCTL_WRITEV = _IOW('K', 0x01, struct snd_xferv),
    968 };
    969 
    970944#endif /* __SOUND_ASOUND_H */
  • GPL/trunk/alsa-kernel/include/sound/config.h

    r410 r426  
    422422#endif
    423423
     424typedef unsigned __nocast gfp_t;
     425
    424426#ifndef CONFIG_HAVE_KZALLOC
    425 void *snd_compat_kzalloc(size_t n, unsigned int __nocast gfp_flags);
     427void *snd_compat_kzalloc(size_t n, gfp_t gfp_flags);
    426428#define kzalloc(s,f) snd_compat_kzalloc(s,f)
     429
    427430#endif
    428431
     
    655658#endif
    656659
     660#ifndef DMA_BIT_MASK
     661#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
     662#endif
     663
     664/* memdup_user() wrapper */
     665#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
     666#include <linux/err.h>
     667#include <asm/uaccess.h>
     668static inline void *memdup_user(void __user *src, size_t len)
     669{
     670        void *p = kmalloc(len, GFP_KERNEL);
     671        if (!p)
     672                return ERR_PTR(-ENOMEM);
     673        if (copy_from_user(p, src, len)) {
     674                kfree(p);
     675                return ERR_PTR(-EFAULT);
     676        }
     677        return p;
     678}
     679#endif
     680
     681#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 6)
     682#include <linux/workqueue.h>
     683#ifndef create_singlethread_workqueue
     684#define create_singlethread_workqueue(name) create_workqueue(name)
     685#endif
     686#endif
     687
    657688#endif //__ALSA_CONFIG_H__
  • GPL/trunk/alsa-kernel/include/sound/control.h

    r410 r426  
    184184#define SND_CTL_SLAVE_NEED_UPDATE       (1 << 0)
    185185
     186/**
     187 * snd_ctl_add_slave - Add a virtual slave control
     188 * @master: vmaster element
     189 * @slave: slave element to add
     190 *
     191 * Add a virtual slave control to the given master element created via
     192 * snd_ctl_create_virtual_master() beforehand.
     193 * Returns zero if successful or a negative error code.
     194 *
     195 * All slaves must be the same type (returning the same information
     196 * via info callback).  The fucntion doesn't check it, so it's your
     197 * responsibility.
     198 *
     199 * Also, some additional limitations:
     200 * at most two channels,
     201 * logarithmic volume control (dB level) thus no linear volume,
     202 * master can only attenuate the volume without gain
     203 */
    186204static inline int
    187205snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
     
    190208}
    191209
     210/**
     211 * snd_ctl_add_slave_uncached - Add a virtual slave control
     212 * @master: vmaster element
     213 * @slave: slave element to add
     214 *
     215 * Add a virtual slave control to the given master.
     216 * Unlike snd_ctl_add_slave(), the element added via this function
     217 * is supposed to have volatile values, and get callback is called
     218 * at each time quried from the master.
     219 *
     220 * When the control peeks the hardware values directly and the value
     221 * can be changed by other means than the put callback of the element,
     222 * this function should be used to keep the value always up-to-date.
     223 */
    192224static inline int
    193225snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
  • GPL/trunk/alsa-kernel/include/sound/core.h

    r410 r426  
    101101struct snd_monitor_file {
    102102        struct file *file;
    103         struct snd_monitor_file *next;
    104103#ifndef TARGET_OS2
    105104        const struct file_operations *disconnected_f_op;
     
    107106        struct file_operations *disconnected_f_op;
    108107#endif
    109         struct list_head shutdown_list;
     108        struct list_head shutdown_list; /* still need to shutdown */
     109        struct list_head list;  /* link of monitor files */
    110110};
    111111
     
    142142        struct proc_dir_entry *proc_root_link;  /* number link to real id */
    143143
    144         struct snd_monitor_file *files; /* all files associated to this card */
     144        struct list_head files_list;    /* all files associated to this card */
    145145        struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown
    146146                                                                state */
     
    506506        unsigned short subvendor;       /* PCI subvendor ID */
    507507        unsigned short subdevice;       /* PCI subdevice ID */
     508        unsigned short subdevice_mask;  /* bitmask to match */
    508509        int value;                      /* value */
    509510#ifdef CONFIG_SND_DEBUG_VERBOSE
     
    512513};
    513514
    514 #define _SND_PCI_QUIRK_ID(vend,dev) \
    515         .subvendor = (vend), .subdevice = (dev)
     515#define _SND_PCI_QUIRK_ID_MASK(vend, mask, dev) \
     516        .subvendor = (vend), .subdevice = (dev), .subdevice_mask = (mask)
     517#define _SND_PCI_QUIRK_ID(vend, dev) \
     518        _SND_PCI_QUIRK_ID_MASK(vend, 0xffff, dev)
    516519#define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)}
    517520#ifdef CONFIG_SND_DEBUG_VERBOSE
    518521#define SND_PCI_QUIRK(vend,dev,xname,val) \
    519522        {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)}
     523#define SND_PCI_QUIRK_VENDOR(vend, xname, val)                  \
     524        {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val), .name = (xname)}
     525#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val)                 \
     526        {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev),                       \
     527                        .value = (val), .name = (xname)}
    520528#else
    521529#define SND_PCI_QUIRK(vend,dev,xname,val) \
    522530        {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)}
     531#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val)                 \
     532        {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), .value = (val)}
     533#define SND_PCI_QUIRK_VENDOR(vend, xname, val)                  \
     534        {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)}
    523535#endif
    524536
  • GPL/trunk/alsa-kernel/include/sound/emu10k1.h

    r399 r426  
    11#ifndef __SOUND_EMU10K1_H
    22#define __SOUND_EMU10K1_H
     3
     4#include <linux/types.h>
    35
    46/*
     
    3537#include <linux/interrupt.h>
    3638#include <linux/mutex.h>
     39
    3740#include <asm/io.h>
    3841
     
    21722175
    21732176        DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
    2174         u_int32_t __user *gpr_map;        /* initializers */
     2177        __u32 __user *gpr_map;          /* initializers */
    21752178
    21762179        unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
     
    21852188
    21862189        DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
    2187         u_int32_t __user *tram_data_map;  /* data initializers */
    2188         u_int32_t __user *tram_addr_map;  /* map initializers */
     2190        __u32 __user *tram_data_map;      /* data initializers */
     2191        __u32 __user *tram_addr_map;      /* map initializers */
    21892192
    21902193        DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
    2191         u_int32_t __user *code;           /* one instruction - 64 bits */
     2194        __u32 __user *code;               /* one instruction - 64 bits */
    21922195};
    21932196
  • GPL/trunk/alsa-kernel/include/sound/hdsp.h

    r305 r426  
    1919 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2020 */
     21
     22#include <linux/types.h>
    2123
    2224#define HDSP_MATRIX_MIXER_SIZE 2048
  • GPL/trunk/alsa-kernel/include/sound/hwdep.h

    r305 r426  
    2828struct snd_hwdep;
    2929
     30/* hwdep file ops; all ops can be NULL */
    3031struct snd_hwdep_ops {
    31         long long (*llseek) (struct snd_hwdep *hw, struct file * file, long long offset, int orig);
    32         long (*read) (struct snd_hwdep *hw, char __user *buf, long count, loff_t *offset);
    33         long (*write) (struct snd_hwdep *hw, const char __user *buf, long count, loff_t *offset);
    34         int (*open) (struct snd_hwdep * hw, struct file * file);
    35         int (*release) (struct snd_hwdep *hw, struct file * file);
    36         unsigned int (*poll) (struct snd_hwdep *hw, struct file * file, poll_table * wait);
    37         int (*ioctl) (struct snd_hwdep *hw, struct file * file, unsigned int cmd, unsigned long arg);
    38         int (*ioctl_compat) (struct snd_hwdep *hw, struct file * file, unsigned int cmd, unsigned long arg);
    39         int (*mmap) (struct snd_hwdep *hw, struct file * file, struct vm_area_struct * vma);
    40         int (*dsp_status) (struct snd_hwdep *hw, struct snd_hwdep_dsp_status *status);
    41         int (*dsp_load) (struct snd_hwdep *hw, struct snd_hwdep_dsp_image *image);
     32        long long (*llseek)(struct snd_hwdep *hw, struct file *file,
     33                            long long offset, int orig);
     34        long (*read)(struct snd_hwdep *hw, char __user *buf,
     35                     long count, loff_t *offset);
     36        long (*write)(struct snd_hwdep *hw, const char __user *buf,
     37                      long count, loff_t *offset);
     38        int (*open)(struct snd_hwdep *hw, struct file * file);
     39        int (*release)(struct snd_hwdep *hw, struct file * file);
     40        unsigned int (*poll)(struct snd_hwdep *hw, struct file *file,
     41                             poll_table *wait);
     42        int (*ioctl)(struct snd_hwdep *hw, struct file *file,
     43                     unsigned int cmd, unsigned long arg);
     44        int (*ioctl_compat)(struct snd_hwdep *hw, struct file *file,
     45                            unsigned int cmd, unsigned long arg);
     46        int (*mmap)(struct snd_hwdep *hw, struct file *file,
     47                    struct vm_area_struct *vma);
     48        int (*dsp_status)(struct snd_hwdep *hw,
     49                          struct snd_hwdep_dsp_status *status);
     50        int (*dsp_load)(struct snd_hwdep *hw,
     51                        struct snd_hwdep_dsp_image *image);
    4252};
    4353
     
    6272
    6373        struct mutex open_mutex;
    64         int used;
    65         unsigned int dsp_loaded;
    66         unsigned int exclusive: 1;
     74        int used;                       /* reference counter */
     75        unsigned int dsp_loaded;        /* bit fields of loaded dsp indices */
     76        unsigned int exclusive:1;       /* exclusive access mode */
    6777};
    6878
  • GPL/trunk/alsa-kernel/include/sound/jack.h

    r410 r426  
    5151        const char *id;
    5252        char name[100];
     53        void *private_data;
     54        void (*private_free)(struct snd_jack *);
    5355};
    5456
  • GPL/trunk/alsa-kernel/include/sound/pcm.h

    r399 r426  
    269269        snd_pcm_uframes_t avail_max;
    270270        snd_pcm_uframes_t hw_ptr_base;  /* Position at buffer restart */
    271         snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time*/
     271        snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time */
     272        unsigned long hw_ptr_jiffies;   /* Time when hw_ptr is updated */
    272273
    273274        /* -- HW params -- */
     
    365366        struct snd_timer *timer;                /* timer */
    366367        unsigned timer_running: 1;      /* time is running */
    367         spinlock_t timer_lock;
    368368        /* -- next substream -- */
    369369        struct snd_pcm_substream *next;
     
    456456#endif
    457457
    458 int snd_pcm_new(struct snd_card *card, char *id, int device,
     458int snd_pcm_new(struct snd_card *card, const char *id, int device,
    459459                int playback_count, int capture_count,
    460460                struct snd_pcm **rpcm);
  • GPL/trunk/alsa-kernel/include/sound/rawmidi.h

    r398 r426  
    4343#define SNDRV_RAWMIDI_LFLG_OPEN         (3<<0)
    4444#define SNDRV_RAWMIDI_LFLG_APPEND       (1<<2)
    45 #define SNDRV_RAWMIDI_LFLG_NOOPENLOCK   (1<<3)
    4645
    4746struct snd_rawmidi;
  • GPL/trunk/alsa-kernel/include/sound/sb.h

    r399 r426  
    250250#define SB_ALS4000_ANALOG_BLOCK_CTRL 0x53
    251251#define SB_ALS4000_3D_DELAYLINE_PATTERN 0x54
     252#define SB_ALS4000_CR3_CONFIGURATION    0xc3 /* bit 7 is Digital Loop Enable */
    252253#define SB_ALS4000_QSOUND       0xdb
    253254
     
    331332        SB_MIX_INPUT_SW,
    332333        SB_MIX_CAPTURE_PRO,
    333         SB_MIX_CAPTURE_DT019X
     334        SB_MIX_CAPTURE_DT019X,
     335        SB_MIX_MONO_CAPTURE_ALS4K
    334336};
    335337
  • GPL/trunk/alsa-kernel/include/sound/sfnt_info.h

    r305 r426  
    203203};
    204204
    205 enum {
    206         SNDRV_EMUX_IOCTL_VERSION = _IOR('H', 0x80, unsigned int),
    207         SNDRV_EMUX_IOCTL_LOAD_PATCH = _IOWR('H', 0x81, struct soundfont_patch_info),
    208         SNDRV_EMUX_IOCTL_RESET_SAMPLES = _IO('H', 0x82),
    209         SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES = _IO('H', 0x83),
    210         SNDRV_EMUX_IOCTL_MEM_AVAIL = _IOW('H', 0x84, int),
    211         SNDRV_EMUX_IOCTL_MISC_MODE = _IOWR('H', 0x84, struct snd_emux_misc_mode),
    212 };
     205#define SNDRV_EMUX_IOCTL_VERSION        _IOR('H', 0x80, unsigned int)
     206#define SNDRV_EMUX_IOCTL_LOAD_PATCH     _IOWR('H', 0x81, struct soundfont_patch_info)
     207#define SNDRV_EMUX_IOCTL_RESET_SAMPLES  _IO('H', 0x82)
     208#define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83)
     209#define SNDRV_EMUX_IOCTL_MEM_AVAIL      _IOW('H', 0x84, int)
     210#define SNDRV_EMUX_IOCTL_MISC_MODE      _IOWR('H', 0x84, struct snd_emux_misc_mode)
    213211
    214212#endif /* __SOUND_SFNT_INFO_H */
  • GPL/trunk/alsa-kernel/include/sound/soc-dapm.h

    r410 r426  
    119119        wevent, wflags) \
    120120{       .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \
    121         .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1 \
     121        .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \
    122122        .event = wevent, .event_flags = wflags}
    123123#define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \
     
    193193        .put = snd_soc_dapm_put_value_enum_double, \
    194194        .private_value = (unsigned long)&xenum }
     195#define SOC_DAPM_PIN_SWITCH(xname) \
     196{       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname " Switch", \
     197        .info = snd_soc_dapm_info_pin_switch, \
     198        .get = snd_soc_dapm_get_pin_switch, \
     199        .put = snd_soc_dapm_put_pin_switch, \
     200        .private_value = (unsigned long)xname }
    195201
    196202/* dapm stream operations */
     
    239245int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol,
    240246        struct snd_ctl_elem_value *ucontrol);
     247int snd_soc_dapm_info_pin_switch(struct snd_kcontrol *kcontrol,
     248        struct snd_ctl_elem_info *uinfo);
     249int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol,
     250        struct snd_ctl_elem_value *uncontrol);
     251int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
     252        struct snd_ctl_elem_value *uncontrol);
    241253int snd_soc_dapm_new_control(struct snd_soc_codec *codec,
    242254        const struct snd_soc_dapm_widget *widget);
  • GPL/trunk/alsa-kernel/include/sound/soc.h

    r410 r426  
    1717#include <linux/types.h>
    1818#include <linux/workqueue.h>
     19#include <linux/interrupt.h>
     20#include <linux/kernel.h>
    1921#include <sound/core.h>
    2022#include <sound/pcm.h>
     
    169171struct snd_soc_jack;
    170172struct snd_soc_jack_pin;
     173#ifdef CONFIG_GPIOLIB
     174struct snd_soc_jack_gpio;
     175#endif
    171176
    172177typedef int (*hw_write_t)(void *,const char* ,int);
     
    195200int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
    196201                          struct snd_soc_jack_pin *pins);
     202#ifdef CONFIG_GPIOLIB
     203int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
     204                        struct snd_soc_jack_gpio *gpios);
     205void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
     206                        struct snd_soc_jack_gpio *gpios);
     207#endif
    197208
    198209/* codec IO */
     
    264275        bool invert;
    265276};
     277
     278/**
     279 * struct snd_soc_jack_gpio - Describes a gpio pin for jack detection
     280 *
     281 * @gpio:         gpio number
     282 * @name:         gpio name
     283 * @report:       value to report when jack detected
     284 * @invert:       report presence in low state
     285 * @debouce_time: debouce time in ms
     286 */
     287#ifdef CONFIG_GPIOLIB
     288struct snd_soc_jack_gpio {
     289        unsigned int gpio;
     290        const char *name;
     291        int report;
     292        int invert;
     293        int debounce_time;
     294        struct snd_soc_jack *jack;
     295        struct work_struct work;
     296};
     297#endif
    266298
    267299struct snd_soc_jack {
     
    419451        struct snd_soc_device *socdev;
    420452
     453        struct snd_soc_codec *codec;
     454
    421455        struct snd_soc_platform *platform;
    422456        struct delayed_work delayed_work;
     
    428462        struct device *dev;
    429463        struct snd_soc_card *card;
    430         struct snd_soc_codec *codec;
    431464        struct snd_soc_codec_device *codec_dev;
    432465        void *codec_data;
  • GPL/trunk/alsa-kernel/include/sound/tea575x-tuner.h

    r410 r426  
    2323 */
    2424
    25 #include <linux/videodev.h>
     25#include <linux/videodev2.h>
    2626#include <media/v4l2-dev.h>
     27#include <media/v4l2-ioctl.h>
    2728
    2829struct snd_tea575x;
     
    3637struct snd_tea575x {
    3738        struct snd_card *card;
    38         struct video_device vd;         /* video device */
    39         struct v4l2_file_operations fops;
     39        struct video_device *vd;        /* video device */
    4040        int dev_nr;                     /* requested device number + 1 */
    41         int vd_registered;              /* video device is registered */
    4241        int tea5759;                    /* 5759 chip is present */
     42        int mute;                       /* Device is muted? */
    4343        unsigned int freq_fixup;        /* crystal onboard */
    4444        unsigned int val;               /* hw value */
  • GPL/trunk/alsa-kernel/include/sound/version.h

    r410 r426  
    11/* include/version.h */
    2 #define CONFIG_SND_VERSION "1.0.19"
     2#define CONFIG_SND_VERSION "1.0.20"
    33#define CONFIG_SND_DATE ""
Note: See TracChangeset for help on using the changeset viewer.