Ignore:
Timestamp:
Oct 8, 2009, 10:35:00 AM (16 years ago)
Author:
Paul Smedley
Message:

Update ALSA kernel to 1.0.21 level

File:
1 edited

Legend:

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

    r426 r464  
    119119        .get = xhandler_get, .put = xhandler_put, \
    120120        .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) }
     121#define SOC_DOUBLE_EXT(xname, xreg, shift_left, shift_right, xmax, xinvert,\
     122         xhandler_get, xhandler_put) \
     123{       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
     124        .info = snd_soc_info_volsw, \
     125        .get = xhandler_get, .put = xhandler_put, \
     126        .private_value = (unsigned long)&(struct soc_mixer_control) \
     127                {.reg = xreg, .shift = shift_left, .rshift = shift_right, \
     128                 .max = xmax, .invert = xinvert} }
    121129#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\
    122130         xhandler_get, xhandler_put, tlv_array) \
     
    128136        .get = xhandler_get, .put = xhandler_put, \
    129137        .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) }
     138#define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\
     139         xhandler_get, xhandler_put, tlv_array) \
     140{       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
     141        .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
     142                 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
     143        .tlv.p = (tlv_array), \
     144        .info = snd_soc_info_volsw, \
     145        .get = xhandler_get, .put = xhandler_put, \
     146        .private_value = (unsigned long)&(struct soc_mixer_control) \
     147                {.reg = xreg, .shift = shift_left, .rshift = shift_right, \
     148                .max = xmax, .invert = xinvert} }
     149#define SOC_DOUBLE_R_EXT_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert,\
     150         xhandler_get, xhandler_put, tlv_array) \
     151{       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
     152        .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
     153                 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
     154        .tlv.p = (tlv_array), \
     155        .info = snd_soc_info_volsw_2r, \
     156        .get = xhandler_get, .put = xhandler_put, \
     157        .private_value = (unsigned long)&(struct soc_mixer_control) \
     158                {.reg = reg_left, .rreg = reg_right, .shift = xshift, \
     159                .max = xmax, .invert = xinvert} }
    130160#define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \
    131161{       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
     
    180210extern struct snd_ac97_bus_ops soc_ac97_ops;
    181211
     212enum snd_soc_control_type {
     213        SND_SOC_CUSTOM,
     214        SND_SOC_I2C,
     215        SND_SOC_SPI,
     216};
     217
    182218int snd_soc_register_platform(struct snd_soc_platform *platform);
    183219void snd_soc_unregister_platform(struct snd_soc_platform *platform);
    184220int snd_soc_register_codec(struct snd_soc_codec *codec);
    185221void snd_soc_unregister_codec(struct snd_soc_codec *codec);
     222int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, int reg);
     223int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
     224                               int addr_bits, int data_bits,
     225                               enum snd_soc_control_type control);
     226
     227#ifdef CONFIG_PM
     228int snd_soc_suspend_device(struct device *dev);
     229int snd_soc_resume_device(struct device *dev);
     230#endif
    186231
    187232/* pcm <-> DAI connect */
     
    207252#endif
    208253
    209 /* codec IO */
    210 #define snd_soc_read(codec, reg) codec->read(codec, reg)
    211 #define snd_soc_write(codec, reg, value) codec->write(codec, reg, value)
    212 
    213254/* codec register bit access */
    214255int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,
    215                                 unsigned short mask, unsigned short value);
     256                                unsigned int mask, unsigned int value);
    216257int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg,
    217                                 unsigned short mask, unsigned short value);
     258                                unsigned int mask, unsigned int value);
    218259
    219260int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
     
    332373        struct mutex mutex;
    333374        struct device *dev;
     375        struct snd_soc_device *socdev;
    334376
    335377        struct list_head list;
     
    352394        int (*display_register)(struct snd_soc_codec *, char *,
    353395                                size_t, unsigned int);
     396        int (*volatile_register)(unsigned int);
     397        int (*readable_register)(unsigned int);
    354398        hw_write_t hw_write;
    355         hw_read_t hw_read;
     399        unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int);
    356400        void *reg_cache;
    357401        short reg_cache_size;
     
    373417        struct dentry *debugfs_reg;
    374418        struct dentry *debugfs_pop_time;
     419        struct dentry *debugfs_dapm;
    375420#endif
    376421};
     
    417462        /* codec/machine specific init - e.g. add machine controls */
    418463        int (*init)(struct snd_soc_codec *codec);
     464
     465        /* Symmetry requirements */
     466        unsigned int symmetric_rates:1;
     467
     468        /* Symmetry data - only valid if symmetry is being enforced */
     469        unsigned int rate;
    419470
    420471        /* DAI pcm */
     
    491542};
    492543
     544/* codec IO */
     545static inline unsigned int snd_soc_read(struct snd_soc_codec *codec,
     546                                        unsigned int reg)
     547{
     548        return codec->read(codec, reg);
     549}
     550
     551static inline unsigned int snd_soc_write(struct snd_soc_codec *codec,
     552                                         unsigned int reg, unsigned int val)
     553{
     554        return codec->write(codec, reg, val);
     555}
     556
    493557#include <sound/soc-dai.h>
    494558
Note: See TracChangeset for help on using the changeset viewer.