quartet.c (f43dc23d5ea91fca257be02138a255f02d98e806) | quartet.c (a2af050f8df6eeec29818639859f14eb237d6957) |
---|---|
1/* 2 * ALSA driver for ICEnsemble VT1724 (Envy24HT) 3 * 4 * Lowlevel functions for Infrasonic Quartet 5 * 6 * Copyright (c) 2009 Pavel Hofman <pavel.hofman@ivitera.com> 7 * 8 * --- 33 unchanged lines hidden (view full) --- 42 unsigned int mcr; /* monitoring control register */ 43 unsigned int cpld; /* cpld register */ 44}; 45 46struct qtet_kcontrol_private { 47 unsigned int bit; 48 void (*set_register)(struct snd_ice1712 *ice, unsigned int val); 49 unsigned int (*get_register)(struct snd_ice1712 *ice); | 1/* 2 * ALSA driver for ICEnsemble VT1724 (Envy24HT) 3 * 4 * Lowlevel functions for Infrasonic Quartet 5 * 6 * Copyright (c) 2009 Pavel Hofman <pavel.hofman@ivitera.com> 7 * 8 * --- 33 unchanged lines hidden (view full) --- 42 unsigned int mcr; /* monitoring control register */ 43 unsigned int cpld; /* cpld register */ 44}; 45 46struct qtet_kcontrol_private { 47 unsigned int bit; 48 void (*set_register)(struct snd_ice1712 *ice, unsigned int val); 49 unsigned int (*get_register)(struct snd_ice1712 *ice); |
50 unsigned char *texts[2]; | 50 unsigned char * const texts[2]; |
51}; 52 53enum { 54 IN12_SEL = 0, 55 IN34_SEL, 56 AIN34_SEL, 57 COAX_OUT, 58 IN12_MON12, 59 IN12_MON34, 60 IN34_MON12, 61 IN34_MON34, 62 OUT12_MON34, 63 OUT34_MON12, 64}; 65 | 51}; 52 53enum { 54 IN12_SEL = 0, 55 IN34_SEL, 56 AIN34_SEL, 57 COAX_OUT, 58 IN12_MON12, 59 IN12_MON34, 60 IN34_MON12, 61 IN34_MON34, 62 OUT12_MON34, 63 OUT34_MON12, 64}; 65 |
66static char *ext_clock_names[3] = {"IEC958 In", "Word Clock 1xFS", | 66static const char * const ext_clock_names[3] = {"IEC958 In", "Word Clock 1xFS", |
67 "Word Clock 256xFS"}; 68 69/* chip address on I2C bus */ 70#define AK4113_ADDR 0x26 /* S/PDIF receiver */ 71 72/* chip address on SPI bus */ 73#define AK4620_ADDR 0x02 /* ADC/DAC */ 74 --- 471 unchanged lines hidden (view full) --- 546 } 547 /* no change */ 548 return 0; 549} 550 551static int qtet_ain12_enum_info(struct snd_kcontrol *kcontrol, 552 struct snd_ctl_elem_info *uinfo) 553{ | 67 "Word Clock 256xFS"}; 68 69/* chip address on I2C bus */ 70#define AK4113_ADDR 0x26 /* S/PDIF receiver */ 71 72/* chip address on SPI bus */ 73#define AK4620_ADDR 0x02 /* ADC/DAC */ 74 --- 471 unchanged lines hidden (view full) --- 546 } 547 /* no change */ 548 return 0; 549} 550 551static int qtet_ain12_enum_info(struct snd_kcontrol *kcontrol, 552 struct snd_ctl_elem_info *uinfo) 553{ |
554 static char *texts[3] = {"Line In 1/2", "Mic", "Mic + Low-cut"}; | 554 static const char * const texts[3] = 555 {"Line In 1/2", "Mic", "Mic + Low-cut"}; |
555 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 556 uinfo->count = 1; 557 uinfo->value.enumerated.items = ARRAY_SIZE(texts); 558 559 if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) 560 uinfo->value.enumerated.item = 561 uinfo->value.enumerated.items - 1; 562 strcpy(uinfo->value.enumerated.name, --- 248 unchanged lines hidden (view full) --- 811 memset(&sid, 0, sizeof(sid)); 812 /* FIXME: strcpy is bad. */ 813 strcpy(sid.name, name); 814 sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 815 return snd_ctl_find_id(card, &sid); 816} 817 818static void __devinit add_slaves(struct snd_card *card, | 556 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 557 uinfo->count = 1; 558 uinfo->value.enumerated.items = ARRAY_SIZE(texts); 559 560 if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) 561 uinfo->value.enumerated.item = 562 uinfo->value.enumerated.items - 1; 563 strcpy(uinfo->value.enumerated.name, --- 248 unchanged lines hidden (view full) --- 812 memset(&sid, 0, sizeof(sid)); 813 /* FIXME: strcpy is bad. */ 814 strcpy(sid.name, name); 815 sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 816 return snd_ctl_find_id(card, &sid); 817} 818 819static void __devinit add_slaves(struct snd_card *card, |
819 struct snd_kcontrol *master, char **list) | 820 struct snd_kcontrol *master, char * const *list) |
820{ 821 for (; *list; list++) { 822 struct snd_kcontrol *slave = ctl_find(card, *list); 823 if (slave) 824 snd_ctl_add_slave(master, slave); 825 } 826} 827 --- 303 unchanged lines hidden --- | 821{ 822 for (; *list; list++) { 823 struct snd_kcontrol *slave = ctl_find(card, *list); 824 if (slave) 825 snd_ctl_add_slave(master, slave); 826 } 827} 828 --- 303 unchanged lines hidden --- |