2 * ALSA driver for ICEnsemble ICE1712 (Envy24)
4 * Lowlevel functions for M-Audio Delta 1010, 44, 66, Dio2496, Audiophile
7 * Copyright (c) 2000 Jaroslav Kysela <perex@suse.cz>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include <sound/driver.h>
27 #include <linux/delay.h>
28 #include <linux/interrupt.h>
29 #include <linux/init.h>
30 #include <linux/slab.h>
31 #include <sound/core.h>
32 #include <sound/cs8427.h>
33 #include <sound/asoundef.h>
39 #include <sound/cs8403.h>
43 * CS8427 via SPI mode (for Audiophile), emulated I2C
47 static void ap_cs8427_write_byte(ice1712_t
*ice
, unsigned char data
, unsigned char tmp
)
51 for (idx
= 7; idx
>= 0; idx
--) {
52 tmp
&= ~(ICE1712_DELTA_AP_DOUT
|ICE1712_DELTA_AP_CCLK
);
53 if (data
& (1 << idx
))
54 tmp
|= ICE1712_DELTA_AP_DOUT
;
55 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
57 tmp
|= ICE1712_DELTA_AP_CCLK
;
58 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
64 static unsigned char ap_cs8427_read_byte(ice1712_t
*ice
, unsigned char tmp
)
66 unsigned char data
= 0;
69 for (idx
= 7; idx
>= 0; idx
--) {
70 tmp
&= ~ICE1712_DELTA_AP_CCLK
;
71 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
73 if (snd_ice1712_read(ice
, ICE1712_IREG_GPIO_DATA
) & ICE1712_DELTA_AP_DIN
)
75 tmp
|= ICE1712_DELTA_AP_CCLK
;
76 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
82 /* assert chip select */
83 static unsigned char ap_cs8427_codec_select(ice1712_t
*ice
)
86 tmp
= snd_ice1712_read(ice
, ICE1712_IREG_GPIO_DATA
);
87 switch (ice
->eeprom
.subvendor
) {
88 case ICE1712_SUBDEVICE_DELTA1010LT
:
89 tmp
&= ~ICE1712_DELTA_1010LT_CS
;
90 tmp
|= ICE1712_DELTA_1010LT_CCLK
| ICE1712_DELTA_1010LT_CS_CS8427
;
92 case ICE1712_SUBDEVICE_AUDIOPHILE
:
93 case ICE1712_SUBDEVICE_DELTA410
:
94 tmp
|= ICE1712_DELTA_AP_CCLK
| ICE1712_DELTA_AP_CS_CODEC
;
95 tmp
&= ~ICE1712_DELTA_AP_CS_DIGITAL
;
97 case ICE1712_SUBDEVICE_VX442
:
98 tmp
|= ICE1712_VX442_CCLK
| ICE1712_VX442_CODEC_CHIP_A
| ICE1712_VX442_CODEC_CHIP_B
;
99 tmp
&= ~ICE1712_VX442_CS_DIGITAL
;
102 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
107 /* deassert chip select */
108 static void ap_cs8427_codec_deassert(ice1712_t
*ice
, unsigned char tmp
)
110 switch (ice
->eeprom
.subvendor
) {
111 case ICE1712_SUBDEVICE_DELTA1010LT
:
112 tmp
&= ~ICE1712_DELTA_1010LT_CS
;
113 tmp
|= ICE1712_DELTA_1010LT_CS_NONE
;
115 case ICE1712_SUBDEVICE_AUDIOPHILE
:
116 case ICE1712_SUBDEVICE_DELTA410
:
117 tmp
|= ICE1712_DELTA_AP_CS_DIGITAL
;
119 case ICE1712_SUBDEVICE_VX442
:
120 tmp
|= ICE1712_VX442_CS_DIGITAL
;
123 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
126 /* sequential write */
127 static int ap_cs8427_sendbytes(snd_i2c_device_t
*device
, unsigned char *bytes
, int count
)
129 ice1712_t
*ice
= device
->bus
->private_data
;
133 down(&ice
->gpio_mutex
);
134 tmp
= ap_cs8427_codec_select(ice
);
135 ap_cs8427_write_byte(ice
, (device
->addr
<< 1) | 0, tmp
); /* address + write mode */
137 ap_cs8427_write_byte(ice
, *bytes
++, tmp
);
138 ap_cs8427_codec_deassert(ice
, tmp
);
139 up(&ice
->gpio_mutex
);
143 /* sequential read */
144 static int ap_cs8427_readbytes(snd_i2c_device_t
*device
, unsigned char *bytes
, int count
)
146 ice1712_t
*ice
= device
->bus
->private_data
;
150 down(&ice
->gpio_mutex
);
151 tmp
= ap_cs8427_codec_select(ice
);
152 ap_cs8427_write_byte(ice
, (device
->addr
<< 1) | 1, tmp
); /* address + read mode */
154 *bytes
++ = ap_cs8427_read_byte(ice
, tmp
);
155 ap_cs8427_codec_deassert(ice
, tmp
);
156 up(&ice
->gpio_mutex
);
160 static int ap_cs8427_probeaddr(snd_i2c_bus_t
*bus
, unsigned short addr
)
167 static snd_i2c_ops_t ap_cs8427_i2c_ops
= {
168 .sendbytes
= ap_cs8427_sendbytes
,
169 .readbytes
= ap_cs8427_readbytes
,
170 .probeaddr
= ap_cs8427_probeaddr
,
176 static void snd_ice1712_delta_cs8403_spdif_write(ice1712_t
*ice
, unsigned char bits
)
178 unsigned char tmp
, mask1
, mask2
;
180 /* send byte to transmitter */
181 mask1
= ICE1712_DELTA_SPDIF_OUT_STAT_CLOCK
;
182 mask2
= ICE1712_DELTA_SPDIF_OUT_STAT_DATA
;
183 down(&ice
->gpio_mutex
);
184 tmp
= snd_ice1712_read(ice
, ICE1712_IREG_GPIO_DATA
);
185 for (idx
= 7; idx
>= 0; idx
--) {
186 tmp
&= ~(mask1
| mask2
);
187 if (bits
& (1 << idx
))
189 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
192 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
196 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
197 up(&ice
->gpio_mutex
);
201 static void delta_spdif_default_get(ice1712_t
*ice
, snd_ctl_elem_value_t
* ucontrol
)
203 snd_cs8403_decode_spdif_bits(&ucontrol
->value
.iec958
, ice
->spdif
.cs8403_bits
);
206 static int delta_spdif_default_put(ice1712_t
*ice
, snd_ctl_elem_value_t
* ucontrol
)
211 val
= snd_cs8403_encode_spdif_bits(&ucontrol
->value
.iec958
);
212 spin_lock_irq(&ice
->reg_lock
);
213 change
= ice
->spdif
.cs8403_bits
!= val
;
214 ice
->spdif
.cs8403_bits
= val
;
215 if (change
&& ice
->playback_pro_substream
== NULL
) {
216 spin_unlock_irq(&ice
->reg_lock
);
217 snd_ice1712_delta_cs8403_spdif_write(ice
, val
);
219 spin_unlock_irq(&ice
->reg_lock
);
224 static void delta_spdif_stream_get(ice1712_t
*ice
, snd_ctl_elem_value_t
* ucontrol
)
226 snd_cs8403_decode_spdif_bits(&ucontrol
->value
.iec958
, ice
->spdif
.cs8403_stream_bits
);
229 static int delta_spdif_stream_put(ice1712_t
*ice
, snd_ctl_elem_value_t
* ucontrol
)
234 val
= snd_cs8403_encode_spdif_bits(&ucontrol
->value
.iec958
);
235 spin_lock_irq(&ice
->reg_lock
);
236 change
= ice
->spdif
.cs8403_stream_bits
!= val
;
237 ice
->spdif
.cs8403_stream_bits
= val
;
238 if (change
&& ice
->playback_pro_substream
!= NULL
) {
239 spin_unlock_irq(&ice
->reg_lock
);
240 snd_ice1712_delta_cs8403_spdif_write(ice
, val
);
242 spin_unlock_irq(&ice
->reg_lock
);
249 * AK4524 on Delta 44 and 66 to choose the chip mask
251 static void delta_ak4524_lock(akm4xxx_t
*ak
, int chip
)
253 struct snd_ak4xxx_private
*priv
= (void *)ak
->private_value
[0];
254 ice1712_t
*ice
= ak
->private_data
[0];
256 snd_ice1712_save_gpio_status(ice
);
258 priv
->cs_addr
= chip
== 0 ? ICE1712_DELTA_CODEC_CHIP_A
:
259 ICE1712_DELTA_CODEC_CHIP_B
;
263 * AK4524 on Delta1010LT to choose the chip address
265 static void delta1010lt_ak4524_lock(akm4xxx_t
*ak
, int chip
)
267 struct snd_ak4xxx_private
*priv
= (void *)ak
->private_value
[0];
268 ice1712_t
*ice
= ak
->private_data
[0];
270 snd_ice1712_save_gpio_status(ice
);
271 priv
->cs_mask
= ICE1712_DELTA_1010LT_CS
;
272 priv
->cs_addr
= chip
<< 4;
276 * AK4528 on VX442 to choose the chip mask
278 static void vx442_ak4524_lock(akm4xxx_t
*ak
, int chip
)
280 struct snd_ak4xxx_private
*priv
= (void *)ak
->private_value
[0];
281 ice1712_t
*ice
= ak
->private_data
[0];
283 snd_ice1712_save_gpio_status(ice
);
285 priv
->cs_addr
= chip
== 0 ? ICE1712_VX442_CODEC_CHIP_A
:
286 ICE1712_VX442_CODEC_CHIP_B
;
290 * change the DFS bit according rate for Delta1010
292 static void delta_1010_set_rate_val(ice1712_t
*ice
, unsigned int rate
)
294 unsigned char tmp
, tmp2
;
296 if (rate
== 0) /* no hint - S/PDIF input is master, simply return */
299 down(&ice
->gpio_mutex
);
300 tmp
= snd_ice1712_read(ice
, ICE1712_IREG_GPIO_DATA
);
301 tmp2
= tmp
& ~ICE1712_DELTA_DFS
;
303 tmp2
|= ICE1712_DELTA_DFS
;
305 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp2
);
306 up(&ice
->gpio_mutex
);
310 * change the rate of AK4524 on Delta 44/66, AP, 1010LT
312 static void delta_ak4524_set_rate_val(akm4xxx_t
*ak
, unsigned int rate
)
314 unsigned char tmp
, tmp2
;
315 ice1712_t
*ice
= ak
->private_data
[0];
317 if (rate
== 0) /* no hint - S/PDIF input is master, simply return */
320 /* check before reset ak4524 to avoid unnecessary clicks */
321 down(&ice
->gpio_mutex
);
322 tmp
= snd_ice1712_read(ice
, ICE1712_IREG_GPIO_DATA
);
323 up(&ice
->gpio_mutex
);
324 tmp2
= tmp
& ~ICE1712_DELTA_DFS
;
326 tmp2
|= ICE1712_DELTA_DFS
;
331 snd_akm4xxx_reset(ak
, 1);
332 down(&ice
->gpio_mutex
);
333 tmp
= snd_ice1712_read(ice
, ICE1712_IREG_GPIO_DATA
) & ~ICE1712_DELTA_DFS
;
335 tmp
|= ICE1712_DELTA_DFS
;
336 snd_ice1712_write(ice
, ICE1712_IREG_GPIO_DATA
, tmp
);
337 up(&ice
->gpio_mutex
);
338 snd_akm4xxx_reset(ak
, 0);
342 * change the rate of AK4524 on VX442
344 static void vx442_ak4524_set_rate_val(akm4xxx_t
*ak
, unsigned int rate
)
348 val
= (rate
> 48000) ? 0x65 : 0x60;
349 if (snd_akm4xxx_get(ak
, 0, 0x02) != val
||
350 snd_akm4xxx_get(ak
, 1, 0x02) != val
) {
351 snd_akm4xxx_reset(ak
, 1);
352 snd_akm4xxx_write(ak
, 0, 0x02, val
);
353 snd_akm4xxx_write(ak
, 1, 0x02, val
);
354 snd_akm4xxx_reset(ak
, 0);
360 * SPDIF ops for Delta 1010, Dio, 66
364 static void delta_open_spdif(ice1712_t
*ice
, snd_pcm_substream_t
* substream
)
366 ice
->spdif
.cs8403_stream_bits
= ice
->spdif
.cs8403_bits
;
370 static void delta_setup_spdif(ice1712_t
*ice
, int rate
)
376 spin_lock_irqsave(&ice
->reg_lock
, flags
);
377 tmp
= ice
->spdif
.cs8403_stream_bits
;
378 if (tmp
& 0x01) /* consumer */
379 tmp
&= (tmp
& 0x01) ? ~0x06 : ~0x18;
381 case 32000: tmp
|= (tmp
& 0x01) ? 0x04 : 0x00; break;
382 case 44100: tmp
|= (tmp
& 0x01) ? 0x00 : 0x10; break;
383 case 48000: tmp
|= (tmp
& 0x01) ? 0x02 : 0x08; break;
384 default: tmp
|= (tmp
& 0x01) ? 0x00 : 0x18; break;
386 change
= ice
->spdif
.cs8403_stream_bits
!= tmp
;
387 ice
->spdif
.cs8403_stream_bits
= tmp
;
388 spin_unlock_irqrestore(&ice
->reg_lock
, flags
);
390 snd_ctl_notify(ice
->card
, SNDRV_CTL_EVENT_MASK_VALUE
, &ice
->spdif
.stream_ctl
->id
);
391 snd_ice1712_delta_cs8403_spdif_write(ice
, tmp
);
396 * initialize the chips on M-Audio cards
399 static akm4xxx_t akm_audiophile __devinitdata
= {
404 .set_rate_val
= delta_ak4524_set_rate_val
408 static struct snd_ak4xxx_private akm_audiophile_priv __devinitdata
= {
411 .data_mask
= ICE1712_DELTA_AP_DOUT
,
412 .clk_mask
= ICE1712_DELTA_AP_CCLK
,
413 .cs_mask
= ICE1712_DELTA_AP_CS_CODEC
,
414 .cs_addr
= ICE1712_DELTA_AP_CS_CODEC
,
416 .add_flags
= ICE1712_DELTA_AP_CS_DIGITAL
,
420 static akm4xxx_t akm_delta410 __devinitdata
= {
425 .set_rate_val
= delta_ak4524_set_rate_val
429 static struct snd_ak4xxx_private akm_delta410_priv __devinitdata
= {
432 .data_mask
= ICE1712_DELTA_AP_DOUT
,
433 .clk_mask
= ICE1712_DELTA_AP_CCLK
,
434 .cs_mask
= ICE1712_DELTA_AP_CS_CODEC
,
435 .cs_addr
= ICE1712_DELTA_AP_CS_CODEC
,
437 .add_flags
= ICE1712_DELTA_AP_CS_DIGITAL
,
441 static akm4xxx_t akm_delta1010lt __devinitdata
= {
446 .lock
= delta1010lt_ak4524_lock
,
447 .set_rate_val
= delta_ak4524_set_rate_val
451 static struct snd_ak4xxx_private akm_delta1010lt_priv __devinitdata
= {
453 .cif
= 0, /* the default level of the CIF pin from AK4524 */
454 .data_mask
= ICE1712_DELTA_1010LT_DOUT
,
455 .clk_mask
= ICE1712_DELTA_1010LT_CCLK
,
457 .cs_addr
= 0, /* set later */
458 .cs_none
= ICE1712_DELTA_1010LT_CS_NONE
,
463 static akm4xxx_t akm_delta44 __devinitdata
= {
468 .lock
= delta_ak4524_lock
,
469 .set_rate_val
= delta_ak4524_set_rate_val
473 static struct snd_ak4xxx_private akm_delta44_priv __devinitdata
= {
475 .cif
= 0, /* the default level of the CIF pin from AK4524 */
476 .data_mask
= ICE1712_DELTA_CODEC_SERIAL_DATA
,
477 .clk_mask
= ICE1712_DELTA_CODEC_SERIAL_CLOCK
,
479 .cs_addr
= 0, /* set later */
485 static akm4xxx_t akm_vx442 __devinitdata
= {
490 .lock
= vx442_ak4524_lock
,
491 .set_rate_val
= vx442_ak4524_set_rate_val
495 static struct snd_ak4xxx_private akm_vx442_priv __devinitdata
= {
498 .data_mask
= ICE1712_VX442_DOUT
,
499 .clk_mask
= ICE1712_VX442_CCLK
,
501 .cs_addr
= 0, /* set later */
507 static int __devinit
snd_ice1712_delta_init(ice1712_t
*ice
)
512 /* determine I2C, DACs and ADCs */
513 switch (ice
->eeprom
.subvendor
) {
514 case ICE1712_SUBDEVICE_AUDIOPHILE
:
515 ice
->num_total_dacs
= 2;
516 ice
->num_total_adcs
= 2;
518 case ICE1712_SUBDEVICE_DELTA410
:
519 ice
->num_total_dacs
= 8;
520 ice
->num_total_adcs
= 2;
522 case ICE1712_SUBDEVICE_DELTA44
:
523 case ICE1712_SUBDEVICE_DELTA66
:
524 ice
->num_total_dacs
= ice
->omni
? 8 : 4;
525 ice
->num_total_adcs
= ice
->omni
? 8 : 4;
527 case ICE1712_SUBDEVICE_DELTA1010
:
528 case ICE1712_SUBDEVICE_DELTA1010LT
:
529 case ICE1712_SUBDEVICE_MEDIASTATION
:
530 ice
->num_total_dacs
= 8;
531 ice
->num_total_adcs
= 8;
533 case ICE1712_SUBDEVICE_DELTADIO2496
:
534 ice
->num_total_dacs
= 4; /* two AK4324 codecs */
536 case ICE1712_SUBDEVICE_VX442
:
537 ice
->num_total_dacs
= 4;
538 ice
->num_total_adcs
= 4;
542 /* initialize spdif */
543 switch (ice
->eeprom
.subvendor
) {
544 case ICE1712_SUBDEVICE_AUDIOPHILE
:
545 case ICE1712_SUBDEVICE_DELTA410
:
546 case ICE1712_SUBDEVICE_DELTA1010LT
:
547 case ICE1712_SUBDEVICE_VX442
:
548 if ((err
= snd_i2c_bus_create(ice
->card
, "ICE1712 GPIO 1", NULL
, &ice
->i2c
)) < 0) {
549 snd_printk("unable to create I2C bus\n");
552 ice
->i2c
->private_data
= ice
;
553 ice
->i2c
->ops
= &ap_cs8427_i2c_ops
;
554 if ((err
= snd_ice1712_init_cs8427(ice
, CS8427_BASE_ADDR
)) < 0)
557 case ICE1712_SUBDEVICE_DELTA1010
:
558 case ICE1712_SUBDEVICE_MEDIASTATION
:
559 ice
->gpio
.set_pro_rate
= delta_1010_set_rate_val
;
561 case ICE1712_SUBDEVICE_DELTADIO2496
:
562 ice
->gpio
.set_pro_rate
= delta_1010_set_rate_val
;
564 case ICE1712_SUBDEVICE_DELTA66
:
565 ice
->spdif
.ops
.open
= delta_open_spdif
;
566 ice
->spdif
.ops
.setup_rate
= delta_setup_spdif
;
567 ice
->spdif
.ops
.default_get
= delta_spdif_default_get
;
568 ice
->spdif
.ops
.default_put
= delta_spdif_default_put
;
569 ice
->spdif
.ops
.stream_get
= delta_spdif_stream_get
;
570 ice
->spdif
.ops
.stream_put
= delta_spdif_stream_put
;
571 /* Set spdif defaults */
572 snd_ice1712_delta_cs8403_spdif_write(ice
, ice
->spdif
.cs8403_bits
);
577 switch (ice
->eeprom
.subvendor
) {
578 case ICE1712_SUBDEVICE_DELTA1010
:
579 case ICE1712_SUBDEVICE_DELTADIO2496
:
580 case ICE1712_SUBDEVICE_MEDIASTATION
:
584 /* second stage of initialization, analog parts and others */
585 ak
= ice
->akm
= kmalloc(sizeof(akm4xxx_t
), GFP_KERNEL
);
590 switch (ice
->eeprom
.subvendor
) {
591 case ICE1712_SUBDEVICE_AUDIOPHILE
:
592 err
= snd_ice1712_akm4xxx_init(ak
, &akm_audiophile
, &akm_audiophile_priv
, ice
);
594 case ICE1712_SUBDEVICE_DELTA410
:
595 err
= snd_ice1712_akm4xxx_init(ak
, &akm_delta410
, &akm_delta410_priv
, ice
);
597 case ICE1712_SUBDEVICE_DELTA1010LT
:
598 err
= snd_ice1712_akm4xxx_init(ak
, &akm_delta1010lt
, &akm_delta1010lt_priv
, ice
);
600 case ICE1712_SUBDEVICE_DELTA66
:
601 case ICE1712_SUBDEVICE_DELTA44
:
602 err
= snd_ice1712_akm4xxx_init(ak
, &akm_delta44
, &akm_delta44_priv
, ice
);
604 case ICE1712_SUBDEVICE_VX442
:
605 err
= snd_ice1712_akm4xxx_init(ak
, &akm_vx442
, &akm_vx442_priv
, ice
);
617 * additional controls for M-Audio cards
620 static snd_kcontrol_new_t snd_ice1712_delta1010_wordclock_select __devinitdata
=
621 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_PCM
, "Word Clock Sync", 0, ICE1712_DELTA_WORD_CLOCK_SELECT
, 1, 0);
622 static snd_kcontrol_new_t snd_ice1712_delta1010lt_wordclock_select __devinitdata
=
623 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_PCM
, "Word Clock Sync", 0, ICE1712_DELTA_1010LT_WORDCLOCK
, 1, 0);
624 static snd_kcontrol_new_t snd_ice1712_delta1010_wordclock_status __devinitdata
=
625 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_PCM
, "Word Clock Status", 0, ICE1712_DELTA_WORD_CLOCK_STATUS
, 1, SNDRV_CTL_ELEM_ACCESS_READ
| SNDRV_CTL_ELEM_ACCESS_VOLATILE
);
626 static snd_kcontrol_new_t snd_ice1712_deltadio2496_spdif_in_select __devinitdata
=
627 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_PCM
, "IEC958 Input Optical", 0, ICE1712_DELTA_SPDIF_INPUT_SELECT
, 0, 0);
628 static snd_kcontrol_new_t snd_ice1712_delta_spdif_in_status __devinitdata
=
629 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_PCM
, "Delta IEC958 Input Status", 0, ICE1712_DELTA_SPDIF_IN_STAT
, 1, SNDRV_CTL_ELEM_ACCESS_READ
| SNDRV_CTL_ELEM_ACCESS_VOLATILE
);
632 static int __devinit
snd_ice1712_delta_add_controls(ice1712_t
*ice
)
636 /* 1010 and dio specific controls */
637 switch (ice
->eeprom
.subvendor
) {
638 case ICE1712_SUBDEVICE_DELTA1010
:
639 case ICE1712_SUBDEVICE_MEDIASTATION
:
640 err
= snd_ctl_add(ice
->card
, snd_ctl_new1(&snd_ice1712_delta1010_wordclock_select
, ice
));
643 err
= snd_ctl_add(ice
->card
, snd_ctl_new1(&snd_ice1712_delta1010_wordclock_status
, ice
));
647 case ICE1712_SUBDEVICE_DELTADIO2496
:
648 err
= snd_ctl_add(ice
->card
, snd_ctl_new1(&snd_ice1712_deltadio2496_spdif_in_select
, ice
));
652 case ICE1712_SUBDEVICE_DELTA1010LT
:
653 err
= snd_ctl_add(ice
->card
, snd_ctl_new1(&snd_ice1712_delta1010lt_wordclock_select
, ice
));
659 /* normal spdif controls */
660 switch (ice
->eeprom
.subvendor
) {
661 case ICE1712_SUBDEVICE_DELTA1010
:
662 case ICE1712_SUBDEVICE_DELTADIO2496
:
663 case ICE1712_SUBDEVICE_DELTA66
:
664 case ICE1712_SUBDEVICE_MEDIASTATION
:
665 err
= snd_ice1712_spdif_build_controls(ice
);
671 /* spdif status in */
672 switch (ice
->eeprom
.subvendor
) {
673 case ICE1712_SUBDEVICE_DELTA1010
:
674 case ICE1712_SUBDEVICE_DELTADIO2496
:
675 case ICE1712_SUBDEVICE_DELTA66
:
676 case ICE1712_SUBDEVICE_MEDIASTATION
:
677 err
= snd_ctl_add(ice
->card
, snd_ctl_new1(&snd_ice1712_delta_spdif_in_status
, ice
));
683 /* ak4524 controls */
684 switch (ice
->eeprom
.subvendor
) {
685 case ICE1712_SUBDEVICE_DELTA1010LT
:
686 case ICE1712_SUBDEVICE_AUDIOPHILE
:
687 case ICE1712_SUBDEVICE_DELTA410
:
688 case ICE1712_SUBDEVICE_DELTA44
:
689 case ICE1712_SUBDEVICE_DELTA66
:
690 case ICE1712_SUBDEVICE_VX442
:
691 err
= snd_ice1712_akm4xxx_build_controls(ice
);
702 struct snd_ice1712_card_info snd_ice1712_delta_cards
[] __devinitdata
= {
704 .subvendor
= ICE1712_SUBDEVICE_DELTA1010
,
705 .name
= "M Audio Delta 1010",
706 .model
= "delta1010",
707 .chip_init
= snd_ice1712_delta_init
,
708 .build_controls
= snd_ice1712_delta_add_controls
,
711 .subvendor
= ICE1712_SUBDEVICE_DELTADIO2496
,
712 .name
= "M Audio Delta DiO 2496",
714 .chip_init
= snd_ice1712_delta_init
,
715 .build_controls
= snd_ice1712_delta_add_controls
,
719 .subvendor
= ICE1712_SUBDEVICE_DELTA66
,
720 .name
= "M Audio Delta 66",
722 .chip_init
= snd_ice1712_delta_init
,
723 .build_controls
= snd_ice1712_delta_add_controls
,
727 .subvendor
= ICE1712_SUBDEVICE_DELTA44
,
728 .name
= "M Audio Delta 44",
730 .chip_init
= snd_ice1712_delta_init
,
731 .build_controls
= snd_ice1712_delta_add_controls
,
735 .subvendor
= ICE1712_SUBDEVICE_AUDIOPHILE
,
736 .name
= "M Audio Audiophile 24/96",
737 .model
= "audiophile",
738 .chip_init
= snd_ice1712_delta_init
,
739 .build_controls
= snd_ice1712_delta_add_controls
,
742 .subvendor
= ICE1712_SUBDEVICE_DELTA410
,
743 .name
= "M Audio Delta 410",
745 .chip_init
= snd_ice1712_delta_init
,
746 .build_controls
= snd_ice1712_delta_add_controls
,
749 .subvendor
= ICE1712_SUBDEVICE_DELTA1010LT
,
750 .name
= "M Audio Delta 1010LT",
751 .model
= "delta1010lt",
752 .chip_init
= snd_ice1712_delta_init
,
753 .build_controls
= snd_ice1712_delta_add_controls
,
756 .subvendor
= ICE1712_SUBDEVICE_VX442
,
757 .name
= "Digigram VX442",
759 .chip_init
= snd_ice1712_delta_init
,
760 .build_controls
= snd_ice1712_delta_add_controls
,
764 .subvendor
= ICE1712_SUBDEVICE_MEDIASTATION
,
765 .name
= "Lionstracs Mediastation",
766 .model
= "mediastation",
767 .chip_init
= snd_ice1712_delta_init
,
768 .build_controls
= snd_ice1712_delta_add_controls
,