linux/sound/pci/es1938.c
<<
>>
Prefs
   1/*
   2 *  Driver for ESS Solo-1 (ES1938, ES1946, ES1969) soundcard
   3 *  Copyright (c) by Jaromir Koutek <miri@punknet.cz>,
   4 *                   Jaroslav Kysela <perex@perex.cz>,
   5 *                   Thomas Sailer <sailer@ife.ee.ethz.ch>,
   6 *                   Abramo Bagnara <abramo@alsa-project.org>,
   7 *                   Markus Gruber <gruber@eikon.tum.de>
   8 * 
   9 * Rewritten from sonicvibes.c source.
  10 *
  11 *  TODO:
  12 *    Rewrite better spinlocks
  13 *
  14 *
  15 *   This program is free software; you can redistribute it and/or modify
  16 *   it under the terms of the GNU General Public License as published by
  17 *   the Free Software Foundation; either version 2 of the License, or
  18 *   (at your option) any later version.
  19 *
  20 *   This program is distributed in the hope that it will be useful,
  21 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  22 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23 *   GNU General Public License for more details.
  24 *
  25 *   You should have received a copy of the GNU General Public License
  26 *   along with this program; if not, write to the Free Software
  27 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  28 *
  29 */
  30
  31/*
  32  NOTES:
  33  - Capture data is written unaligned starting from dma_base + 1 so I need to
  34    disable mmap and to add a copy callback.
  35  - After several cycle of the following:
  36    while : ; do arecord -d1 -f cd -t raw | aplay -f cd ; done
  37    a "playback write error (DMA or IRQ trouble?)" may happen.
  38    This is due to playback interrupts not generated.
  39    I suspect a timing issue.
  40  - Sometimes the interrupt handler is invoked wrongly during playback.
  41    This generates some harmless "Unexpected hw_pointer: wrong interrupt
  42    acknowledge".
  43    I've seen that using small period sizes.
  44    Reproducible with:
  45    mpg123 test.mp3 &
  46    hdparm -t -T /dev/hda
  47*/
  48
  49
  50#include <linux/init.h>
  51#include <linux/interrupt.h>
  52#include <linux/pci.h>
  53#include <linux/slab.h>
  54#include <linux/gameport.h>
  55#include <linux/module.h>
  56#include <linux/delay.h>
  57#include <linux/dma-mapping.h>
  58#include <sound/core.h>
  59#include <sound/control.h>
  60#include <sound/pcm.h>
  61#include <sound/opl3.h>
  62#include <sound/mpu401.h>
  63#include <sound/initval.h>
  64#include <sound/tlv.h>
  65
  66#include <asm/io.h>
  67
  68MODULE_AUTHOR("Jaromir Koutek <miri@punknet.cz>");
  69MODULE_DESCRIPTION("ESS Solo-1");
  70MODULE_LICENSE("GPL");
  71MODULE_SUPPORTED_DEVICE("{{ESS,ES1938},"
  72                "{ESS,ES1946},"
  73                "{ESS,ES1969},"
  74                "{TerraTec,128i PCI}}");
  75
  76#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
  77#define SUPPORT_JOYSTICK 1
  78#endif
  79
  80static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;      /* Index 0-MAX */
  81static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;       /* ID for this card */
  82static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;     /* Enable this card */
  83
  84module_param_array(index, int, NULL, 0444);
  85MODULE_PARM_DESC(index, "Index value for ESS Solo-1 soundcard.");
  86module_param_array(id, charp, NULL, 0444);
  87MODULE_PARM_DESC(id, "ID string for ESS Solo-1 soundcard.");
  88module_param_array(enable, bool, NULL, 0444);
  89MODULE_PARM_DESC(enable, "Enable ESS Solo-1 soundcard.");
  90
  91#define SLIO_REG(chip, x) ((chip)->io_port + ESSIO_REG_##x)
  92
  93#define SLDM_REG(chip, x) ((chip)->ddma_port + ESSDM_REG_##x)
  94
  95#define SLSB_REG(chip, x) ((chip)->sb_port + ESSSB_REG_##x)
  96
  97#define SL_PCI_LEGACYCONTROL            0x40
  98#define SL_PCI_CONFIG                   0x50
  99#define SL_PCI_DDMACONTROL              0x60
 100
 101#define ESSIO_REG_AUDIO2DMAADDR         0
 102#define ESSIO_REG_AUDIO2DMACOUNT        4
 103#define ESSIO_REG_AUDIO2MODE            6
 104#define ESSIO_REG_IRQCONTROL            7
 105
 106#define ESSDM_REG_DMAADDR               0x00
 107#define ESSDM_REG_DMACOUNT              0x04
 108#define ESSDM_REG_DMACOMMAND            0x08
 109#define ESSDM_REG_DMASTATUS             0x08
 110#define ESSDM_REG_DMAMODE               0x0b
 111#define ESSDM_REG_DMACLEAR              0x0d
 112#define ESSDM_REG_DMAMASK               0x0f
 113
 114#define ESSSB_REG_FMLOWADDR             0x00
 115#define ESSSB_REG_FMHIGHADDR            0x02
 116#define ESSSB_REG_MIXERADDR             0x04
 117#define ESSSB_REG_MIXERDATA             0x05
 118
 119#define ESSSB_IREG_AUDIO1               0x14
 120#define ESSSB_IREG_MICMIX               0x1a
 121#define ESSSB_IREG_RECSRC               0x1c
 122#define ESSSB_IREG_MASTER               0x32
 123#define ESSSB_IREG_FM                   0x36
 124#define ESSSB_IREG_AUXACD               0x38
 125#define ESSSB_IREG_AUXB                 0x3a
 126#define ESSSB_IREG_PCSPEAKER            0x3c
 127#define ESSSB_IREG_LINE                 0x3e
 128#define ESSSB_IREG_SPATCONTROL          0x50
 129#define ESSSB_IREG_SPATLEVEL            0x52
 130#define ESSSB_IREG_MASTER_LEFT          0x60
 131#define ESSSB_IREG_MASTER_RIGHT         0x62
 132#define ESSSB_IREG_MPU401CONTROL        0x64
 133#define ESSSB_IREG_MICMIXRECORD         0x68
 134#define ESSSB_IREG_AUDIO2RECORD         0x69
 135#define ESSSB_IREG_AUXACDRECORD         0x6a
 136#define ESSSB_IREG_FMRECORD             0x6b
 137#define ESSSB_IREG_AUXBRECORD           0x6c
 138#define ESSSB_IREG_MONO                 0x6d
 139#define ESSSB_IREG_LINERECORD           0x6e
 140#define ESSSB_IREG_MONORECORD           0x6f
 141#define ESSSB_IREG_AUDIO2SAMPLE         0x70
 142#define ESSSB_IREG_AUDIO2MODE           0x71
 143#define ESSSB_IREG_AUDIO2FILTER         0x72
 144#define ESSSB_IREG_AUDIO2TCOUNTL        0x74
 145#define ESSSB_IREG_AUDIO2TCOUNTH        0x76
 146#define ESSSB_IREG_AUDIO2CONTROL1       0x78
 147#define ESSSB_IREG_AUDIO2CONTROL2       0x7a
 148#define ESSSB_IREG_AUDIO2               0x7c
 149
 150#define ESSSB_REG_RESET                 0x06
 151
 152#define ESSSB_REG_READDATA              0x0a
 153#define ESSSB_REG_WRITEDATA             0x0c
 154#define ESSSB_REG_READSTATUS            0x0c
 155
 156#define ESSSB_REG_STATUS                0x0e
 157
 158#define ESS_CMD_EXTSAMPLERATE           0xa1
 159#define ESS_CMD_FILTERDIV               0xa2
 160#define ESS_CMD_DMACNTRELOADL           0xa4
 161#define ESS_CMD_DMACNTRELOADH           0xa5
 162#define ESS_CMD_ANALOGCONTROL           0xa8
 163#define ESS_CMD_IRQCONTROL              0xb1
 164#define ESS_CMD_DRQCONTROL              0xb2
 165#define ESS_CMD_RECLEVEL                0xb4
 166#define ESS_CMD_SETFORMAT               0xb6
 167#define ESS_CMD_SETFORMAT2              0xb7
 168#define ESS_CMD_DMACONTROL              0xb8
 169#define ESS_CMD_DMATYPE                 0xb9
 170#define ESS_CMD_OFFSETLEFT              0xba    
 171#define ESS_CMD_OFFSETRIGHT             0xbb
 172#define ESS_CMD_READREG                 0xc0
 173#define ESS_CMD_ENABLEEXT               0xc6
 174#define ESS_CMD_PAUSEDMA                0xd0
 175#define ESS_CMD_ENABLEAUDIO1            0xd1
 176#define ESS_CMD_STOPAUDIO1              0xd3
 177#define ESS_CMD_AUDIO1STATUS            0xd8
 178#define ESS_CMD_CONTDMA                 0xd4
 179#define ESS_CMD_TESTIRQ                 0xf2
 180
 181#define ESS_RECSRC_MIC          0
 182#define ESS_RECSRC_AUXACD       2
 183#define ESS_RECSRC_AUXB         5
 184#define ESS_RECSRC_LINE         6
 185#define ESS_RECSRC_NONE         7
 186
 187#define DAC1 0x01
 188#define ADC1 0x02
 189#define DAC2 0x04
 190
 191/*
 192
 193 */
 194
 195#define SAVED_REG_SIZE  32 /* max. number of registers to save */
 196
 197struct es1938 {
 198        int irq;
 199
 200        unsigned long io_port;
 201        unsigned long sb_port;
 202        unsigned long vc_port;
 203        unsigned long mpu_port;
 204        unsigned long game_port;
 205        unsigned long ddma_port;
 206
 207        unsigned char irqmask;
 208        unsigned char revision;
 209
 210        struct snd_kcontrol *hw_volume;
 211        struct snd_kcontrol *hw_switch;
 212        struct snd_kcontrol *master_volume;
 213        struct snd_kcontrol *master_switch;
 214
 215        struct pci_dev *pci;
 216        struct snd_card *card;
 217        struct snd_pcm *pcm;
 218        struct snd_pcm_substream *capture_substream;
 219        struct snd_pcm_substream *playback1_substream;
 220        struct snd_pcm_substream *playback2_substream;
 221        struct snd_rawmidi *rmidi;
 222
 223        unsigned int dma1_size;
 224        unsigned int dma2_size;
 225        unsigned int dma1_start;
 226        unsigned int dma2_start;
 227        unsigned int dma1_shift;
 228        unsigned int dma2_shift;
 229        unsigned int last_capture_dmaaddr;
 230        unsigned int active;
 231
 232        spinlock_t reg_lock;
 233        spinlock_t mixer_lock;
 234        struct snd_info_entry *proc_entry;
 235
 236#ifdef SUPPORT_JOYSTICK
 237        struct gameport *gameport;
 238#endif
 239#ifdef CONFIG_PM
 240        unsigned char saved_regs[SAVED_REG_SIZE];
 241#endif
 242};
 243
 244static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id);
 245
 246static DEFINE_PCI_DEVICE_TABLE(snd_es1938_ids) = {
 247        { PCI_VDEVICE(ESS, 0x1969), 0, },   /* Solo-1 */
 248        { 0, }
 249};
 250
 251MODULE_DEVICE_TABLE(pci, snd_es1938_ids);
 252
 253#define RESET_LOOP_TIMEOUT      0x10000
 254#define WRITE_LOOP_TIMEOUT      0x10000
 255#define GET_LOOP_TIMEOUT        0x01000
 256
 257#undef REG_DEBUG
 258/* -----------------------------------------------------------------
 259 * Write to a mixer register
 260 * -----------------------------------------------------------------*/
 261static void snd_es1938_mixer_write(struct es1938 *chip, unsigned char reg, unsigned char val)
 262{
 263        unsigned long flags;
 264        spin_lock_irqsave(&chip->mixer_lock, flags);
 265        outb(reg, SLSB_REG(chip, MIXERADDR));
 266        outb(val, SLSB_REG(chip, MIXERDATA));
 267        spin_unlock_irqrestore(&chip->mixer_lock, flags);
 268#ifdef REG_DEBUG
 269        snd_printk(KERN_DEBUG "Mixer reg %02x set to %02x\n", reg, val);
 270#endif
 271}
 272
 273/* -----------------------------------------------------------------
 274 * Read from a mixer register
 275 * -----------------------------------------------------------------*/
 276static int snd_es1938_mixer_read(struct es1938 *chip, unsigned char reg)
 277{
 278        int data;
 279        unsigned long flags;
 280        spin_lock_irqsave(&chip->mixer_lock, flags);
 281        outb(reg, SLSB_REG(chip, MIXERADDR));
 282        data = inb(SLSB_REG(chip, MIXERDATA));
 283        spin_unlock_irqrestore(&chip->mixer_lock, flags);
 284#ifdef REG_DEBUG
 285        snd_printk(KERN_DEBUG "Mixer reg %02x now is %02x\n", reg, data);
 286#endif
 287        return data;
 288}
 289
 290/* -----------------------------------------------------------------
 291 * Write to some bits of a mixer register (return old value)
 292 * -----------------------------------------------------------------*/
 293static int snd_es1938_mixer_bits(struct es1938 *chip, unsigned char reg,
 294                                 unsigned char mask, unsigned char val)
 295{
 296        unsigned long flags;
 297        unsigned char old, new, oval;
 298        spin_lock_irqsave(&chip->mixer_lock, flags);
 299        outb(reg, SLSB_REG(chip, MIXERADDR));
 300        old = inb(SLSB_REG(chip, MIXERDATA));
 301        oval = old & mask;
 302        if (val != oval) {
 303                new = (old & ~mask) | (val & mask);
 304                outb(new, SLSB_REG(chip, MIXERDATA));
 305#ifdef REG_DEBUG
 306                snd_printk(KERN_DEBUG "Mixer reg %02x was %02x, set to %02x\n",
 307                           reg, old, new);
 308#endif
 309        }
 310        spin_unlock_irqrestore(&chip->mixer_lock, flags);
 311        return oval;
 312}
 313
 314/* -----------------------------------------------------------------
 315 * Write command to Controller Registers
 316 * -----------------------------------------------------------------*/
 317static void snd_es1938_write_cmd(struct es1938 *chip, unsigned char cmd)
 318{
 319        int i;
 320        unsigned char v;
 321        for (i = 0; i < WRITE_LOOP_TIMEOUT; i++) {
 322                if (!(v = inb(SLSB_REG(chip, READSTATUS)) & 0x80)) {
 323                        outb(cmd, SLSB_REG(chip, WRITEDATA));
 324                        return;
 325                }
 326        }
 327        printk(KERN_ERR "snd_es1938_write_cmd timeout (0x02%x/0x02%x)\n", cmd, v);
 328}
 329
 330/* -----------------------------------------------------------------
 331 * Read the Read Data Buffer
 332 * -----------------------------------------------------------------*/
 333static int snd_es1938_get_byte(struct es1938 *chip)
 334{
 335        int i;
 336        unsigned char v;
 337        for (i = GET_LOOP_TIMEOUT; i; i--)
 338                if ((v = inb(SLSB_REG(chip, STATUS))) & 0x80)
 339                        return inb(SLSB_REG(chip, READDATA));
 340        snd_printk(KERN_ERR "get_byte timeout: status 0x02%x\n", v);
 341        return -ENODEV;
 342}
 343
 344/* -----------------------------------------------------------------
 345 * Write value cmd register
 346 * -----------------------------------------------------------------*/
 347static void snd_es1938_write(struct es1938 *chip, unsigned char reg, unsigned char val)
 348{
 349        unsigned long flags;
 350        spin_lock_irqsave(&chip->reg_lock, flags);
 351        snd_es1938_write_cmd(chip, reg);
 352        snd_es1938_write_cmd(chip, val);
 353        spin_unlock_irqrestore(&chip->reg_lock, flags);
 354#ifdef REG_DEBUG
 355        snd_printk(KERN_DEBUG "Reg %02x set to %02x\n", reg, val);
 356#endif
 357}
 358
 359/* -----------------------------------------------------------------
 360 * Read data from cmd register and return it
 361 * -----------------------------------------------------------------*/
 362static unsigned char snd_es1938_read(struct es1938 *chip, unsigned char reg)
 363{
 364        unsigned char val;
 365        unsigned long flags;
 366        spin_lock_irqsave(&chip->reg_lock, flags);
 367        snd_es1938_write_cmd(chip, ESS_CMD_READREG);
 368        snd_es1938_write_cmd(chip, reg);
 369        val = snd_es1938_get_byte(chip);
 370        spin_unlock_irqrestore(&chip->reg_lock, flags);
 371#ifdef REG_DEBUG
 372        snd_printk(KERN_DEBUG "Reg %02x now is %02x\n", reg, val);
 373#endif
 374        return val;
 375}
 376
 377/* -----------------------------------------------------------------
 378 * Write data to cmd register and return old value
 379 * -----------------------------------------------------------------*/
 380static int snd_es1938_bits(struct es1938 *chip, unsigned char reg, unsigned char mask,
 381                           unsigned char val)
 382{
 383        unsigned long flags;
 384        unsigned char old, new, oval;
 385        spin_lock_irqsave(&chip->reg_lock, flags);
 386        snd_es1938_write_cmd(chip, ESS_CMD_READREG);
 387        snd_es1938_write_cmd(chip, reg);
 388        old = snd_es1938_get_byte(chip);
 389        oval = old & mask;
 390        if (val != oval) {
 391                snd_es1938_write_cmd(chip, reg);
 392                new = (old & ~mask) | (val & mask);
 393                snd_es1938_write_cmd(chip, new);
 394#ifdef REG_DEBUG
 395                snd_printk(KERN_DEBUG "Reg %02x was %02x, set to %02x\n",
 396                           reg, old, new);
 397#endif
 398        }
 399        spin_unlock_irqrestore(&chip->reg_lock, flags);
 400        return oval;
 401}
 402
 403/* --------------------------------------------------------------------
 404 * Reset the chip
 405 * --------------------------------------------------------------------*/
 406static void snd_es1938_reset(struct es1938 *chip)
 407{
 408        int i;
 409
 410        outb(3, SLSB_REG(chip, RESET));
 411        inb(SLSB_REG(chip, RESET));
 412        outb(0, SLSB_REG(chip, RESET));
 413        for (i = 0; i < RESET_LOOP_TIMEOUT; i++) {
 414                if (inb(SLSB_REG(chip, STATUS)) & 0x80) {
 415                        if (inb(SLSB_REG(chip, READDATA)) == 0xaa)
 416                                goto __next;
 417                }
 418        }
 419        snd_printk(KERN_ERR "ESS Solo-1 reset failed\n");
 420
 421     __next:
 422        snd_es1938_write_cmd(chip, ESS_CMD_ENABLEEXT);
 423
 424        /* Demand transfer DMA: 4 bytes per DMA request */
 425        snd_es1938_write(chip, ESS_CMD_DMATYPE, 2);
 426
 427        /* Change behaviour of register A1
 428           4x oversampling
 429           2nd channel DAC asynchronous */                                                      
 430        snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2MODE, 0x32);
 431        /* enable/select DMA channel and IRQ channel */
 432        snd_es1938_bits(chip, ESS_CMD_IRQCONTROL, 0xf0, 0x50);
 433        snd_es1938_bits(chip, ESS_CMD_DRQCONTROL, 0xf0, 0x50);
 434        snd_es1938_write_cmd(chip, ESS_CMD_ENABLEAUDIO1);
 435        /* Set spatializer parameters to recommended values */
 436        snd_es1938_mixer_write(chip, 0x54, 0x8f);
 437        snd_es1938_mixer_write(chip, 0x56, 0x95);
 438        snd_es1938_mixer_write(chip, 0x58, 0x94);
 439        snd_es1938_mixer_write(chip, 0x5a, 0x80);
 440}
 441
 442/* --------------------------------------------------------------------
 443 * Reset the FIFOs
 444 * --------------------------------------------------------------------*/
 445static void snd_es1938_reset_fifo(struct es1938 *chip)
 446{
 447        outb(2, SLSB_REG(chip, RESET));
 448        outb(0, SLSB_REG(chip, RESET));
 449}
 450
 451static struct snd_ratnum clocks[2] = {
 452        {
 453                .num = 793800,
 454                .den_min = 1,
 455                .den_max = 128,
 456                .den_step = 1,
 457        },
 458        {
 459                .num = 768000,
 460                .den_min = 1,
 461                .den_max = 128,
 462                .den_step = 1,
 463        }
 464};
 465
 466static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = {
 467        .nrats = 2,
 468        .rats = clocks,
 469};
 470
 471
 472static void snd_es1938_rate_set(struct es1938 *chip, 
 473                                struct snd_pcm_substream *substream,
 474                                int mode)
 475{
 476        unsigned int bits, div0;
 477        struct snd_pcm_runtime *runtime = substream->runtime;
 478        if (runtime->rate_num == clocks[0].num)
 479                bits = 128 - runtime->rate_den;
 480        else
 481                bits = 256 - runtime->rate_den;
 482
 483        /* set filter register */
 484        div0 = 256 - 7160000*20/(8*82*runtime->rate);
 485                
 486        if (mode == DAC2) {
 487                snd_es1938_mixer_write(chip, 0x70, bits);
 488                snd_es1938_mixer_write(chip, 0x72, div0);
 489        } else {
 490                snd_es1938_write(chip, 0xA1, bits);
 491                snd_es1938_write(chip, 0xA2, div0);
 492        }
 493}
 494
 495/* --------------------------------------------------------------------
 496 * Configure Solo1 builtin DMA Controller
 497 * --------------------------------------------------------------------*/
 498
 499static void snd_es1938_playback1_setdma(struct es1938 *chip)
 500{
 501        outb(0x00, SLIO_REG(chip, AUDIO2MODE));
 502        outl(chip->dma2_start, SLIO_REG(chip, AUDIO2DMAADDR));
 503        outw(0, SLIO_REG(chip, AUDIO2DMACOUNT));
 504        outw(chip->dma2_size, SLIO_REG(chip, AUDIO2DMACOUNT));
 505}
 506
 507static void snd_es1938_playback2_setdma(struct es1938 *chip)
 508{
 509        /* Enable DMA controller */
 510        outb(0xc4, SLDM_REG(chip, DMACOMMAND));
 511        /* 1. Master reset */
 512        outb(0, SLDM_REG(chip, DMACLEAR));
 513        /* 2. Mask DMA */
 514        outb(1, SLDM_REG(chip, DMAMASK));
 515        outb(0x18, SLDM_REG(chip, DMAMODE));
 516        outl(chip->dma1_start, SLDM_REG(chip, DMAADDR));
 517        outw(chip->dma1_size - 1, SLDM_REG(chip, DMACOUNT));
 518        /* 3. Unmask DMA */
 519        outb(0, SLDM_REG(chip, DMAMASK));
 520}
 521
 522static void snd_es1938_capture_setdma(struct es1938 *chip)
 523{
 524        /* Enable DMA controller */
 525        outb(0xc4, SLDM_REG(chip, DMACOMMAND));
 526        /* 1. Master reset */
 527        outb(0, SLDM_REG(chip, DMACLEAR));
 528        /* 2. Mask DMA */
 529        outb(1, SLDM_REG(chip, DMAMASK));
 530        outb(0x14, SLDM_REG(chip, DMAMODE));
 531        outl(chip->dma1_start, SLDM_REG(chip, DMAADDR));
 532        chip->last_capture_dmaaddr = chip->dma1_start;
 533        outw(chip->dma1_size - 1, SLDM_REG(chip, DMACOUNT));
 534        /* 3. Unmask DMA */
 535        outb(0, SLDM_REG(chip, DMAMASK));
 536}
 537
 538/* ----------------------------------------------------------------------
 539 *
 540 *                           *** PCM part ***
 541 */
 542
 543static int snd_es1938_capture_trigger(struct snd_pcm_substream *substream,
 544                                      int cmd)
 545{
 546        struct es1938 *chip = snd_pcm_substream_chip(substream);
 547        int val;
 548        switch (cmd) {
 549        case SNDRV_PCM_TRIGGER_START:
 550        case SNDRV_PCM_TRIGGER_RESUME:
 551                val = 0x0f;
 552                chip->active |= ADC1;
 553                break;
 554        case SNDRV_PCM_TRIGGER_STOP:
 555        case SNDRV_PCM_TRIGGER_SUSPEND:
 556                val = 0x00;
 557                chip->active &= ~ADC1;
 558                break;
 559        default:
 560                return -EINVAL;
 561        }
 562        snd_es1938_write(chip, ESS_CMD_DMACONTROL, val);
 563        return 0;
 564}
 565
 566static int snd_es1938_playback1_trigger(struct snd_pcm_substream *substream,
 567                                        int cmd)
 568{
 569        struct es1938 *chip = snd_pcm_substream_chip(substream);
 570        switch (cmd) {
 571        case SNDRV_PCM_TRIGGER_START:
 572        case SNDRV_PCM_TRIGGER_RESUME:
 573                /* According to the documentation this should be:
 574                   0x13 but that value may randomly swap stereo channels */
 575                snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2CONTROL1, 0x92);
 576                udelay(10);
 577                snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2CONTROL1, 0x93);
 578                /* This two stage init gives the FIFO -> DAC connection time to
 579                 * settle before first data from DMA flows in.  This should ensure
 580                 * no swapping of stereo channels.  Report a bug if otherwise :-) */
 581                outb(0x0a, SLIO_REG(chip, AUDIO2MODE));
 582                chip->active |= DAC2;
 583                break;
 584        case SNDRV_PCM_TRIGGER_STOP:
 585        case SNDRV_PCM_TRIGGER_SUSPEND:
 586                outb(0, SLIO_REG(chip, AUDIO2MODE));
 587                snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2CONTROL1, 0);
 588                chip->active &= ~DAC2;
 589                break;
 590        default:
 591                return -EINVAL;
 592        }
 593        return 0;
 594}
 595
 596static int snd_es1938_playback2_trigger(struct snd_pcm_substream *substream,
 597                                        int cmd)
 598{
 599        struct es1938 *chip = snd_pcm_substream_chip(substream);
 600        int val;
 601        switch (cmd) {
 602        case SNDRV_PCM_TRIGGER_START:
 603        case SNDRV_PCM_TRIGGER_RESUME:
 604                val = 5;
 605                chip->active |= DAC1;
 606                break;
 607        case SNDRV_PCM_TRIGGER_STOP:
 608        case SNDRV_PCM_TRIGGER_SUSPEND:
 609                val = 0;
 610                chip->active &= ~DAC1;
 611                break;
 612        default:
 613                return -EINVAL;
 614        }
 615        snd_es1938_write(chip, ESS_CMD_DMACONTROL, val);
 616        return 0;
 617}
 618
 619static int snd_es1938_playback_trigger(struct snd_pcm_substream *substream,
 620                                       int cmd)
 621{
 622        switch (substream->number) {
 623        case 0:
 624                return snd_es1938_playback1_trigger(substream, cmd);
 625        case 1:
 626                return snd_es1938_playback2_trigger(substream, cmd);
 627        }
 628        snd_BUG();
 629        return -EINVAL;
 630}
 631
 632/* --------------------------------------------------------------------
 633 * First channel for Extended Mode Audio 1 ADC Operation
 634 * --------------------------------------------------------------------*/
 635static int snd_es1938_capture_prepare(struct snd_pcm_substream *substream)
 636{
 637        struct es1938 *chip = snd_pcm_substream_chip(substream);
 638        struct snd_pcm_runtime *runtime = substream->runtime;
 639        int u, is8, mono;
 640        unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 641        unsigned int count = snd_pcm_lib_period_bytes(substream);
 642
 643        chip->dma1_size = size;
 644        chip->dma1_start = runtime->dma_addr;
 645
 646        mono = (runtime->channels > 1) ? 0 : 1;
 647        is8 = snd_pcm_format_width(runtime->format) == 16 ? 0 : 1;
 648        u = snd_pcm_format_unsigned(runtime->format);
 649
 650        chip->dma1_shift = 2 - mono - is8;
 651
 652        snd_es1938_reset_fifo(chip);
 653        
 654        /* program type */
 655        snd_es1938_bits(chip, ESS_CMD_ANALOGCONTROL, 0x03, (mono ? 2 : 1));
 656
 657        /* set clock and counters */
 658        snd_es1938_rate_set(chip, substream, ADC1);
 659
 660        count = 0x10000 - count;
 661        snd_es1938_write(chip, ESS_CMD_DMACNTRELOADL, count & 0xff);
 662        snd_es1938_write(chip, ESS_CMD_DMACNTRELOADH, count >> 8);
 663
 664        /* initialize and configure ADC */
 665        snd_es1938_write(chip, ESS_CMD_SETFORMAT2, u ? 0x51 : 0x71);
 666        snd_es1938_write(chip, ESS_CMD_SETFORMAT2, 0x90 | 
 667                       (u ? 0x00 : 0x20) | 
 668                       (is8 ? 0x00 : 0x04) | 
 669                       (mono ? 0x40 : 0x08));
 670
 671        //      snd_es1938_reset_fifo(chip);    
 672
 673        /* 11. configure system interrupt controller and DMA controller */
    674" class="line" name="L63="sre74        snd_es1938_capture_setdma(chip);
 675
 676        return 0;
 677}
 678
 679
 680/* ------------------------------------------------------------------------------
 681 * Second Audio channel DAC Operation
 682 * ------------------------------------------------------------------------------*/
 683static int snd_es1938_playback1_prepare(struct snd_pcm_substream *substream)
 684{
 685        struct es1938 *chip = snd_pcm_substream_chip(substream);
 686        struct snd_pcm_runtime *runtime = substream->runtime;
 687        int u, is8, mono;
 688        unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 689        unsigned int count = snd_pcm_lib_period_bytes(substream);
 690
 691        chip->dma2_size = size;
 692        chip->dma2_start = runtime->dma_addr;
 693
 694        mono = (runtime->channels > 1) ? 0 : 1;
 695        is8 = snd_pcm_format_width(runtime->format) == 16 ? 0 : 1;
 696        u = snd_pcm_format_unsigned(runtime->format);
 697
 698        chip->dma2_shift = 2 - mono - is8;
 699
 700        snd_es1938_reset_fifo(chip);
 701
 702        /* set clock and counters */
 703        snd_es1938_rate_set(chip, substream, DAC2);
 704
 705        count >>= 1;
 706        count = 0x10000 - count;
 707        snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2TCOUNTL, count & 0xff);
 708        snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2TCOUNTH, count >> 8);
 709
 710        /* initialize and configure Audio 2 DAC */
 711        snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2CONTROL2, 0x40 | (u ? 0 : 4) |
 712                               (mono ? 0 : 2) | (is8 ? 0 : 1));
 713
 714        /* program DMA */
 715        snd_es1938_playback1_setdma(chip);
 716        
 717        return 0;
 718}
 719
 720static int snd_es1938_playback2_prepare(struct snd_pcm_substream *substream)
 721{
 722        struct es1938 *chip = snd_pcm_substream_chip(substream);
 723        struct snd_pcm_runtime *runtime = substream->runtime;
 724        int u, is8, mono;
 725        unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 726        unsigned int count = snd_pcm_lib_period_bytes(substream);
 727
 728        chip->dma1_size = size;
 729        chip->dma1_start = runtime->dma_addr;
 730
 731        mono = (runtime->channels > 1) ? 0 : 1;
 732        is8 = snd_pcm_format_width(runtime->format) == 16 ? 0 : 1;
 733        u = snd_pcm_format_unsigned(runtime->format);
 734
 735        chip->dma1_shift = 2 - mono - is8;
 736
 737        count = 0x10000 - count;
 738 
 739        /* reset */
 740        snd_es1938_reset_fifo(chip);
 741        
 742        snd_es1938_bits(chip, ESS_CMD_ANALOGCONTROL, 0x03, (mono ? 2 : 1));
 743
 744        /* set clock and counters */
 745        snd_es1938_rate_set(chip, substream, DAC1);
 746        snd_es1938_write(chip, ESS_CMD_DMACNTRELOADL, count & 0xff);
 747        snd_es1938_write(chip, ESS_CMD_DMACNTRELOADH, count >> 8);
 748
 749        /* initialized and configure DAC */
 750        snd_es1938_write(chip, ESS_CMD_SETFORMAT, u ? 0x80 : 0x00);
 751        snd_es1938_write(chip, ESS_CMD_SETFORMAT, u ? 0x51 : 0x71);
 752        snd_es1938_write(chip, ESS_CMD_SETFORMAT2, 
 753                         0x90 | (mono ? 0x40 : 0x08) |
 754                         (is8 ? 0x00 : 0x04) | (u ? 0x00 : 0x20));
 755
 756        /* program DMA */
 757        snd_es1938_playback2_setdma(chip);
 758        
 759        return 0;
 760}
 761
 762static int snd_es1938_playback_prepare(struct snd_pcm_substream *substream)
 763{
 7 href= 622        switch (substream->number) {
 663        case 0:
 626                return snd_es1938_playback1od_bytes(substream);
 607        case 1:
 668                return snd_es1938_playback2od_bytes(substream);
 66760"> 760}
 750        snd_BUG();
 679        return -EINVAL;
 760}
 743
    674" class="7ine" 77me="L634"> 634/*regisloc*reads somess="srogram DMA */
 682 s garbage. To ensed aa valid hw poigure, the7following checks whichrogram DMA */
 682
 682/*s="sess762 the7valid ">/*range ?rogram DMA */
 682/*s="sess7t controll cloc poiguing to the782/*m_li ?rogram DMA */
 682 argue thik could dind_p*m_ one7m_li depending on which*regisloc*isrogram DMA */
 680
 681
 7e(struct snd_es1oigureback2_prepare" class="sref">snd_es1oigureyback_prepare(struct snd_pcm_substream *substream)
 763{
 7 h        struct es1938 *chip = snd_pcm_substream_chip(substream);
 745        EINVAL;
EINVAL;
 757        chip, EINVAL;
 68634"> 634
 729        chip = (chip, UN_CMD_SETFORMAT" ref">UN_ef">ssubstream);
 75while (938_write(chip = (chip, UN_CMD_SETFORMAT" ref">UN_ef">ss) !ef">chip =  69729"> 729        chip = EINVAL;
 692        chip = chip->d- 1/a> = 0x10000 - EINVAL;
EINVAL;
 694        count;
 725        unsigned int count;
 736
 757        chip = (chip, ssubstream);
 698        count = (chip, UN_CMD_SETFORMAT" ref">UN_ef">ssubstream);
 729        chip = chip->dm+f">chip = chip->d- 7         = 0x10000 - count;
 730
 69if 938_write(chip = chip->d730"> 730
 712 || 7        chip = chip->d+">chip = chip->substream)
 753<2        chip = chip->snd_esclaf="+code=dma_addr" 82snd_esclaf="+="sre> 69729"> 72934"> 634
 69else">EINVAL;
 70735        chip->snd_esclaf="+code=dma_addr" 82snd_esclaf="+="srref">chip =  69729"> 72934"> 634/* reset */
 736
 707        chip = chip->def">count;
count;
 759  7        chip = chip->def">count;
 760}
 761
 7e(struct snd_es193oigureback2_prepare" class="sref">snd_es193oigureyback_prepare(struct snd_pcm_substream *substream)
 763{
 7 h        struct es1938 *chip = snd_pcm_substream_chip(substream){
 715        EINVAL;
EINVAL;
 757        chip = chip->def">mono - (chip, ESSSref">UN_CMD_SETFORMAT" ">ESSSref">UN_ef">ssubstream);
EINVAL;
 729        chip = (chip, ESSSrefADDRCMD_SETFORMAT" ">ESSSrefADDRef">ssra> = 0x10000 - chip->dubstream);
count;
 679  7        chip = chip->dubstream);
 760}
 743
 7e(struct snd_es293oigureback2_prepare" class="sref">snd_es293oigureyback_prepare(struct snd_pcm_substream *substream)
 763{
 686        struct es1938 *chip = snd_pcm_substream_chip(substream){
 757        EINVAL;
 728        chip, EINVAL;
EINVAL;
 710        
 731        chip = (chip, UN_CMD_SETFORMAT" ref">UN_ef">ssubstream);
 73while (938_write(chip = (chip, UN_CMD_SETFORMAT" ref">UN_ef">ss) !ef">chip =  753   1        chip = EINVAL;
 694        chip = chip->d- 1/a> = 0x10000 - EINVAL;
EINVAL;
 746        chip = (chip, ssra> = 0x10000 - chip->def">count;
count;
 729  7        chip = chip->def">count;
 760}
 730
 7e(struct snd_es93oigureback2_prepare" class="sref">snd_es93oigureyback_prepare(struct snd_pcm_substream *substream)
 763{
 723ref= 622        switch (substream->number) {
 743        case 0:
 70738"> 729  7        snd_es193oigureback2_prepare" class="sref">snd_es193oigureybackeam_chip(substream){
 747        case 1:
 74738"> 729  7        snd_es293oigureback2_prepare" class="sref">snd_es293oigureybackeam_chip(substream){
 72760"> 760}
 729        snd_BUG();
 759        return -EINVAL;
 760}
 760}
 762static int snd_escopyback2_prepare" class="sref">snd_escopyyback_prepare(struct snd_pcm_substream *,60"> 760}
 754                          unsigned int ,60"> 760}
 70738"> 722222222222222222222e(struct ,60"> 760}
 626                      void6      return  *,60"> 760}
 74738"> 722222222222222222222e(struct number) {
 753        struct snd_pcm_runtime *runtime = substream->runtime;
 753        struct es1938 *chip = snd_pcm_substream_chip(substream){
 731        r&lnt&lntef">chip = chip->def">count;
 692        chip = chip->def">count;
 72if 938_write(r+f">chip = chip = chip->ssubstream)
 754   9        return -EINVAL;
 66if 938_write(r+f">chip = chip = chip->sss="sref">number) {
 626   if 938_write((,<">chip = runtime->r+f">chip = r+f1NTRELOADH,  74738"> 72222222229        return -EINVAL;
 66}9elsess="sref">number) {
 666   if 938_write((,<">chip = runtime->r+f">chip = r+f1NTRELOADH,  75738"> 72222222229        return -EINVAL;
 69729"> 72if 938_write((runtime->[0], ((5    char6      return ()r+f">chip =  712           9        return -EINVAL;
 72760"> 760}
    674" class="8ine" 87me="L754"> 759        return 0;
 760}
 736
 682
 682snd_p managean crogram DMA */
 682
 720static int (struct snd_pcm_substream *,60"> 760}
 69729"> 7222222222222222222222_prepare(struct )
 760}
 763{
 7 20static int EINVAL;
 755
 62if 9ream_chip(count = (NTRELOADH, ()
 74738"> 729  7        EINVAL;
 729        return 0;
 760}
 730
 720static int (struct snd_pcm_substream *substream)
 763{
 729  >count = (substream){
 760}
 755
 682
 682snd_e (ADC)rogram DMA */
 682
 7_prepare(struct snd_eback2_prepare" class="sref">snd_e"sreefDMA */
 763{
 69.      return ( 712                   eam_chip(s,60"> 760}
 75.      return ( 754                    eam_chip( 760}
 70.      return snb_period_bytes" ">snb"sreef""""""""""""""""eam_chip((,60"> 760}
 70.      return sn_min_period_bytes" ">sn_min"sreef"""""""""""""6000,60"> 760}
 70.      return sn_max_period_bytes" ">sn_max"sreef"""""""""""""48000,60"> 760}
 70.      return  760}
 75.      return  760}
 75.      return  682
 69.      return  760}
 69.      return  760}
 75.      return  760}
 7 .      return  760}
 70.      return  760}
 682
 682snd_es (DAC)rogram DMA */
 680
 7_prepare(struct snd_esd_pcm_runtime" clasf="+code>snd_es"sreefDMA */
 763{
 75.      return (( 754                    eam_chip(e0x40 : 0x08) |
 70738"> 7222222222222222222eam_chip( 760}
 70.      return ( 74738"> 7222222222222222222eam_chip( 760}
 70.      return snb_period_bytes" ">snb"sreef""""""""""""""""eam_chip((,60"> 760}
 75.      return sn_min_period_bytes" ">sn_min"sreef"""""""""""""6000,60"> 760}
 75.      return sn_max_period_bytes" ">sn_max"sreef"""""""""""""48000,60"> 760}
 69.      return  760}
 69.      return  760}
 75.      return  682
 7 .      return  760}
 70.      return  760}
 70.      return  760}
 70.      return  760}
 70.      return  760}
 730
 720static int snd_esopen_period_bytes"  href="+cod">snd_esopenyback_prepare(struct snd_pcm_substream *substream)
 763{
 723        struct es1938 *chip = snd_pcm_substream_chip(substream){
 743        struct snd_pcm_runtime *runtime = substream->runtime;
 755
 62if 9>es1938 *snd_es29 href="+code=substream" ">snd_es29 href="+cef">substream)
 74738"> 729        return -runtime;
 728        snd_es href="+code=substream" ">snd_es href="+csref">runtime = ">runtime;
 729        runtime->chip = snd_eback2_prepare" class="sref">snd_e"sre">runtime;
 75e(struct snumnd_es1938_bits" clase="shw_llnss=a20<_">snumnubstream_chip(,60"> 760}
 69729"> 7222222222222222222222  &ntime->substream){
 692        ){
 729        return 0;
 760}
 755
 720static int snd_pcm_substream *substream)
 763{
 723        struct es1938 *chip = snd_pcm_substream_chip(substream){
 753        struct snd_pcm_runtime *runtime = substream->runtime;
 730
 733ref= 622        switch (substream->number) {
 693        case 0:
 72728"> 728        snd_es19 href="+code=substream" ">snd_es1s href="+csref">runtime = ">runtime;
 754   b="sk">runtime;
 667        case 1:
 626   if 938_write(snd_es href="+code=substream" ">snd_es href="+csrefsubstream)
 74738"> 72222222229        return -runtime;
 66728"> 728        snd_es29 href="+code=substream" ">snd_es29 href="+cef">">runtime = ">runtime;
 666   b="sk">runtime;
 75default       case 1:
 69729"> 72      struct snd_BUG();
 712   9        return -EINVAL;
 72760"> 760}
    674" class="9ine" 97me="L754"> 759        runtime->chip = snd_esd_pcm_runtime" clasf="+code>snd_es"sref">EINVAL;
 715        snumnd_es1938_bits" clase="shw_llnss=a20<_">snumnubstream_chip(,60"> 760}
 626                         &ntime->substream){
 757        ){
 729        return 0;
 760}
 730
 720static int snd_escloseback2_prepare" class="sref">snd_escloseyback_prepare(struct snd_pcm_substream *substream)
 763{
 723        struct es1938 *chip = snd_pcm_substream_chip(substream){
 715        snd_es href="+code=substream" ">snd_es href="+csref">runtime = EINVAL;
 629        return 0;
 760}
 760}
 720static int snd_pcm_substream *substream)
 763{
 723        struct es1938 *chip = snd_pcm_substream_chip(substream){
 760}
 723ref= 622        switch (substream->number) {
 743        case 0:
 70738"> 728        snd_es19 href="+code=substream" ">snd_es1s href="+csref">runtime = EINVAL;
 626   b="sk">runtime;
 743        case 1:
 66728"> 728        snd_es29 href="+code=substream" ">snd_es29 href="+cef">">runtime = EINVAL;
 666   b="sk">runtime;
6   default   /pre>runtime;
 69729"> 72      struct snd_BUG();
 712   9        return -EINVAL;
 72760"> 760}
 759        return 0;
 760}
 736
 7_prepare(struct static int ">rs="sref">number) {
 70.      return static int  760}
 75.      return static int  760}
 75.      return static int  760}
 69.      return static int  760}
 69.      return static int  760}
 75.      return static int  760}
 7 .      return static int snd_es9triggt;ybac,60"> 760}
 70.      return static int snd_es93oigureybac,60"> 760}
){
){
 7_prepare(struct static int snd_esopnd_es1938_bits" class="sref">snd_esopnef">">rs="sref">number) {
 75.      return static int snd_esopen_period_bytes"  href="+cod">snd_esopenybac,60"> 760}
 75.      return static int snd_escloseback2_prepare" class="sref">snd_escloseybac,60"> 760}
 69.      return static int  760}
 69.      return static int  760}
 75.      return static int  760}
 7 .      return static int snd_es3replayback2_prepare"  href="+cod">snd_es3replayybac,60"> 760}
 70.      return static int snd_estriggt;snd_estriggt;ybac,60"> 760}
 70.      return static int snd_es3oigureback2_prepare" class="sref">snd_es3oigureybac,60"> 760}
 70.      return static int snd_escopyback2_prepare" class="sref">snd_escopyybac,60"> 760}
){
){
 720static int (struct es1938 *substream)
 763{
 69_prepare(struct es1938 *){
 72i0static int EINVAL;
){
 66if 9ream_chip(count = (rdode=substream" ">rds="s,7e82"> 682_pring">"es-"sou-"s46"d count, RELOADH, , 2,f1NT&ntime->)
 626   9  7        EINVAL;
 757        , ->>snd_BUG();
 728        , ->snd_esopnd_es1938_bits" class="sref">snd_esopnef">>snd_BUG();
 75nd_BUG();
 728        ->sn_datsode=dma1_size" "riv>sn_dats"sreef">count =  728        -> 692        (substreama="+code=runtime" >a="s="s,7e82"> 682_pring">"ESS Solo-1"d count>snd_BUG();
){
 759        sn_pagib_for_allsn_pagib_for_allubstream_chip(,  760}
 70738"> 722222222222222222222222222222229        (>, 64*1024, 64*1024>snd_BUG();
 736
 757        count = ){
 729        return 0;
 760}
 736
 682
 682
 682
 682
 755
 720static int es1938 * 760}
 74738"> 72222222222222222_prepare(struct es1938 *)
 763{
 753<0"> 7charf">es1938 *rs="sref">number) {
 74738"> 72e82"> 682_pring">"Mic"d count, R82"> 682_pring">"Mic Master"d count, R82"> 682_pring">"CD"d count, R82"> 682_pring">"AOUT"d count,="sref">number) {
 69729"> 72 82"> 682_pring">"Mic1"d count, R82"> 682_pring">"Mix"d count, R82"> 682_pring">"L761"d count, R82"> 682_pring">"Master"d count="sref">number) {
 69}ubstream){
){
 759        ->count = ){
 715        ->){
 715        ->sndode=substream" enume">snd"sre.      return ){
 74if 938_write(->sndode=substream" enume">snd"sre.      return  66728"> 728        ->sndode=substream" enume">snd"sre.      return  729        (->sndode=substream" enume">snd"sre.      return a="+code=runtime" >a="s="s,7ees1938 *(->sndode=substream" enume">snd"sre.      return  729        return 0;
 760}
 760}
 720static int es1938 * 760}
    674" class="10#L6>10#me="L754"> 754                 _prepare(struct es1938 *)
 763{
 713        struct es1938 *chip = (snd_BUG();
 757        ->sndode=substream" enume">snd"sre.      return chip =  729        return 0;
 760}
 760}
 720static int es1938 * 760}
 712                 _prepare(struct es1938 *)
 763{
 743        struct es1938 *chip = (snd_BUG();
 71unsigned7charfream->chip = ->sndode=substream" enume">snd"sre.      return  71nd_BUG();
 74if 938_write( 66728"> 729        return -EINVAL;
 729  ">chip = chip = EINVAL;
 760}
 760}
static int alizer_enablyback2_prepare"  href="+codin19_sp0">alizer_enablye="L728"> e(struct  760}
){
 720static int alizer_enablyback2_prepare"  href="+codget_sp0">alizer_enablyyback_prepare(struct es1938 * 760}
 70738"> 7222222222222222222222222222222_prepare(struct es1938 *)
 763{
 743        struct es1938 *chip = (snd_BUG();
 66unsigned7charfream->chip =  729        ->( 729        return 0;
 760}
 760}
 720static int alizer_enablyback2_prepare"  href="+codput_sp0">alizer_enablyyback_prepare(struct es1938 * 760}
 754                 222222222222222_prepare(struct es1938 *)
 763{
 713        struct es1938 *chip = (snd_BUG();
 66unsigned7charfream->EINVAL;
 7020static int EINVAL;
 729        chip = ->EINVAL;
 728        chip = EINVAL;
 728        chip = chip = EINVAL;
 69if 938_write(number) {
 75728"> 728         754   8         70760"> 760}
 629  a>static int EINVAL;
 760}
 760}
 720static int es1938 * 760}
 74738"> 72      222222222222222_prepare(struct es1938 *)
 763{
 692        ->count = EINVAL;
 752        ->EINVAL;
 759        -> 709        -> 629        return 0;
 760}
 760}
 720static int es1938 * 760}
 74738"> 72      22222222222222_prepare(struct es1938 *)
 763{
 69_prepare(struct es1938 *chip = (snd_BUG();
 752        ->chip =  759        ->chip =  669        return 0;
 760}
){
static int  74738"> 7e(struct ){
 720static int es1938 * 760}
 69729"> 72      22222222222222_prepare(struct es1938 *)
 763{
 723        struct es1938 *chip = (snd_BUG();
 759        ->        swilass="srefmixer_readode=substream" class="srefmixer_readubstream_chip( 709        ->        swilass="srefmixer_readode=substream" class="srefmixer_readubstream_chip( 629        return 0;
 760}
 760}
 7void/a>static int es1938 *)
 763{
 723        struct es1938 *chip = (snd_BUG();
 692        chip = EINVAL;
 752        chip = EINVAL;
 759        chip = EINVAL;
 709        chip = EINVAL;
 760}
){
 720static int es1938 * 760}
 666                  unsigned7charfream-> 760}
 763{
 69if 938_write()
 712   9  ">chip = ->EINVAL;
 75else">EINVAL;
 754   9  ">chip = ->EINVAL;
 760}
 736
 720static int es1938 *)
 763{
 72if 938_write()
 74738"> 729  ">chip = EINVAL;
 75else">EINVAL;
 712   9  ">chip = EINVAL;
 760}
    674" class="11#L6>117me="Lbstream){
static int (a="+code=runtime" x>a="s="s,7ees1938 *->->   \bstream){
chip = chip = chip = a="+code=runtime" >a="s="s7ef">chip = a="+code=runtime" x>a="s="s,7.      return chip = chip = ){
chip = chip = ){
sn_value38_reset_fifo" "riv>sn_value"srefef">chip = ((rs2.      return chip =  760}
static int (a="+code=runtime" x>a="s="s,7ees1938 *->->chip = a="s="s7ef">chip = a="+code=runtime" x>a="s="s,7.      return chip = chip = ){
chip = chip = ){
sn_value38_reset_fifo" "riv>sn_value"srefef">chip = (( 760}
 760}
 720static int (struct es1938 * 760}
 74738"> 72      222222222222_prepare(struct es1938 *)
 763{
 69i0static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 16)e&nT0xffsnd_BUG();
){
 759        ->count = count = count = EINVAL;
 709        ->){
 715        -> 757        ->count =  669        return 0;
 760}
 760}
 720static int (struct es1938 * 760}
 712                 222_prepare(struct es1938 *)
 763{
 753        struct es1938 *chip = (snd_BUG();
 7020static int chip = ->sn_value38_reset_fifo" "riv>sn_value"srefuampnT0xffsnd_BUG();
 7120static int (->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 8)e&nT0xffsnd_BUG();
 66i0static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 16)e&nT0xffsnd_BUG();
 7020static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 24)0&nT0xffsnd_BUG();
 7220static int EINVAL;
 72">EINVAL;
 728        chip = EINVAL;
 692        ->(count =  75if 938_write( 754   8        ->static int -> 709        return 0;
 760}
){
 720static int (struct es1938 * 760}
 666                  22_prepare(struct es1938 *)
 763{
 723        struct es1938 *chip = (snd_BUG();
 69i0static int chip = ->sn_value38_reset_fifo" "riv>sn_value"srefuampnT0xffsnd_BUG();
 7520static int (->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 8)e&nT0xffsnd_BUG();
 75i0static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 16)e&nT0xffsnd_BUG();
 7020static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 24)0&nT0xffsnd_BUG();
 62unsigned7charfream-> 66nd_BUG();
 708        ->count =  72if 938_write( 74738"> 728        chip =  728        chip = ();
 692        chip = ();
 759  ">chip = ->chip = EINVAL;
 760}
 760}
static int es1938 *a="+code=runtime" x>a="s="s,7ees1938 *->\bstream){
chip = chip = chip = a="+code=runtime" >a="s="s7ef">chip = a="+code=runtime" x>a="s="s,7.      return chip = chip = ){
chip = chip = ){
sn_value38_reset_fifo" "riv>sn_value"srefef">chip = (rs2.      return chip =  760}
static int es1938 *a="+code=runtime" x>a="s="s,7ees1938 *->chip = a="s="s7ef">chip = a="+code=runtime" x>a="s="s,7.      return chip = chip = ){
chip = chip = ){
sn_value38_reset_fifo" "riv>sn_value"srefef">chip = ( 760}
){
 720static int (struct es1938 * 760}
 69729"> 72      222222222222_prepare(struct es1938 *)
 763{
 7520static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 24)0&nT0xffsnd_BUG();
){
 709        ->count = count = count = EINVAL;
 715        ->EINVAL;
 757        -> 708        ->count =  669        return 0;
 760}
 760}
 720static int (struct es1938 * 760}
 7529"> 72      222222222222_prepare(struct es1938 *)
 763{
 703        struct es1938 *chip = (snd_BUG();
 7120static int chip = ->sn_value38_reset_fifo" "riv>sn_value"srefuampnT0xffsnd_BUG();
 66i0static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 8)e&nT0xffsnd_BUG();
 7020static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 16)e&nT0x07snd_BUG();
 7220static int (->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 19)e&nT0x07snd_BUG();
 7420static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 24)0&nT0xffsnd_BUG();
 7520static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 22)0&nT1ubstream){
 71unsigned7charfream->){
 75bstream){
    674" class="12#L6>127me="L754"> 759        chip =  702f 938_write(chip =  71754"> 759        chip =  66else">EINVAL;
 71754"> 759        chip =  759        ->( 759        ->(static int count =  69if 938_write( 763{
 712   9        ->static int ->{
 7529"> 72 8        ->static int ->{
 75760"> 760}
 709        return 0;
 760}
){
 720static int (struct es1938 * 760}
 666                  22_prepare(struct es1938 *)
 763{
 723        struct es1938 *chip = (snd_BUG();
 69i0static int chip = ->sn_value38_reset_fifo" "riv>sn_value"srefuampnT0xffsnd_BUG();
 7520static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 8)e&nT0xffsnd_BUG();
 7520static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 16)e&nT0x07snd_BUG();
 7020static int (->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 19)e&nT0x07snd_BUG();
 7120static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 24)0&nT0xffsnd_BUG();
 66i0static int ->sn_value38_reset_fifo" "riv>sn_value"srefubstubst 22)0&nT1ubstream){
 7020static int  66unsigned7charfream-> 72">EINVAL;
 728        chip = ->count =  692        chip = ->count = 13"se- 8         7633/a>{
 728        chip =  728   a> =  7633/();
 692        chip =  692   a> =  7633/();
 7520static int chip = 123me="L760"> 760}
 692           7020static int 
chip =nverf="+c_reset_fifo" vals9me="L754"> 7520static int chip =nverf="+c_reset_fifo" vals9me=5"> 7020static int  702f 938_write(chip = EINVAL 7020static int 128mL753"> 759  ">chip =  7633/a>;
128me="Le="L707"> 7020static int  759  ">chip = -> 7633/();
128me="Le="L707"> 7020static int ()}
als="sref"{
 7020static int 128mL753"> 759  ">chip = 9ls="sref"}
s3bstream 763 7020static int (3;
1298DECLAR_TLV"_DB_RANGE7"> 7020staDECLAR_TLV"_DB_RANGEriod_bytes" class="sdb_scale_(3;
 7633/();
();
s3bals="sref";
s3b9ls="sref";
1298DECLAR_TLV"_DB_RANGE7"> 7020staDECLAR_TLV"_DB_RANGEriod_bytes" class="sdb_scale_audiof="sound/p12043sdb_scale_audiofkllntrol_period_bytes" kllntrol"sre,3   return 3;
(3;
(3;
s3d_BUG(3;
EINVAL1298DECLAR_TLV"_DB_RANGE7"> 7020staDECLAR_TLV"_DB_RANGEriod_bytes" class="sdb_scale_audioo" val1s="sNTreadb_scale_audiookllntrol_period_bytes" kllntrol"sre,3 _BUG(3}
 7633/()}
(){
s3stream3{
s3stream3{
1298DECLAR_TLV"_DB_RANGE7"> 7020staDECLAR_TLV"_DB_RANGEriod_bytes" class="sdb_scale_micalue"sre.      db_scale_3{
3{
3{
s3stream3{
 7601298DECLAR_TLV"_DB_RANGE7"> 7020staDECLAR_TLV"_DB_RANGEriod_bytes" class="sdb_scale_sound/ue"sre.      db_scale_sounkllntrol_period_bytes" kllntrol"sre,3s_BUG(3{
3{
3{
s3stream3{
s30"> 7601298DECLAR_TLV"_DB_SCALE7"> 7020staDECLAR_TLV"_DB_SCALEriod_bytes" class="sdb_scale_capturnd/ue"sre.      db_scale_capturn>t;0, 150, 0)rol_period_bytes" kllntrol"sre>s3stream3{
s3stream3}
 =  759<="sk_prchip = static int "M/at v Playback Volume" 763(3;
static int "M/at v Playback Switch"3{
3;
chip = 3;
"Hardware M/at v Playback Volume"3;
chip = chipime" bytes" ullntrol"sresgruntime L76b"> 760 =  = 3}
 760chip = chip = chipime" |bytes" ullntrol"sresgruntime L76btream3{
chip = (3;
"Hardware M/at v Playback Switch"3;
 = 3;
 =  760rs2.      return (3;
3;
static int "Hardware Volume Split"3{
static int "Loun Playback Volume"3{
static int "CD Playback Volume"3;
static int "FM Playback Volume"(3)
3;
static int "Mono Playback Volume"3;
 760static int "Mic Playback Volume"static int "Aux Playback Volume"3{
static int "Capturn Volume"3}
static int "Beep Volume"static int "Record Monitor" 760static int "Capturn Switch"3{
 760chip = "Capturn Source" 7633;
(3;
static int "Mono Inref Playback Volume"(3;
(3;
static int "PCM Capturn Volume"3{
 760static int "Mic Capturn Volume"EINVALstatic int "Loun Capturn Volume"static int "FM Capturn Volume"5 return 4;
static int "Mono Capturn Volume"(4;
static int "CD Capturn Volume"(4;
static int "Aux Capturn Volume"EINVALEINVALstatic int "PCM Playback Volume"2INVALstatic int "PCM Playback Volume"4 return 4;
static int "3D C"sk_pr - Level"(4}
chip = als="sref4{
"3D C"sk_pr - Switch"9ls="sref4}
static int "Mic Boost (+26dB)"s4d_BUG(4;
s4d6 return 4;
s4d_BUG(4;
/* ---------------------------------------------------------------------------- */s4dals="sref4;
/* ---------------------------------------------------------------------------- */s4d9ls="sref4;
s4   return 4;
/*s4d_BUG(4;
 * initialize the 1938 - used by resume callback, toos4d2INVAL */s4d_BUG(4;
128mL753"> 759<=938_inittic int  723        struct es1938)bytes" ullntrol"sresgruntime L74>EINVAL(4}
/* reset 1938 */s4d6 return 4}
128mL753"> 759es1938)rol_period_bytes" kllntrol"sre>s4d_BUG(4{
4{
/* configurn n="Lve mes1 */s4d9ls="sref4{
s4stream4{
/* enasta bus s4stream4{
es1938trol_period_bytes" klcialue"sre.       kl)rol_period_bytes" kllntrol"sre>s4stream4{
s4s_BUG(4{
/* disasta legacy audio */s4sEINVALes1938trol_period_bytes" klcialue"sre.       kl_regf="+code=chipSL_PCI_LEGACYCONTROL = _r0x805f)rol_period_bytes" kllntrol"sre>s4s_BUG(4{
s4stream4{
/* set DDMA bas1 */s4stream4{
es1938trol_period_bytes" klcialue"sre.       kl_regf="+code=chipSL_PCI_DDMACONTROL = _regf="+code=chip38" class="sref">es1938trol_period_bytes" kddma_po        s4stream4{
s40"> 760/* set DMA/IRQ policy */s4stream4{
es1938trol_period_bytes" klcialue"sre.       kl_regf="+code=chipSL_PCI_CONFIG = _r0)rol_period_bytes" kllntrol"sre>s4stream4}
s4stream4)
/* enasta Audio 1, Audio 2, MPU401 IRQ and HW volume IRQ*/s4s_BUG(4{
es1938_regf="+code=chipIRQCONTROL = ))rol_period_bytes" kllntrol"sre>s4sEINVALs4s_BUG(4{
/* reset DMA */s4stream4;
128moutb = es1938_regf="+code=chipDMACLEA> = ))rol_period_bytes" kllntrol"sre>s4stream4;
s4b"> 760s4   return 4;
/*s4 tream4}
 * PM suppos4 tream4}
 */s40"> 760 savedt; = 4{
4;
4;
4;
 760s4d_BUG(4;
s4dtream4;
s4stream4{
124me="L{9.    devi7>t )bytes" ullntrol"sresgruntime L74stream4{
urn )rol_period_bytes" kllntrol"sre>s4dtream4;
 = )rol_period_bytes" kllntrol"sre>s4dtream4)
 723        struct es1938 return  = s4dtream4;
 = _rhref="+code=es19d124me="L{9.    dt s4dtream4;
s4s"> 760 = s4   return 4;
chip<="+cpcmdsuspenc_all+code=ef="+code=es1938" class="sref">es1938trol_period_bytes" klcmalue"sre.       km)rol_period_bytes" kllntrol"sre>s4 tream4;
s4 tream4{
/* save mixer-rel="ad ;s4   return 4{
128mLhip = urn  = es1938trol_period_bytes" koavedt; =  = ++_regf="+code=chipd124me="L{9.    dt  = es1938_rhref="+code=es19chip = )rol_period_bytes" kllntrol"sre>s4 tream4}
s4   return 4;
128moutb = es1938_regf="+code=chipIRQCONTROL = ))r0=spanstatic icomment">/* disasta irqs */s4 tream4}
es1938trol_period_bytes" kirqclass="sref">esirq57" irol_= 0rd_bytes" ullntrol"sresgruntime L74stream4{
esfree_irq+code=ef="+code=es1938" class="sref">es1938trol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip38" class="sref">es1938)rol_period_bytes" kllntrol"sre>s4 "> 760128m38" class="sref">es1938trol_period_bytes" kirqclass="sref">esirq57" i= -n_value"srefubstubst 22)0&nT1u4bstream 763+code=ef="+code=es19lcialue"sre.       kl)rol_period_bytes" kllntrol"sre>s4btream4;
)rol_period_bytes" kllntrol"sre>s4b  return 4;
_regf="+code=chipPCI_D3ho/a>        )rol_period_bytes" kllntrol"sre>s4bstreams4btream4;
s4d_BUG(4;
124me="L{9.    devi7>t )bytes" ullntrol"sresgruntime L74dtream4{
 760urn )rol_period_bytes" kllntrol"sre>s5   return 5;
 = )rol_period_bytes" kllntrol"sre>s5>EINVAL 723        struct es1938 return  = s5 2INVAL = _rhref="+code=es19d124me="L{9.    dt s5   return 5;
_regf="+code=chipPCI_D0a>        )rol_period_bytes" kllntrol"sre>s5>5 return 5;
)rol_period_bytes" kllntrol"sre>s5 6 return 5;
+code=ef="+code=es19lcialue"sre.       kl) < 0rd_bytes" ullntrol"sresgruntime L75d_BUG(5;
 = 57" i=spanstatic intring">"grunti:  kl_enasta_devi7> failed, "(5;
"disasting devi7>\n"s5 9BUG(5;
128m="+ccarc_disconnecttic int  = s5>EINVAL = s5>EINVALs5   return 5;
esrequest_irq+code=ef="+code=es19lcialue"sre.       kltrol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip="+codput_dreterrupttic int s5 4 return 5;
128mIRQF_SHAREes1938)rd_bytes" ullntrol"sresgruntime L75 5 return 5;
 = 57" i=spanstatic intring">"grunti: unasta to grab IRQ %d, ""disasting devi7>\n"trol_period_bytes" kirqclass="sref">esirq57" )rol_period_bytes" kllntrol"sre>s5>_BUG(5}
 = s5>8BUG(5{
 = s5>9BUG(5}
es1938trol_period_bytes" kirqclass="sref">esirq57" i= egf="+code=chiplcialue"sre.       kltrol_period_bytes" kirqclass="sref">esirq57" rol_period_bytes" kllntrol"sre>s5bEINVAL 759<=938_inittic int es1938)rol_period_bytes" kllntrol"sre>s5b2INVALs5b  return 5;
/* restore mixer-rel="ad ;s5b4 return 5;
128mLhip = urn  = es1938trol_period_bytes" koavedt; =  = ++_regf="+code=chipd124me="L{9.    dt (5;
 759es1938_rhref="+code=es19chip = _rhref="+code=es19d124me="L{9.    dt s5b_BUG(5;
s5b8BUG(5;
 759es1938_rhref="+code=es19chip = _rhref="+code=es19d124me="L{9.    dt s5b9BUG(5;
s5d_BUG(5;
 = s5d2INVALs5d_BUG(5;
s5 _BUG(5}
         = s5d6 return 5}
        s5d_BUG(5{
s5stream5{
        s5d9BUG(5{
/* CONFIG_PM */s5stream5{
s5stream5{
s5s2INVALL753"> 759<=rerol"g124po         759<=rerol"g124po1291e="L723"> 723        struct es1938)bytes" ullntrol"sresgruntime L75s_BUG(5{
        esgp57" rol_period_bytes" kllntrol"sre>s5s_BUG(5{
s5stream5{
128m38" class="sref">es1938trol_period_bytes" kg124po        esgp57"  return         s5stream5{
esgp57" )d_bytes" ullntrol"sresgruntime L75stream5{
 = 57" i=spanstatic intring">"grunti: cannot allocrol memory4forng124pos50"> 760s5stream5{
s5stream5)
esgp57" ,i=spanstatic intring">"S"sref"s5s_BUG(5{
 = esgp57" ,i=spanstatic intring">" kl%s/g124po        es1938trol_period_bytes" klcialue"sre.       kl))rol_period_bytes" kllntrol"sre>s5sEINVAL = esgp57" ,i&_period_bytes" k38" class="sref">es1938trol_period_bytes" klcialue"sre.       kltrol_period_bytes" kdev124me="L{9.    dev)rol_period_bytes" kllntrol"sre>s5s_BUG(5{
esgp57" trol_period_bytes" ki7>1246e="L71.     eturn 128me=3fs43  return 4;
))rol_perio5_byte55 kllntrol"sre>s4stream4{d="L691" 330" id=seg class="sref">esgp57"  ret330" id=seg c124po = trol_period_bytes" keg class="es1438.124L757" id="L686"5class5"12#L6>128me=3fs4btream4;
s5d2INVALs5stream5{
/*128me=3fs5stream5}
 *5PM suppos4d_BUG(4;
         759<=rerol"g124po1291e="L723"> 723        struct  */(5{
s4 tream4}
es1931254757" id="L757" cl!turn esgp57"  retun330" id=seg cquot;        128m38" class="sref">es1931ALs5stream5{
128m38" class="sref">es1938trol_period_brefDPM_OPSa>        s5stream5{
s5stream5{
s5d_BUG(5{
s5 _BUG(5in59" }rclass="13#L6>gn59" resgre>s5s2INVAL1298__devinittic int L753"> 759<=rerol"g124po         759<=rerol"g124po1291e="L723"> 723   {760s5 _BUG(5in59" }rclass="13#L6>gn59" resgre>s4d_BUG(4;
         759<=rerol"g124po1291e="L723"> 723   {7>s5stream5{
 *51es1438.1247751" ol_perio5_byte5" kllntrol"sre>s5d9BUG(5{
)bytes" u5lntro57 kllntrol"sre>s5   return 5;
11#3ee>s5s2INVAL1298__de8678clasf__devinit57" i= class8678759<=rerol"g124po         759<=rerol"g124po1291e="L723"> 723        struct )rol_perio5_byte57 kllntrol"sre>s4stream4{
s4stream4{
128moutb = es1938))r0=spanstatic icomme5eeg class="e="L{9.    dt s4 tream4}
        struct s5 9BUG(5;
s5stream5{
)rol_perio5_byte58 kllntrol"sre>s5bEINVAL 723  "+code=chipSL_PCI_CONFIG =  *51es1438.1248751" ol_perio5_byte58 kllntrol"sre>s5b2INVALs5   return 5;
es19trol"sre>s5b2INVALesfree_irq+code=ef="+code=es1938" class="sref">es1938trol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip5=es19chip<5a> = )rol_perio5_byte58 kllntrol"sre>s5>5 return 5;
        esirq57" _regf="+code=chip5=dev124me=55es1438.1248725" ol_perio5_byte5" kllntrol"sre>s4   return 4;pesirq57" _regf="+code=chip5=="L{9.   5ta irqs */s4stream4{k8678clasf__devinit5k8678759<=f">es1938trol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip5=eg class="rq57" irol_= 0rd_bytes" u5lntro5"sresgruntime >s5d2INVALes1938)rol_perio5_byte5" klln>s5stream5{
esirq57" i= -n_value"sr5fubst59 kllntrol"sre>s5stream5{
s5s2INVAL1298__des="18678clasf__devinit57" i= classs="18678759<=rerol"g124po      7" iund/p1291es1438.124967" iund/p124po = s5b2INVAL)rol_perio5_byte5" klln54757" id="L757" cl!turn )rol_perio5_byte5" kllntrol"sre>s5>EINVAL 723        struct  = es1938trol_pert_d8_rese3archip = pert_d8_resllS"ALs4bstrs2INVAL1298__de8678clasf__devinit57" i= class8678759<=f">es1938trol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip58.1249714"5id="L714" class0rol_perio5_byte5" kllntrol"sre>s4btream4;
128me=3fs43  return 4;
s4d_BUG(4;
      7" iound/p13i/es1538.1350680" id="L680" class="12#L6>1291e="="+ccarchip = )bytes" u5lntro59 kllntrol"sre>s5b8BUG(5;












L74d"> 760es1938trol_period_bytes" kirqclassp="+codput_dreterrupttic int s5 9BUG(5;












L74d"> 760es1938trorol_period_bytes" kir723        struct )rol_perio6_byte6" kllntrol"sre>s5>EINVAL 723 sref">esirq57" _regf="+code=chip6e="L{9.   6llntrol"datat s4d_BUG(4;
 sref">esirq57" _regf="+code=chip6e3"L{9.   6l.       kl)rol_perio6_byte60 kllntrol"sre>sol"srrerol"g124po      7" iund/p1_op=ef="+code=es1938"sound/p1_op= id="L68" class="12#op=ef="+code=es193op= id="code=chipSAVED_REG_SIZ6>static int6"sound/p1363es1538.1350693" id="L6936 clas60sresgruntime L74 streL74bEINVALs4stream4{L6>1298__des="18678clasf__devinit57" i= classs="18678759       6)rol_perio6_byte6" kllntrol"sreruntime L74b"> 760)rol_perio6_byte6012#L6>128me=3fs43  return 4;
) < 0rd_bytes" u6lntro6"sresgruntime ="L680" class="1rol_period_bytes" kir723 8trol_period_brefDPM_OPSa>        128me=3fs4btream4;
s4stream4)
))r0=spanstatic icomme6archip6= s5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938trol_pf="sound/p1296es153831250676" id="L676" class="12#L6>128m kl_enasta_devi7>124me="L{9.     kll_enasta_NTROL))r0=spanstatic icomme6adev124me=6> = s4bstrs2INVAL sref">esirq57" _regf="+code=chip6211es1538.6251180" id="L680id="L686"6class61 kllntrol"sre>s4 tream4{
s5   return 5;
128m kl_enasta_devi7>124me="L{9.     k_CTL_ELDM_REG+code=e_BIT_MASd/p1241es1538.12e=e_BIT_MASd"12#L24ll_enasta ||NTROL))r0=spanstatic icomme6asound/p136t_dreterrupt57" _ol_perio6_byte6" kllntrol"sre>s5   return 5;
128m kl_enasta_devi7>124me="L{9.     k_CTL_ELDM_REG+code=e_BIT_MASd/p1241es1538.12e=e_BIT_MASd"12#L24ll_enasta1254757" id="L757" cl!turn es1938)rd_bytes" u6lntro6"sresgruntime L75 5 return 5;
128m kl_enast2#L6>1278e="L r" ck124me="L{9.    lln ck+code=ef="+code=es19KERar723tectp12#does NDRVref="so 24bitgPCI buses1438.e=ec intring">"grunti: cannot allocrol memory46ab IRQ $d, "s4   return 4;pesirq57" _regf="+code=chip6kirqclass=6sref">esirq57" )rol_perio6_byte6" kllntrol"sre>s5>_BUG60esirq57" _regf="+code=chip62evi7> fai6= s4btream4;
 = s4btream4;
128me=3fs5bstreames1938trokz_CTL_clasf__devinit5kz_CTL_759<=rizeof>(5;
       GFP_e="LEDs="srsref">esirq57" _regf="+code=chip6 kirqclass6"sref">esirq57" rol_perio6_byte6" kllntrol"sre>s5   return 5;
es1938)rol_perio6_byte622resgruntime L75 6 re>s4   return 4;pesirq57" _regf="+code=chip6"sound/p1262es1538.1252732" ol_perio6_byte6" kllntrol"sre>s5>_BUG60s4btream4;
s5>5 return 5;spin_TL_k/p1221es1538.1252691"pin_TL_k/p122s="13_sefedevdparent+code=ef="+code=es19g class="sref">esgp57" ,i&_pe esirq57" _regf="+code=chip6"b IRQ $as < 0xa0)bytes" u6lntro62 kllntrol"sre>s4   return 4;spin_TL_k/p1221es1538.1252691"pin_TL_k/p122s="13_sefedevdparent+code=ef="+code=es19g class="sref">esgp57" ,i&_pelass="TL_keriod_bytes" kilass="TL_ks="srsref">esirq57" _regf="+code=chip6"irqclass=6="L{9.    dt s4stream4{=ef="+code=es19g class="sref">esgp57" ,i&_pe>1291e="="+ccarchip = 1291e="="+ccarchip = esirq57" _regf="+code=chip6"evi7> fai6"L757id="L691elseol_perio6_byte6" kllntrol"sre#L6> kl_disastacode=chiplciep12#a>        es1938trol_period_bytes" kirqclasssref">esirq57" _regf="+code=chip6"9EIOhip128m38" class="sref">es1938trol_period_bytes" kir6229es1538.6252759" id="L759id="L686"6class63 kllntrol"sre>s5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938trol_pf51376" i330"on=ef="+code=es193
"l_enasta1254757" id="L757" cl!turn s4stream4{k8678clasf__devinit5k8678759<=f">es1938trol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip6aullSLEM_I6ACEPOWER_D0t s4   return 4;pesirq57" _regf="+code=chip68.1253682"6id="L682" class0rol_perio6_byte63 kllntrol"sre>s5>_BUG60 sref">esirq57" _regf="+code=chip6sound/p12#6es1538.1253693" id="L686"6class63 kllntrol"sretrol"sre>s4btream4;
s5>5 return 5;href="sound/p1287es1438.1248757" id="L757" classoseg class="sref">esgsoseg c/a> ref">es1938trol_pf51btrrc="13# class="sref">esgl_pf51btrrc="13# c"12#L6>128m kl_enasta_devi7>124me="L{9.     k_Cf="+code=chipSL_PCI_CONFIG =  = s5stream5{
esgsbseg c/a> ref">es1938trol_pf51btrrc="13# class="sref">esgl_pf51btrrc="13# c"12#L6>128m kl_enasta_devi7>124me="L{9.     k_C1="+code=chipSL_PCI_CONFIG = irqclass=6    odput_dpmt s4stream4{=ef="+code=es19g class="sref">esgp57" ,i&_pevcseg class="sref">esgvcseg c/a> ref">es1938trol_pf51btrrc="13# class="sref">esgl_pf51btrrc="13# c"12#L6>128m kl_enasta_devi7>124me="L{9.     k_C2="+code=chipSL_PCI_CONFIG = evi7> fai638.1253687" #elseol_perio6_byte63 kllntrol"sre#L6> kl_disastacode=chiplciep12#a>        esgmpuseg c/a> ref">es1938trol_pf51btrrc="13# class="sref">esgl_pf51btrrc="13# c"12#L6>128m kl_enasta_devi7>124me="L{9.     k_C3="+code=chipSL_PCI_CONFIG = 9EIOhipes1938trol_pf51btrrc="13# class="sref">esgl_pf51btrrc="13# c"12#L6>128m kl_enasta_devi7>124me="L{9.     k_C4="+code=chipSL_PCI_CONFIG = /* C6NFIG_PM */s5 gp57" ,i&_pe esrequest_irq+code=ef="+code=es19lcialue"sre.       kltrol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip
s4   return 4;id="L"sound/"12#8es1538.1id="L"soun"12#L6>128m kl_enast2#L6>1278e="L r" ck124me="L{9.    lln ck+code=ef="+code=es19KER57" i76" class="1"L691"spanstatic intring">"disasting devi7>\n"trol_period_bytes"638" class=6sref">es1938)bytes" u6lntro64 kllntrol"sre>s5>_BUG       kltrol_period_b8678clasf__devinit57" i= class8678759<=f">es1938trol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip6sound/p1246es1538.1254763" _bytes" u6lntro64sresgruntime L74 stre60 sref">esirq57" _regf="+code=chip6es19g clas6="sref">esgp57" rol_perio6_byte64 kllntrol"srerref">esirq57" _regf="+code=chip6e = s5stream5{
38" class="sref">es1938trol_period_bytes" kirqclass="sref">esirq57" i= egf="+code=chiplcialue"sre.       kltrol_period_bytes6124pos5stream5125uct DDiBU128moutb = s4btream4;
esgp57" )d_bytes" u6lntro64 kllntrol"sre#L6> kl_disastaid="L"sound/"12#8es1538.1id="L"soun"12#L6>128m kl_enast2#L6>DiBU128moutb = DiBU1   lln ck+code=ef="+code=es19KER="13#L: io: 0x>57" lx, sb: 0x>57" lx, vc: 0x>57" lx, mpu: 0x>57" lx, _7t : 0x>57" lx76" class="1"L69rol"sre>s4btream4;
s50"> 7sre>s5stream5{
esgsoseg c/a> f="+code=chipKBUILD_MODNAM6>static int esgsbseg c/a> f="+code=chipKBUILD_MODNAM6>static int esgvcseg c/a> f="+code=chipKBUILD_MODNAM6>static int esgmpuseg c/a> f="+code=chipKBUILD_MODNAM6>static int esirq57" _regf="+code=chip6EMalue"sre6      ENOMEM57" rol_perio6_byte6" kllntrol"sref">esirq57" _regf="+code=chip6Esound/p126255059" id="L759id="L686"6class6"12#L6>128me=3fs5stream5}
s5stream5)LD_MODNAM6>static int ef="+code=es19g class="sref">esgp57" ,i&_pevcseg class="sref">esgvcseg c/a> r+ 1248;50"> 7sre>s4 tream4{
))r0=spanstatic icomme6>"S"s6ef"s5   return 5;
))rol_perio6_byte6" kllntrol"sre>s5sEINVAL 759<=938_inittic int )rol_perio6_byte65 kllntrol"sre>s5s_BUG(5{
s5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938tro8"sound/p1_new1es1538.1252691" idund/p1_new3#L6>L753"> 759<=938_"atic int static int ))rol_perio6_byte65 kllntrol"sre>s5>_BUG(5}
es1938trol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chip6keg class=6es1438.124L757" id="L686"6class65 kllntrol"sre>s5>8BUG(5{s2INVAL sref">esirq57" _regf="+code=chip6"sound/p1268es1438.1245728" ol_perio6_byte65 kllntrol"srerref">esirq57" _regf="+code=chip6alue"sre. 6    CONFIG_PM28" ol_perio6_byte66 kllntrol"sre>s5stream5{
/*s5bEINVALL753"> 759<=938_"atic int esirq57" i= period_bytes" klcialue"sre.       kltrol_period_bytes"6omment"> *6PM suppos5b2INVAL */ 8trol_period_b2#L6>1291e="L723"> 723 sref">esirq57" _regf="+code=chip6"sound/p1263es1438.1246693" id="L6936 clas66 kllntrol"sre>s5d2INVALs4btream4;
128me=3fs43  return 4;
s4 tream4{
s4 tream4{
))r0=spanstatic icomme6asound/p126="L7580xa8, 0xb4,bytes" u6lntro669klln>s4 tream4{
))r0=spanstatic icomme6ound/p12696s1438.1246759" }rol_perio6_byte6" kllntrol"sre>s5 _BUG(5irq>s5d2I_class="sref">esgsrq>s5d2I_c   lln      kltrol_period_bytes" kirqclass="sref">esirq57" _regf="+code=chi(e>s4d_BUG(4;
s4d/+code" class="1esu_i/a>_rhref="+code=su_i/e"sreNTROL))r0=spanstatic icomme6onstatic i6/es1438.1247750" ol_perio6_byte6" klln54757" id="L757" cl!turn  *61es1438.1247751" ol_perio6_byte67 kllntrol"sre>s5>EINVAL 723        struct _rhref="+code=su_i/e"srAL)bytes" u6lntro67 kllntrol"sre>s5 2INVALtrorolu=ef="+code=es1938rolu=/a> f="+code=chipKBUIaudioorolu=ef="+code=es193audioorolu=e"srAL>s4d_BUG(4;
_rhref="+codehand7"//a>    VALs5s_BUG(5{
)rol_perio6_byte67 kllntrol"sre>s4   return 4;srolu=ef="+code=es1938rolu=/a>        struct  759<=938"12#L6>128moutb = es1938))r0=spanstatic icomme6e="L{9.   6llntrol"datat ))r0=spanstatic icomme6eeg class=6e="L{9.    dt  kl_disasta="sound/"12#8es1538.1254678" id="L678" class="12#L6>DiBU128moutb = DiBU1   lln ck+code=ef="+code=es19KEREtic idebug - gf="+code 8rolu=: =0x>57" x76" class="1"L69e>s4   return 4;srolu=ef="+code=es1938rolu=/a> /aNTROL))r0=spanstatic icomme6esound/p1268es1438.1247728" ol_perio6_byte67 kllntrol"sNTROL))r0=spanstatic icomme6lSLEM_IFAC6POWER_D3ho/)rol_perio6_byte68 kllntrol"sreNTROL))r0=spanstatic icomme6lnstatic i6e.       km)rol_perio6_byte68 kllntrol"sre>s4 tream4{
 *61es1438.1248751" ol_perio6_byte68 kllntrol"srees5 gp57" ,i&_pesrolu=ef="+code=es1938rolu=/a>  _sefe 0x1a1254757" id="L757" cl!turn ))r0=spanstatic icomme6-ound/p1276"L{9.    dt s4 tream"+code=es19KEREtic idebug - AUDIO clasnel 1_gf="+codec intring">"grunti: cannot allocrol memory46=dev124me=65es1438.1248725" ol_perio6_byte68sresgruntime L75 6 re>s4   return 4;p"sound/"12#8es1538.1254678" id="L678" class="12#L6>DiBU128moutb = DiBU1   lNTROL))r0=spanstatic icomme6-="L{9.   6ta irqs */s5>_BUGrol"sre>s4 tream"+code=es19KEREtic idebug - AUDIO clasnel 1_DMAC p125cr0=t:R>57" u76" class="1"L69rol"sre>s4btream4;
s5b8BUG(5;    struct L753"> 759<=938"1DML6>128moutb = 1utb+code0x00_regf="+code=chipSLIO_REG = es1938)rol_perio6_byte68 kllntrol"sre>s5 9BUG(5;
esirq57" i= -n_value"sr6fubst690kllntrol"sre>s5>_BUGrol"sre>s4 tream"+code=es19KEREtic idebug - AUDIO clasnel 1_DMAC p125base:R>57" u76" class="1"L69rol"sre>s4btream4;
L753"> 759<=938"1DML6>128moutb = 1utb+code0x00_regf="+code=chipSLIO_REG = )rol_perio6_byte692resgruntime L75 6 re>s4   return 4;p"sound/"12#8es1538.1254678" id="L678" class="12#L6>DiBU128moutb = DiBU1   lNTROL))r0=spanstatic icomme6crel="ad ;6e.       kl)rol_perio6_byte69 kllntrol"sre>s5>_BUGrol"sre>s4 tream"+code=es19KEREtic idebug - AUDIO clasnel 1_DMAC p1258rolu=: 0x>57" x76" class="1"L69NTROL))r0=spanstatic icomme6cound/p1276llPCI_D3ho/)rol_perio6_byte69sresgruntime L74 stretrol"sr    struct L753"> 759<=938"1DML6>128moutb = 1utb+code0x00_regf="+code=chipSLIO_REG = ))r0=spanstatic icomme6sound/p1296es1438.1249675" id="L686"6class69sresgruntime L75 6 re>s4 tream4{
s5>_BUG(5}
_rhref="+codehand7"//a>    >es1938trol_period_bytes" kir619dev124me6"L{9.    dev)bytes" u6lntro69 kllntrol"sre>s5b8BUG"+code=chipKBUIaudioorolu=ef="+code=es193audioorolu=e"sr       struct  759<=938"1SBL6>128moutb = 1utb+code0x00_regf="+code=chipSLIO_REG = trol_period_bytes" kir61sound/p126es1438.1249688" id="L752"6class69 kllntrol"sre>s5 9BUG>s5   return 5;
  _sefe  id="L757" clasADC1clasf__devinit5ADC1e"sreNTROL))r0=spanstatic icomme79dev124me=7L{9.    dev)rol_perio7_byte700kllntrol"sre>s5>_BUGrol"sree#L6> kl_disastaid="Lcm_period_elaps"/a>_rhref="+codeid="Lcm_period_elaps"/utb+code0x00_regf="+code=chipSLIO_REG = esgp57" ,i&_pe>1ptp12_sub"+cea       1ptp12_sub"+cea /a> /aNTROL))r0=spanstatic icomme79dev124me=7L{9.    dev)rol_perio7_byte70 kllntrol"sreeeeeeeeerol"G>s5   return 5;
  _sefe  id="L757" clasDAC1clasf__devinit5DAC1e"sreNTROL))r0=spanstatic icomme792ev124me=7L.       kl)rol_perio7_byte702resgruntime L75 6 rerol"sree#L6> kl_disastaid="Lcm_period_elaps"/a>_rhref="+codeid="Lcm_period_elaps"/utb+code0x00_regf="+code=chipSLIO_REG = esgp57" ,i&_peplayback2_sub"+cea        /aNTROL))r0=spanstatic icomme793ev124me=7L.       kl)rol_perio7_byte70 kllntrol"sretrol"sre>s4btream4;
s4btream4;
s4 tream4{
)rol_perio7_byte70 kllntrol"sre>s5 gp57" ,i&_pesrolu=ef="+code=es1938rolu=/a>  _sefe 0x2a1254757" id="L757" cl!turn ) < 0rd_bytes" u7lntro70 kllntro 0NTROL))r0=spanstatic icomme7devi7> fai7ed, "5{
s5 9BUG(5;>s4 tream"+code=es19KEREtic idebug - AUDIO clasnel 2_gf="+codec intring">"grunti: cannot allocrol memory47archip7= s5>_BUGm5{
(5;>s4 tream"+code=es19KEREtic idebug - AUDIO clasnel 2_DMAC p125cr0=t:R>57" u76" class="1"L69rol"sre>s4btream4;
L753"> 759<=938"12#L6>128moutb = s5>_BUG       kltr="sound/"12#8es1538.1254678" id="L678" class="12#L6>DiBU128moutb = DiBU1   lNTROL))r0=spanstatic icomme7asound/p137t_dreterrupt57" _ol_perio7_byte7" kllntrol"sre>s5 eeee(5;>s4 tream"+code=es19KEREtic idebug - AUDIO clasnel 2_DMAC p125base:R>57" u76" class="1"L69rol"sre>s4btream4;
es1938)rd_bytes" u7lntro7"sresgruntime L75 5 rerol"sre    struct L753"> 759<=938"12#L6>128moutb = 128me=3fs43  return 4;
esirq57" )rol_perio7_byte7" kllntrol"sNTROL))r0=spanstatic icomme72evi7> fai7= 4{
s5 9BUG(5;
_rhref="+codehand7"//a>    >es1938trol_period_bytes" kir7219es1538.7251759" id="L759id="L686"7class720kllntrol"sre>s5>_BUGm5{
es2=chipSLIO_REG =ESSSB_It;es2NDRV_C0x80egf="+code=chipSL_PCI_CONFIG = esirq57" rol_perio7_byte72 kllntrol"sreeeeeeeee>s5   return 5;
  _sefe  id="L757" clasDAC2=chipSLIO_REG =DAC2e"sreNTROL))r0=spanstatic icomme78" class="7ref">es1938)rol_perio7_byte722resgruntime L75 6 re>s5>_BUGm5{
_rhref="+codeid="Lcm_period_elaps"/utb+code0x00_regf="+code=chipSLIO_REG = esgp57" ,i&_peplayback1_sub"+cea        /aNTROL))r0=spanstatic icomme7"sound/p1272es1538.1252732" ol_perio7_byte72 kllntrol"sretrol"sre>s4btream4;
s4btream4;
s4 tream4{
 < 0xa0)bytes" u7lntro72 kllntrol"sre>s5 gp57" ,i&_pesrolu=ef="+code=es1938rolu=/a>  _sefe 0x4a1254757" id="L757" cl!turn s5>_BUGe>s5s2INVAL fai7"L757id="L691elseol_perio7_byte72sresgruntime L75stream5{
_rhref="+codehand7"//a>    >es1938trol_period_bytes" kir729EIOhips5 9BUG(5;
_rhref="+codeid="dtl_notifyutb+code0x00_regf="+code=chipSLIO_REG = esgp57" ,i&_pe>1atic int esgp57" ,i&_pehw_switcha>_rhref="+codehw_switch"sref">esgp57" ,i&_pei/a>_rhref="+codei/e"srees1938trol_period_bytes" kir7229es1538.7252759" id="L759id="L686"7class730kllntrol"sre>s5>_BUGm5{
esgp57" ,i&_pe>1atic int esgp57" ,i&_pehw_volum6a>_rhref="+codehw_volum6"sref">esgp57" ,i&_pei/a>_rhref="+codei/e"srees1938trol_period_bytes" kir72kirqclass7/es1538.1253750" ol_perio7_byte73 kllntrol"sreeeeeeeee>s5 !s2INVALs5>_BUGm5{
esgp57" ,i&_pe>1atic int s5>_BUGGGGGGGGGGGGGGGGGGGGGGGG_sefedevdparent+code=ef="+code=es19g class="sref">esgp57" ,i&_pels1438_switcha>_rhref="+codels1438_switch"sref">esgp57" ,i&_pei/a>_rhref="+codei/e"srees1938trol_period_bytes" kir72rel="ad ;7es1538.1253693" id="L686"7class73 kllntrol"sre>s5 eeee(5;Gm5{
esgp57" ,i&_pe>1atic int esgp57" ,i&_pels1438_volum6a>_rhref="+codels1438_volum6"sref">esgp57" ,i&_pei/a>_rhref="+codei/e"srees1938trol_period_bytes" kir72b IRQ %put_dresume+cod)rol_perio7_byte73sresgruntime L75 6 retrol"sre>s4btream4;
irqclass=7    odput_dpmt s5>_BUG4{
))r0=spanstatic icomme7>evi7> fai738.1253687" #elseol_perio7_byte73sresgruntime L75stream5{
trol_period_bytes" kir729EIOhipesirq57" _regf="+code=chip7ment">/* C7NFIG_PM */s5stream5{
s4 tream4{
  _sefe 0x8a1254757" id="L757" cl!turn es1938)bytes" u7lntro74 kllntrol"sre>s5>_BUG s4 tream4{
))r0=spanstatic icomme7 rel="ad ;7es1538.1254763" _bytes" u7lntro74sresgruntime L74 stre s4 tream4{
))r0=spanstatic icomme7 class="sr7="sref">esgp57" rol_perio7_byte74sresgruntime L75 5 rets4 tream4{
))r0=spanstatic icomme7 b IRQ ŷes1538.1254725" ol_perio7_byte74sresgruntime L75 6 re>s4 tream4{
es, 0x4aegf=" f="ack? CTL_IRQCONTROL))r0=spanstatic icomme7 irqclass=7ocrol"pos5>_BUGes5   return 5;
esgp57" )d_bytes" u7lntro74 kllntrol"sre>s5b8BUG(5;
m5{
_rhref="+codehand7"//a>    >es1938trol_period_bytes" kir7s9EIOhips50"> 7sre>(5;
m5{
esirqmpud="_uartbytes" kirutb+code0x00_regf="+f="+code=es1938" class="sref">es1938trol_period_bytes" kirqclass=8757" id="L757" clasrmidperiod_bytes" kirmidp = esgp57" ,i&_peprivatd8_rese3archip = privatd8_rese"srees1938trol_period_bytes" kir7EMalue"sre7      ENOMEM57" rol_perio7_byte750kllntrol"sre>s5>_BUGrref">esirq57" _regf="+code=chip7Esound/p127255059" id="L759id="L686"7class751kllntrol"srerref">esirq57" _regf="+code=chip7"sound/p1271es1538.125L751" ol_perio7_byte7" kllntrol"sre(5{s2INVAL = IRQ_RETVALutb+code0x00_regf="+hand7"/a>_rhref="+codehand7"//a> ees1938trol_period_bytes" kir7E8" class=7ef"esirq57" _regf="+code=chip7"rel="ad ;7.       kl))rol_perio7_byte75 kllnrol"sre>s4btream4;
)rol_perio7_byte75 klln#defs4btream4;
128me=3fs43  return 4;
))rol_perio7_byte75 kllntrol"sre>s4d_BUG(4;
s5>EINVAL 723 eNTROL))r0=spanstatic icomme7keg class=7es1438.124L757" id="L686"7class75 klln54757" id="L757" cl!turn       7" iound/p13i/es1538.1350680" id="L680" class="12#L6>1291e="="+ccarchip = trol_period_bytes" kir7alue"sre. 7    CONFIG_PM28" ol_perio7_byte760kllntrol"sre>s5 2INVAe>s4d_BUG(4;
_rhref="+codei/x = trol_period_bytes" kir7asound/p127omment">/*s4d_BUG(4;
 sref">esirq57" _regf="+code=chip7omment"> *7PM suppos5b2INVAL */ = ef="+code=es19g class="sref">esgp57" ,i&_pe>1291e="="+ccarchip = trol_period_bytes" kir7arel="ad ;73es1438.1246693" id="L6937 clas76 kllnrol"sre>s4btream4;
s5>5 return 5;strcpya>_rhref="+codeitrcpyutb+code0x00_regf="+c1291e="="+ccarchip = esgp57" ,i&_pelass=bytea>_rhref="+codelass=bytes="sref4po"es1938trol_period_bytes" kir7ab IRQ Ųx3e, 0x36, 0x38,bytes" u7lntro7612#L6>128me=3fs43  return 4;
(4;
_rhref="+codei/x = <_enastTL_ELIO_REG+codARRAY_SIZaSNDRV_CTL_ELEMIARRAY_SIZautb+code0x00_regf="+" id="L691" ontrol=ef="+code=es1938"so6911" c ontrol=/a> ee4d_BUG(4;
_rhref="+codei/x = <++1254757" id="L757" cl!turn s5b8BUGrerol"g124po      7" ik ontrolef="+code=es1938"sok ontrold="L680" class="12#L6kctlef="+code=es193kctl = trol_period_bytes" kir7asound/p127="L7580xa8, 0xb4,bytes" u7lntro76 kllntrol"sre>s5 9BUG(5;
 [d_BUG(4;
_rhref="+codei/x = <]f="+code=chipKBUILD_MODNAM6>static int trol_period_bytes" kir7ound/p12697s1438.1246759" }rol_perio7_byte770kllntrol"sre>s5>_BUGswitch code0x00_regf="+fdxa>_rhref="+codei/x = <1254757" id="L757" cl!turn  *71es1438.1247751" ol_perio7_byte772resgruntime L75 6 re>s5>_BUGtrol"sre0" class="12#L6>ef="+code=es19g class="sref">esgp57" ,i&_pels1438_volum6a>_rhref="+codels1438_volum6"sreref">es1938trokctlef="+code=es193kctl = trol_period_bytes" kir719dev124me7"L{9.    dev)bytes" u7lntro77 kllntrol"sre>s5>_BUGGGGGGGGGGGGGGGGG">es1938trokctlef="+code=es193kctl = esgp57" ,i&_peprivatd88678clasf__devinit5privatd88678 = trol_period_bytes" kir71rel="ad ;7es1438.1247763" _bytes" u7lntro77 kllntrol"sre>s5 eeee(5;GGGGGGGGGbreakes1938trol_period_bytes" kir71aESAVED_R7L{9.    dev)rol_perio7_byte77sresgruntime L75 5 rerol"sreGcase 1:4757" id="L757" cl!turn )rol_perio7_byte77sresgruntime L75 6 re>s5>_BUGtrol"sre0" class="12#L6>ef="+code=es19g class="sref">esgp57" ,i&_pels1438_switcha>_rhref="+codels1438_switch"sreref">es1938trokctlef="+code=es193kctl = trol_period_bytes" kir71s5>_BUGrol"sreGGGGGGGGG">es1938trokctlef="+code=es193kctl = esgp57" ,i&_peprivatd88678clasf__devinit5privatd88678 = trol_period_bytes" kir71eg class=7e="L{9.    dt s5b8BUG(5;
GGGGGGGGbreakes1938trol_period_bytes" kir71sound/p1278es1438.1247728" ol_perio7_byte77 kllntrol"sre>s50"> 7sre>(5;
case 2:4757" id="L757" cl!turn )rol_perio7_byte780kllntrol"sre>s5>_BUG>s5>_BUGtrol"sre0" class="12#L6>ef="+code=es19g class="sref">esgp57" ,i&_pehw_volum6a>_rhref="+codehw_volum6"sreref">es1938trokctlef="+code=es193kctl = trol_period_bytes" kir7lnstatic i7e.       km)rol_perio7_byte78 kllntrol"sreeeeeeeeetrol"sreGGGGGGGG">es1938trokctlef="+code=es193kctl = esgp57" ,i&_peprivatd88678clasf__devinit5privatd88678 = trol_period_bytes" kir7lmment"> *71es1438.1248751" ol_perio7_byte782resgruntime L75 6 re>s5>_BUGtrol"srebreakes1938trol_period_bytes" kir7-rel="ad ;7aiat vs */s5>_BUGGGGGGGGGcase 3:4757" id="L757" cl!turn s5>_BUGtrol"sre0" class="12#L6>ef="+code=es19g class="sref">esgp57" ,i&_pehw_switcha>_rhref="+codehw_switch"sreref">es1938trokctlef="+code=es193kctl = trol_period_bytes" kir7laESAVED_R7a> = )rol_perio7_byte78sresgruntime L75 5 rerol"sreeGGGGGGGG">es1938trokctlef="+code=es193kctl = esgp57" ,i&_peprivatd88678clasf__devinit5privatd88678 = trol_period_bytes" kir7lb IRQ ŷes1438.1248725" ol_perio7_byte78sresgruntime L75 6 re>s5>_BUGtrol"srebreakes1938trol_period_bytes" kir7-s5>_BUGrol"sreerref">esirq57" _regf="+code=chip7=eg class=7rq57" irol_= 0rd_bytes" u7lntro78 kllntrol"sre>s5b8BUG>s5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938tro8"sodtl_add/p13i/es1538.1350680tl_addutb+code0x00_regf="+c1291e="="+ccarchip = esirq57" _regf="+code=chip7=sound/p127ref">es1938)rol_perio7_byte78 kllntrol"sre>s5 9BUGGGGGGGGG(5{s2INVAL sref">esirq57" _regf="+code=chip7class="sre7">esirq57" i= -n_value"sr7fubst790kllntrol"srerref">esirq57" _regf="+code=chip729/es1438.7249059" id="L759id="L686"7class79 kllntrol"sre>s5d2INVAL)rol_perio7_byte792resgrref">esirq57" _regf="+code=chip72rel="ad ;7e.       kl)rol_perio7_byte79 kllntrol"srref">esirq57" _regf="+code=chip72rel="ad ;7llPCI_D3ho/)rol_perio7_byte79 kllnrol"sre>s4btream4;
s4d_BUG(4;
s5>EINVALs4btream4;
      p1" ier/p1_i/a>_rhref="+codep1" ier/p1_i/d="L680" class="12#L6p_d_i/a>_rhref="+codep1" i/e"sreNTROL))r0=spanstatic icomme7"sound/p1276es1438.1249726" ol_perio7_byte79 klln54757" id="L757" cl!turn )bytes" u7lntro79 kllntrol"sretrol"sre>s4d_BUG(4;
      7" iound/p13i/es1538.1350680" id="L680" class="12#L6>1291e="="+ccarchip = trol_period_bytes" kir89dev124me=8L{9.    dev)rol_perio8_byte800kllntrol"sre>s5>EINVAL 723 es1938trol_period_bytes" kir891ev124me=8L49059" id="L759id="L686"8_byte80 kllntrol"srererol"g124po      7" iopl3/p13i/es1538.135068opl30" id="L680" class="1opl3/p13i/es1538.13opl30" ies1938trol_period_bytes" kir892ev124me=8L.       kl)rol_perio8_byte802resgruntime e>s4d_BUG(4;
_rhref="+codei/x =  sref">esirq57" _regf="+code=chip893ev124me=8L.       kl)rol_perio8_byte80 kllntrol"sre>s5   return 5;
esef">es1938troe=ef="CARDund/p12#8es1538.S=ef="CARDue"sreNTROL))r0=spanstatic icomme8"5ound/p1383d="L714" class0rol_perio8_byte80sresgruntime L75 5 re60esirq57" _regf="+code=chip896ound/p1383s1438.1249675" id="L686"8_byte80 kllntrol"sre>s5 !s2INVAL [d_BUG(4;
) < 0rd_bytes" u8lntro80 kllntrol"sre>s5>_BUG(5}
esirq57" _regf="+code=chip898e.      8kL{9.    dev)bytes" u8lntro80sresgruntime L75strea60esirq57" _regf="+code=chip899e.      8ks1438.1249688" id="L752"8_byte80 kllntrol"srerref">esirq57" _regf="+code=chip8archip8= s5stream5{
 = s5bEINVAL ref">es1938tro8"sod="L6c"13#L/p13i/es1538.1350680" i6c"13#Lutb+code0x00_regf="+indexa>_rhref="+codeindex/a> [d_BUG(4;
(4;
 = trol_period_bytes" kir8211es1538.8251180" id="L680id="L686"8class81 kllntrol"srees5 gp57" ,i&_peVrnd/p1241es1438.1 rn/a> renasta1ref">esirq57" _regf="+code=chip8a3"L{9.   82es1538.1251732" ol_perio8_byte81 kllntrol"sre>s5>_BUG(5{s2INVAL sref">esirq57" _regf="+code=chip8asound/p138t_dreterrupt57" _ol_perio8_byte8" kllntrol"srefor code0x00_regf="+fdxa>_rhref="+codei/x = <   VA4d_BUG(4;
_rhref="+codei/x = <_enast5e4d_BUG(4;
_rhref="+codei/x = <++1254757" id="L757" cl!turn es1938)rd_bytes" u8lntro8"sresgruntime L75 5 rees5 gp57" ,i&_pep1" reL75rp1_tro class="sref">esgp1" reL75rp1_tro cutb+code0x00_regf="+p_devi7>124me="L{9.     k_4d_BUG(4;
_rhref="+codei/x = <) =  V ||4757" id="L757" cl!turn 124me="L{9.     k_4d_BUG(4;
_rhref="+codei/x = <) _sefe  id="L757" clasIORESOURCE_IOa>_rhref="+codeIORESOURCE_IO = esirq57" )rol_perio8_byte81 kllntrol"sre>s5>_BUGrol"sree">es1938tro8"sod="L68678clasf__devinit57" id="L68678utb+code0x00_regf="+c1291e="="+ccarchip = trol_period_bytes" kir828e.      8= esirq57" _regf="+code=chip819EIOhip = s5 9BUGrref">esirq57" _regf="+code=chip8219es1538.8251759" id="L759id="L686"8class820kllntrol"srerref">esirq57" _regf="+code=chip8 kirqclass8"sref">esirq57" rol_perio8_byte82 kllntrol"sre>s5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938tro8"so6911" c "13#L/p13i/es1538.1350686911" c "13#Lutb+code0x00_regf="+c1291e="="+ccarchip = 124me="L{9.     k_4_sefedevdparent+code=ef="+code=es19g class="sretl_enasta1254757" id="L757" cl!turn es1938)rol_perio8_byte822resgruntime L75 6 re">es1938tro8"sod="L68678clasf__devinit57" id="L68678utb+code0x00_regf="+c1291e="="+ccarchip = trol_period_bytes" kir8"sound/p1282es1538.1252732" ol_perio8_byte82 kllntrol"sre>s5>_BUG(5{s2INVAL sref">esirq57" _regf="+code=chip8-rel="ad ;8aiat vs */esirq57" _regf="+code=chip8 class="sr8{9.    dt s5>5 return 5;c1291e="="+ccarchip = esgp57" ,i&_peprivatd8_rese3archip = privatd8_rese"sr8trol_period_b2#L6>1291e="L723"> 723 sref">esirq57" _regf="+code=chip8"b IRQ &as < 0xa0)bytes" u8lntro8212#L6>128me=3fs43  return 4;
es1938tro8trcpya>_rhref="+codeitrcpyutb+code0x00_regf="+c1291e="="+ccarchip = esgp57" ,i&_pedrivs=clasf__devinit5drivs= = "es1938trol_period_bytes" kir8"evi7> fai8"L757id="L691elseol_perio8_byte82sresgruntime ">es1938tro8trcpya>_rhref="+codeitrcpyutb+code0x00_regf="+c1291e="="+ccarchip = esgp57" ,i&_peshortbytea>_rhref="+codeshortbyte = "es1938trol_period_bytes" kir8"9EIOhip_rhref="+codes25467futb+code0x00_regf="+c1291e="="+ccarchip = esgp57" ,i&_pelongbytea>_rhref="+codelongbyte = 57" sG57" i,SNDR_>57" i" class="1"L69rol"sre>s4btream4;
s5>_BUGm5{
 = esgp57" ,i&_peshortbytea>_rhref="+codeshortbyte = s4btream4;
esgp57" ,i&_pes4btream4;
esgp57" ,i&_pef="+code=es1938" class="stes1938trol_period_bytes" kir8asound/p128id="L682" class0rol_perio8_byte83 kllntrol"sre>s5   return 5;
 ref">es1938tro8"so6911" cnew"Lcm/p13i/es1538.1350686911" cnew"Lcmutb+code0x00_regf="+code=chipSLIO_REG = es1938tro8"sod="L68678clasf__devinit57" id="L68678utb+code0x00_regf="+c1291e="="+ccarchip = trol_period_bytes" kir82b IRQ &put_dresume+cod)rol_perio8_byte83sresgruntime L75 6 re(5{s2INVAL sref">esirq57" _regf="+code=chip8>irqclass=8    odput_dpmt esirq57" _regf="+code=chip8>evi7> fai838.1253687" #elseol_perio8_byte83sresgruntime es5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938tro8"so6911" class=clasf__devinit57" i= classlass=utb+cdevdparent+code=ef="+code=es19g class="sretl_enasta1254757" id="L757" cl!turn s5 9BUG(5;
 = trol_period_bytes" kir8ment">/* C8NFIG_PM */s5>_BUG(5{s2INVAL sref">esirq57" _regf="+code=chip8msound/p128/es1538.1254750" ol_perio8_byte841kllntrol"srerref">esirq57" _regf="+code=chip8    = esirq57" _regf="+code=chip8 sound/p128sref">es1938)bytes" u8lntro84 kllntrol"sre>s5>_BUG"sre>s5 9BUG(5;
128moutb = 1utb+code0x00_regf="+code=chipSLIO_REG = esirq57" _regf="+code=chip8 rel="ad ;8es1538.1254763" _bytes" u8lntro84sresgruntime L74 stre"sre>s5 9BUG(5;
128moutb = 1utb+code0x00_regf="+code=chipSLIO_REG = esirq57" _regf="+code=chip8 class="sr8="sref">esgp57" rol_perio8_byte84sresgruntime L75 5 re"sre>s5 9BUG(5;
p57" ,i&_pepriound/"12#8es1538.1254678" id="L678" class="12#L6>ER78e="L r" ck124m2#L6>ER7resgr"4po57" lx76" class="1"L69NTROL))r0=spanstatic icomme8 irqclass=8ocrol"pos5>_BUGsre>s5 9BUG(5;
128moutb = 1utb+code0x00_regf="+code=chipSLIO_REG = trol_period_bytes" kir8mevi7> fai8sref">esgp57" )d_bytes" u8lntro84 kllntrol"sre}erol"G54757" id="L757" cl!turn s50"> 7es5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938tro8"soopl3ctimercnew/p13i/es1538.135068opl3ctimercnewutb+code0x00_regf="+opl3/p13i/es1538.13opl30" if=0_t1tl_enasta1254757" id="L757" cl!turn s5>_BUG>s5 9BUG(5;
 = trol_period_bytes" kir8Esound/p128255059" id="L759id="L686"8class85 kllntrol"sreeeeeeeeetrol"sre(5{s2INVAL sref">esirq57" _regf="+code=chip8"sound/p1281es1538.125L751" ol_perio8_byte852resgruntime L75 6 rerref">esirq57" _regf="+code=chip8E8" class=8ef"s5>_BUGes5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938tro8"soopl3chwdepcnew/p13i/es1538.135068opl3chwdepcnewutb+code0x00_regf="+opl3/p13i/es1538.13opl30" if=0_t1_CTL_ELIO_REG+codNULLe3archip = NULL"sretl_enasta1254757" id="L757" cl!turn ))rol_perio8_byte85 kllntrol"sre>s5 eeee(5;Gm5{
 = trol_period_bytes" kir8Eclass="sr8L{9.    dev)rol_perio8_byte85sresgruntime L75 5 re"sre>s5 (5{s2INVAL sref">esirq57" _regf="+code=chip8"b IRQ &set DMA */s4btream4;
))rol_perio8_byte85 kllntrol"srerref">esirq57" _regf="+code=chip8keg class=8es1438.124L757" id="L686"8class85sresgruntime es5 m5{
 = esirq57" _regf="+code=chip8"sound/p1288es1438.1245728" ol_perio8_byte85 kllntrol"sre>s5 9BUGGGGGGGGG(5;Gm5{
ef="+code=es19g class="sref">esgp57" ,i&_pelpu_po class="sref">esglpu_po c = esirq57" _regf="+code=chip8alue"sre. 8    CONFIG_PM28" ol_perio8_byte860kllntrol"sre>s5>_BUG>s5>_BUGtrol"sre0" class="12#L6" id="_INFO_INTEGRATED1e="="+ccarchip" id="_INFO_INTEGRATEDkllnt|e0" class="12#L6" id="_INFO_IRQ_HOOK1e="="+ccarchip" id="_INFO_IRQ_HOOK = esirq57" _regf="+code=chip8asound/p128omment">/* *8PM suppoER78e="L r" ck124m2#L6>ER7resgr"4po"grunti: cannot allocrol memory48nstatic ic8mment"> */))r0=spanstatic icomme84{
))r0=spanstatic icomme8ab IRQ żx3e, 0x36, 0x38,bytes" u8lntro86sresgruntime L75 6 re>p57" ,i&_pe="so6911" class="bit=ef="+code=es1938"so6911" class="bit=utb+code0x00_regf="+code=chipSLIO_REG = esSNDRV_CTL_ELEMIESSSB_It;es = esirq57" _regf="+code=chip8aeg class=80x6f, 0x7c, 0x7d,bytes" u8lntro86 kllnref">esirq57" _regf="+code=chip8asound/p128="L7580xa8, 0xb4,bytes" u8lntro86 kllntrol"sregp57" ,i&_pes0686911" c "13#L_gytepo class="sref">esgs0686911" c "13#L_gytepo cutb+cdevdparent+code=ef="+code=es19g class="sret;grunti: cannot allocrol memory48ound/p12698s1438.1246759" }rol_perio8_byte87 kllntrol"sre>s5stream5{
s5 de=chipSIMPLE_DEVrnd/p1241es1438.1 rn/a> ref">es1938tro8"sod="L6regi1438clasf__devinit57" id="L6regi1438utb+code0x00_regf="+c1291e="="+ccarchip =  *81es1438.1247751" ol_perio8_byte872resgruntime L75 6 rem5{
 = trol_period_bytes" kir819dev124me8"L{9.    dev)bytes" u8lntro87 kllntrol"sre>s5>_BUG(5{s2INVAL sref">esirq57" _regf="+code=chip81rel="ad ;8es1438.1247763" _bytes" u8lntro874kllntrol"srerref">esirq57" _regf="+code=chip81aESAVED_R8L{9.    dev)rol_perio8_byte87sresgref">esirq57" _regf="+code=chip81b IRQ &L{9.    dev)rol_perio8_byte87sresgruntime 0" class="12#L6pci_set_drv_rese3archip = pci_set_drv_resutb+code0x00_regf="+p_devi7>124me="L{9.     k_4d_BUG(4;
 = trol_period_bytes" kir81es1938troperiod_bytes" klcialue"sr++sref">esirq57" _regf="+code=chip81eg class=8e="L{9.    dt s5d2INVALesirq57" _regf="+code=chip8lSLEM_IFAC8POWER_D3ho/)rol_perio8_byte88 kllntrol"sre>s5stream5{
)rol_perio8_byte88 kllntrol"srvoid4d_BUG(4;
s5>EINVALesirq57" _regf="+code=chip8lmment"> *81es1438.1248751" ol_perio8_byte882resg54757" id="L757" cl!turn  = pci_get_drv_resutb+code0x00_regf="+p_devi7>124me="L{9.     kUUes1938trol_period_bytes" kir8lrel="ad ;8"L{9.    dt 124me="L{9.     k_4d_BUG(4;
 = NULL"sretes1938trol_period_bytes" kir8laESAVED_R8a> = )rol_perio8_byte88sresgrref">esirq57" _regf="+code=chip8lb IRQ Ɓes1438.1248725" ol_perio8_byte8812#L6>128me=3fs43  return 4;
s5>EINVAL ref54757" id="L757" cl!turn _rhref="+codebyte = es1938troKBUILDAREesirq57" _regf="+code=chip8=sound/p128ref">es1938)rol_perio8_byte88 kllntrol"sre."p57" ,i&_peid_tSNDRd/p1241es1438.1id_tSNDR/a> ref">es1938tro8"so6911" cid=ef="+code=es1938"so6911" cid= = esirq57" _regf="+code=chip8class="sre8">esirq57" i= -n_value"sr8fubst890kllntrol"sre."p57" ,i&_peprob8clasf__devinit5prob8utb+ref">es1938tro8"so6911" cprob8clasf__devinit57" i= classprob8utb+fref">esirq57" _regf="+code=chip8cnstatic i8249059" id="L759id="L686"8class89 kllntrol"sre."p57" ,i&_peremov8clasf__devinit5remov8utb+ref">es1938tro.1254exso_="+code=es19g cl.1254exso_=utb+code0x00_regf="+s0686911" cremov8clasf__devinit5s0686911" cremov8utb+Ufref">esirq57" _regf="+code=chip89lcialue"s8e.       kl)rol_perio8_byte892kllntrol"sre."p57" ,i&_pedrivs=clasf__devinit5drivs= = s5>_BUG."p57" ,i&_pep       es1938troES11" cPM_OPund/p12#8es1538.ES11" cPM_OPuutb+fref">esirq57" _regf="+code=chip8crel="ad ;8llPCI_D3ho/)rol_perio8_byte894kllntrol"srerfref">esirq57" _regf="+code=chip8caESAVED_R8id="L714" class0rol_perio8_byte8" klln}es1938trol_period_bytes" kir89b IRQ &es1438.1249675" id="L686"8class8912#L6>128me=3fs43  return 4;
 tes1938trol_period_bytes" kir819dev124me8"L{9.    dev)bytes" u8lntro89 klln


The original LXR software by the 1938thttp://L75rp1forge.net/projects/lx8c>LXR 4{ tmailto:lx8@vlx8@v lx8.vthttp://www.redpill-vRedpill L