[ALSA] Remove xxx_t typedefs: PCI ICE1712

Modules: ICE1712 driver

Remove xxx_t typedefs from the PCI ICE1712 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2005-11-17 14:59:52 +01:00 committed by Jaroslav Kysela
parent a98f90fd82
commit 6ca308d4ed
6 changed files with 500 additions and 454 deletions

View File

@ -34,16 +34,16 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
MODULE_DESCRIPTION("ICEnsemble ICE17xx <-> AK4xxx AD/DA chip interface");
MODULE_LICENSE("GPL");
static void snd_ice1712_akm4xxx_lock(akm4xxx_t *ak, int chip)
static void snd_ice1712_akm4xxx_lock(struct snd_akm4xxx *ak, int chip)
{
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
snd_ice1712_save_gpio_status(ice);
}
static void snd_ice1712_akm4xxx_unlock(akm4xxx_t *ak, int chip)
static void snd_ice1712_akm4xxx_unlock(struct snd_akm4xxx *ak, int chip)
{
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
snd_ice1712_restore_gpio_status(ice);
}
@ -51,14 +51,14 @@ static void snd_ice1712_akm4xxx_unlock(akm4xxx_t *ak, int chip)
/*
* write AK4xxx register
*/
static void snd_ice1712_akm4xxx_write(akm4xxx_t *ak, int chip,
static void snd_ice1712_akm4xxx_write(struct snd_akm4xxx *ak, int chip,
unsigned char addr, unsigned char data)
{
unsigned int tmp;
int idx;
unsigned int addrdata;
struct snd_ak4xxx_private *priv = (void *)ak->private_value[0];
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
snd_assert(chip >= 0 && chip < 4, return);
@ -119,10 +119,10 @@ static void snd_ice1712_akm4xxx_write(akm4xxx_t *ak, int chip,
}
/*
* initialize the akm4xxx_t record with the template
* initialize the struct snd_akm4xxx record with the template
*/
int snd_ice1712_akm4xxx_init(akm4xxx_t *ak, const akm4xxx_t *temp,
const struct snd_ak4xxx_private *_priv, ice1712_t *ice)
int snd_ice1712_akm4xxx_init(struct snd_akm4xxx *ak, const struct snd_akm4xxx *temp,
const struct snd_ak4xxx_private *_priv, struct snd_ice1712 *ice)
{
struct snd_ak4xxx_private *priv;
@ -148,13 +148,13 @@ int snd_ice1712_akm4xxx_init(akm4xxx_t *ak, const akm4xxx_t *temp,
return 0;
}
void snd_ice1712_akm4xxx_free(ice1712_t *ice)
void snd_ice1712_akm4xxx_free(struct snd_ice1712 *ice)
{
unsigned int akidx;
if (ice->akm == NULL)
return;
for (akidx = 0; akidx < ice->akm_codecs; akidx++) {
akm4xxx_t *ak = &ice->akm[akidx];
struct snd_akm4xxx *ak = &ice->akm[akidx];
kfree((void*)ak->private_value[0]);
}
kfree(ice->akm);
@ -163,13 +163,13 @@ void snd_ice1712_akm4xxx_free(ice1712_t *ice)
/*
* build AK4xxx controls
*/
int snd_ice1712_akm4xxx_build_controls(ice1712_t *ice)
int snd_ice1712_akm4xxx_build_controls(struct snd_ice1712 *ice)
{
unsigned int akidx;
int err;
for (akidx = 0; akidx < ice->akm_codecs; akidx++) {
akm4xxx_t *ak = &ice->akm[akidx];
struct snd_akm4xxx *ak = &ice->akm[akidx];
err = snd_akm4xxx_build_controls(ak);
if (err < 0)
return err;

View File

@ -44,7 +44,7 @@
*/
/* send 8 bits */
static void ap_cs8427_write_byte(ice1712_t *ice, unsigned char data, unsigned char tmp)
static void ap_cs8427_write_byte(struct snd_ice1712 *ice, unsigned char data, unsigned char tmp)
{
int idx;
@ -61,7 +61,7 @@ static void ap_cs8427_write_byte(ice1712_t *ice, unsigned char data, unsigned ch
}
/* read 8 bits */
static unsigned char ap_cs8427_read_byte(ice1712_t *ice, unsigned char tmp)
static unsigned char ap_cs8427_read_byte(struct snd_ice1712 *ice, unsigned char tmp)
{
unsigned char data = 0;
int idx;
@ -80,7 +80,7 @@ static unsigned char ap_cs8427_read_byte(ice1712_t *ice, unsigned char tmp)
}
/* assert chip select */
static unsigned char ap_cs8427_codec_select(ice1712_t *ice)
static unsigned char ap_cs8427_codec_select(struct snd_ice1712 *ice)
{
unsigned char tmp;
tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
@ -105,7 +105,7 @@ static unsigned char ap_cs8427_codec_select(ice1712_t *ice)
}
/* deassert chip select */
static void ap_cs8427_codec_deassert(ice1712_t *ice, unsigned char tmp)
static void ap_cs8427_codec_deassert(struct snd_ice1712 *ice, unsigned char tmp)
{
switch (ice->eeprom.subvendor) {
case ICE1712_SUBDEVICE_DELTA1010LT:
@ -124,9 +124,9 @@ static void ap_cs8427_codec_deassert(ice1712_t *ice, unsigned char tmp)
}
/* sequential write */
static int ap_cs8427_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count)
static int ap_cs8427_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count)
{
ice1712_t *ice = device->bus->private_data;
struct snd_ice1712 *ice = device->bus->private_data;
int res = count;
unsigned char tmp;
@ -141,9 +141,9 @@ static int ap_cs8427_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, i
}
/* sequential read */
static int ap_cs8427_readbytes(snd_i2c_device_t *device, unsigned char *bytes, int count)
static int ap_cs8427_readbytes(struct snd_i2c_device *device, unsigned char *bytes, int count)
{
ice1712_t *ice = device->bus->private_data;
struct snd_ice1712 *ice = device->bus->private_data;
int res = count;
unsigned char tmp;
@ -157,14 +157,14 @@ static int ap_cs8427_readbytes(snd_i2c_device_t *device, unsigned char *bytes, i
return res;
}
static int ap_cs8427_probeaddr(snd_i2c_bus_t *bus, unsigned short addr)
static int ap_cs8427_probeaddr(struct snd_i2c_bus *bus, unsigned short addr)
{
if (addr == 0x10)
return 1;
return -ENOENT;
}
static snd_i2c_ops_t ap_cs8427_i2c_ops = {
static struct snd_i2c_ops ap_cs8427_i2c_ops = {
.sendbytes = ap_cs8427_sendbytes,
.readbytes = ap_cs8427_readbytes,
.probeaddr = ap_cs8427_probeaddr,
@ -173,7 +173,7 @@ static snd_i2c_ops_t ap_cs8427_i2c_ops = {
/*
*/
static void snd_ice1712_delta_cs8403_spdif_write(ice1712_t *ice, unsigned char bits)
static void snd_ice1712_delta_cs8403_spdif_write(struct snd_ice1712 *ice, unsigned char bits)
{
unsigned char tmp, mask1, mask2;
int idx;
@ -198,12 +198,12 @@ static void snd_ice1712_delta_cs8403_spdif_write(ice1712_t *ice, unsigned char b
}
static void delta_spdif_default_get(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol)
static void delta_spdif_default_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
{
snd_cs8403_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_bits);
}
static int delta_spdif_default_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol)
static int delta_spdif_default_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
{
unsigned int val;
int change;
@ -221,12 +221,12 @@ static int delta_spdif_default_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontr
return change;
}
static void delta_spdif_stream_get(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol)
static void delta_spdif_stream_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
{
snd_cs8403_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_stream_bits);
}
static int delta_spdif_stream_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol)
static int delta_spdif_stream_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
{
unsigned int val;
int change;
@ -248,10 +248,10 @@ static int delta_spdif_stream_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontro
/*
* AK4524 on Delta 44 and 66 to choose the chip mask
*/
static void delta_ak4524_lock(akm4xxx_t *ak, int chip)
static void delta_ak4524_lock(struct snd_akm4xxx *ak, int chip)
{
struct snd_ak4xxx_private *priv = (void *)ak->private_value[0];
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
snd_ice1712_save_gpio_status(ice);
priv->cs_mask =
@ -262,10 +262,10 @@ static void delta_ak4524_lock(akm4xxx_t *ak, int chip)
/*
* AK4524 on Delta1010LT to choose the chip address
*/
static void delta1010lt_ak4524_lock(akm4xxx_t *ak, int chip)
static void delta1010lt_ak4524_lock(struct snd_akm4xxx *ak, int chip)
{
struct snd_ak4xxx_private *priv = (void *)ak->private_value[0];
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
snd_ice1712_save_gpio_status(ice);
priv->cs_mask = ICE1712_DELTA_1010LT_CS;
@ -275,10 +275,10 @@ static void delta1010lt_ak4524_lock(akm4xxx_t *ak, int chip)
/*
* AK4528 on VX442 to choose the chip mask
*/
static void vx442_ak4524_lock(akm4xxx_t *ak, int chip)
static void vx442_ak4524_lock(struct snd_akm4xxx *ak, int chip)
{
struct snd_ak4xxx_private *priv = (void *)ak->private_value[0];
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
snd_ice1712_save_gpio_status(ice);
priv->cs_mask =
@ -289,7 +289,7 @@ static void vx442_ak4524_lock(akm4xxx_t *ak, int chip)
/*
* change the DFS bit according rate for Delta1010
*/
static void delta_1010_set_rate_val(ice1712_t *ice, unsigned int rate)
static void delta_1010_set_rate_val(struct snd_ice1712 *ice, unsigned int rate)
{
unsigned char tmp, tmp2;
@ -309,10 +309,10 @@ static void delta_1010_set_rate_val(ice1712_t *ice, unsigned int rate)
/*
* change the rate of AK4524 on Delta 44/66, AP, 1010LT
*/
static void delta_ak4524_set_rate_val(akm4xxx_t *ak, unsigned int rate)
static void delta_ak4524_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
{
unsigned char tmp, tmp2;
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
if (rate == 0) /* no hint - S/PDIF input is master, simply return */
return;
@ -341,7 +341,7 @@ static void delta_ak4524_set_rate_val(akm4xxx_t *ak, unsigned int rate)
/*
* change the rate of AK4524 on VX442
*/
static void vx442_ak4524_set_rate_val(akm4xxx_t *ak, unsigned int rate)
static void vx442_ak4524_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
{
unsigned char val;
@ -361,13 +361,13 @@ static void vx442_ak4524_set_rate_val(akm4xxx_t *ak, unsigned int rate)
*/
/* open callback */
static void delta_open_spdif(ice1712_t *ice, snd_pcm_substream_t * substream)
static void delta_open_spdif(struct snd_ice1712 *ice, struct snd_pcm_substream *substream)
{
ice->spdif.cs8403_stream_bits = ice->spdif.cs8403_bits;
}
/* set up */
static void delta_setup_spdif(ice1712_t *ice, int rate)
static void delta_setup_spdif(struct snd_ice1712 *ice, int rate)
{
unsigned long flags;
unsigned int tmp;
@ -396,7 +396,7 @@ static void delta_setup_spdif(ice1712_t *ice, int rate)
* initialize the chips on M-Audio cards
*/
static akm4xxx_t akm_audiophile __devinitdata = {
static struct snd_akm4xxx akm_audiophile __devinitdata = {
.type = SND_AK4528,
.num_adcs = 2,
.num_dacs = 2,
@ -417,7 +417,7 @@ static struct snd_ak4xxx_private akm_audiophile_priv __devinitdata = {
.mask_flags = 0,
};
static akm4xxx_t akm_delta410 __devinitdata = {
static struct snd_akm4xxx akm_delta410 __devinitdata = {
.type = SND_AK4529,
.num_adcs = 2,
.num_dacs = 8,
@ -438,7 +438,7 @@ static struct snd_ak4xxx_private akm_delta410_priv __devinitdata = {
.mask_flags = 0,
};
static akm4xxx_t akm_delta1010lt __devinitdata = {
static struct snd_akm4xxx akm_delta1010lt __devinitdata = {
.type = SND_AK4524,
.num_adcs = 8,
.num_dacs = 8,
@ -460,7 +460,7 @@ static struct snd_ak4xxx_private akm_delta1010lt_priv __devinitdata = {
.mask_flags = 0,
};
static akm4xxx_t akm_delta44 __devinitdata = {
static struct snd_akm4xxx akm_delta44 __devinitdata = {
.type = SND_AK4524,
.num_adcs = 4,
.num_dacs = 4,
@ -482,7 +482,7 @@ static struct snd_ak4xxx_private akm_delta44_priv __devinitdata = {
.mask_flags = 0,
};
static akm4xxx_t akm_vx442 __devinitdata = {
static struct snd_akm4xxx akm_vx442 __devinitdata = {
.type = SND_AK4524,
.num_adcs = 4,
.num_dacs = 4,
@ -504,10 +504,10 @@ static struct snd_ak4xxx_private akm_vx442_priv __devinitdata = {
.mask_flags = 0,
};
static int __devinit snd_ice1712_delta_init(ice1712_t *ice)
static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice)
{
int err;
akm4xxx_t *ak;
struct snd_akm4xxx *ak;
/* determine I2C, DACs and ADCs */
switch (ice->eeprom.subvendor) {
@ -582,7 +582,7 @@ static int __devinit snd_ice1712_delta_init(ice1712_t *ice)
}
/* second stage of initialization, analog parts and others */
ak = ice->akm = kmalloc(sizeof(akm4xxx_t), GFP_KERNEL);
ak = ice->akm = kmalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
if (! ak)
return -ENOMEM;
ice->akm_codecs = 1;
@ -617,19 +617,19 @@ static int __devinit snd_ice1712_delta_init(ice1712_t *ice)
* additional controls for M-Audio cards
*/
static snd_kcontrol_new_t snd_ice1712_delta1010_wordclock_select __devinitdata =
static struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_select __devinitdata =
ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Sync", 0, ICE1712_DELTA_WORD_CLOCK_SELECT, 1, 0);
static snd_kcontrol_new_t snd_ice1712_delta1010lt_wordclock_select __devinitdata =
static struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_select __devinitdata =
ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Sync", 0, ICE1712_DELTA_1010LT_WORDCLOCK, 1, 0);
static snd_kcontrol_new_t snd_ice1712_delta1010_wordclock_status __devinitdata =
static struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_status __devinitdata =
ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Status", 0, ICE1712_DELTA_WORD_CLOCK_STATUS, 1, SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE);
static snd_kcontrol_new_t snd_ice1712_deltadio2496_spdif_in_select __devinitdata =
static struct snd_kcontrol_new snd_ice1712_deltadio2496_spdif_in_select __devinitdata =
ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "IEC958 Input Optical", 0, ICE1712_DELTA_SPDIF_INPUT_SELECT, 0, 0);
static snd_kcontrol_new_t snd_ice1712_delta_spdif_in_status __devinitdata =
static struct snd_kcontrol_new snd_ice1712_delta_spdif_in_status __devinitdata =
ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Delta IEC958 Input Status", 0, ICE1712_DELTA_SPDIF_IN_STAT, 1, SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE);
static int __devinit snd_ice1712_delta_add_controls(ice1712_t *ice)
static int __devinit snd_ice1712_delta_add_controls(struct snd_ice1712 *ice)
{
int err;

View File

@ -50,9 +50,9 @@ enum {
*/
/* send SDA and SCL */
static void ewx_i2c_setlines(snd_i2c_bus_t *bus, int clk, int data)
static void ewx_i2c_setlines(struct snd_i2c_bus *bus, int clk, int data)
{
ice1712_t *ice = bus->private_data;
struct snd_ice1712 *ice = bus->private_data;
unsigned char tmp = 0;
if (clk)
tmp |= ICE1712_EWX2496_SERIAL_CLOCK;
@ -62,15 +62,15 @@ static void ewx_i2c_setlines(snd_i2c_bus_t *bus, int clk, int data)
udelay(5);
}
static int ewx_i2c_getclock(snd_i2c_bus_t *bus)
static int ewx_i2c_getclock(struct snd_i2c_bus *bus)
{
ice1712_t *ice = bus->private_data;
struct snd_ice1712 *ice = bus->private_data;
return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_EWX2496_SERIAL_CLOCK ? 1 : 0;
}
static int ewx_i2c_getdata(snd_i2c_bus_t *bus, int ack)
static int ewx_i2c_getdata(struct snd_i2c_bus *bus, int ack)
{
ice1712_t *ice = bus->private_data;
struct snd_ice1712 *ice = bus->private_data;
int bit;
/* set RW pin to low */
snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~ICE1712_EWX2496_RW);
@ -85,9 +85,9 @@ static int ewx_i2c_getdata(snd_i2c_bus_t *bus, int ack)
return bit;
}
static void ewx_i2c_start(snd_i2c_bus_t *bus)
static void ewx_i2c_start(struct snd_i2c_bus *bus)
{
ice1712_t *ice = bus->private_data;
struct snd_ice1712 *ice = bus->private_data;
unsigned char mask;
snd_ice1712_save_gpio_status(ice);
@ -104,15 +104,15 @@ static void ewx_i2c_start(snd_i2c_bus_t *bus)
snd_ice1712_gpio_write_bits(ice, mask, mask);
}
static void ewx_i2c_stop(snd_i2c_bus_t *bus)
static void ewx_i2c_stop(struct snd_i2c_bus *bus)
{
ice1712_t *ice = bus->private_data;
struct snd_ice1712 *ice = bus->private_data;
snd_ice1712_restore_gpio_status(ice);
}
static void ewx_i2c_direction(snd_i2c_bus_t *bus, int clock, int data)
static void ewx_i2c_direction(struct snd_i2c_bus *bus, int clock, int data)
{
ice1712_t *ice = bus->private_data;
struct snd_ice1712 *ice = bus->private_data;
unsigned char mask = 0;
if (clock)
@ -125,7 +125,7 @@ static void ewx_i2c_direction(snd_i2c_bus_t *bus, int clock, int data)
snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~mask);
}
static snd_i2c_bit_ops_t snd_ice1712_ewx_cs8427_bit_ops = {
static struct snd_i2c_bit_ops snd_ice1712_ewx_cs8427_bit_ops = {
.start = ewx_i2c_start,
.stop = ewx_i2c_stop,
.direction = ewx_i2c_direction,
@ -140,7 +140,7 @@ static snd_i2c_bit_ops_t snd_ice1712_ewx_cs8427_bit_ops = {
*/
/* AK4524 chip select; address 0x48 bit 0-3 */
static int snd_ice1712_ews88mt_chip_select(ice1712_t *ice, int chip_mask)
static int snd_ice1712_ews88mt_chip_select(struct snd_ice1712 *ice, int chip_mask)
{
unsigned char data, ndata;
@ -162,9 +162,9 @@ static int snd_ice1712_ews88mt_chip_select(ice1712_t *ice, int chip_mask)
}
/* start callback for EWS88MT, needs to select a certain chip mask */
static void ews88mt_ak4524_lock(akm4xxx_t *ak, int chip)
static void ews88mt_ak4524_lock(struct snd_akm4xxx *ak, int chip)
{
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
unsigned char tmp;
/* assert AK4524 CS */
if (snd_ice1712_ews88mt_chip_select(ice, ~(1 << chip) & 0x0f) < 0)
@ -179,18 +179,18 @@ static void ews88mt_ak4524_lock(akm4xxx_t *ak, int chip)
}
/* stop callback for EWS88MT, needs to deselect chip mask */
static void ews88mt_ak4524_unlock(akm4xxx_t *ak, int chip)
static void ews88mt_ak4524_unlock(struct snd_akm4xxx *ak, int chip)
{
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
snd_ice1712_restore_gpio_status(ice);
udelay(1);
snd_ice1712_ews88mt_chip_select(ice, 0x0f);
}
/* start callback for EWX24/96 */
static void ewx2496_ak4524_lock(akm4xxx_t *ak, int chip)
static void ewx2496_ak4524_lock(struct snd_akm4xxx *ak, int chip)
{
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
unsigned char tmp;
snd_ice1712_save_gpio_status(ice);
tmp = ICE1712_EWX2496_SERIAL_DATA |
@ -203,10 +203,10 @@ static void ewx2496_ak4524_lock(akm4xxx_t *ak, int chip)
}
/* start callback for DMX 6fire */
static void dmx6fire_ak4524_lock(akm4xxx_t *ak, int chip)
static void dmx6fire_ak4524_lock(struct snd_akm4xxx *ak, int chip)
{
struct snd_ak4xxx_private *priv = (void *)ak->private_value[0];
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
unsigned char tmp;
snd_ice1712_save_gpio_status(ice);
tmp = priv->cs_mask = priv->cs_addr = (1 << chip) & ICE1712_6FIRE_AK4524_CS_MASK;
@ -222,7 +222,7 @@ static void dmx6fire_ak4524_lock(akm4xxx_t *ak, int chip)
* CS8404 interface on EWS88MT/D
*/
static void snd_ice1712_ews_cs8404_spdif_write(ice1712_t *ice, unsigned char bits)
static void snd_ice1712_ews_cs8404_spdif_write(struct snd_ice1712 *ice, unsigned char bits)
{
unsigned char bytes[2];
@ -251,12 +251,12 @@ static void snd_ice1712_ews_cs8404_spdif_write(ice1712_t *ice, unsigned char bit
/*
*/
static void ews88_spdif_default_get(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol)
static void ews88_spdif_default_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
{
snd_cs8404_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_bits);
}
static int ews88_spdif_default_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol)
static int ews88_spdif_default_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
{
unsigned int val;
int change;
@ -274,12 +274,12 @@ static int ews88_spdif_default_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontr
return change;
}
static void ews88_spdif_stream_get(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol)
static void ews88_spdif_stream_get(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
{
snd_cs8404_decode_spdif_bits(&ucontrol->value.iec958, ice->spdif.cs8403_stream_bits);
}
static int ews88_spdif_stream_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontrol)
static int ews88_spdif_stream_put(struct snd_ice1712 *ice, struct snd_ctl_elem_value *ucontrol)
{
unsigned int val;
int change;
@ -299,13 +299,13 @@ static int ews88_spdif_stream_put(ice1712_t *ice, snd_ctl_elem_value_t * ucontro
/* open callback */
static void ews88_open_spdif(ice1712_t *ice, snd_pcm_substream_t * substream)
static void ews88_open_spdif(struct snd_ice1712 *ice, struct snd_pcm_substream *substream)
{
ice->spdif.cs8403_stream_bits = ice->spdif.cs8403_bits;
}
/* set up SPDIF for EWS88MT / EWS88D */
static void ews88_setup_spdif(ice1712_t *ice, int rate)
static void ews88_setup_spdif(struct snd_ice1712 *ice, int rate)
{
unsigned long flags;
unsigned char tmp;
@ -332,7 +332,7 @@ static void ews88_setup_spdif(ice1712_t *ice, int rate)
/*
*/
static akm4xxx_t akm_ews88mt __devinitdata = {
static struct snd_akm4xxx akm_ews88mt __devinitdata = {
.num_adcs = 8,
.num_dacs = 8,
.type = SND_AK4524,
@ -354,7 +354,7 @@ static struct snd_ak4xxx_private akm_ews88mt_priv __devinitdata = {
.mask_flags = 0,
};
static akm4xxx_t akm_ewx2496 __devinitdata = {
static struct snd_akm4xxx akm_ewx2496 __devinitdata = {
.num_adcs = 2,
.num_dacs = 2,
.type = SND_AK4524,
@ -375,7 +375,7 @@ static struct snd_ak4xxx_private akm_ewx2496_priv __devinitdata = {
.mask_flags = 0,
};
static akm4xxx_t akm_6fire __devinitdata = {
static struct snd_akm4xxx akm_6fire __devinitdata = {
.num_adcs = 6,
.num_dacs = 6,
.type = SND_AK4524,
@ -406,12 +406,12 @@ static struct snd_ak4xxx_private akm_6fire_priv __devinitdata = {
#define PCF9554_REG_POLARITY 2
#define PCF9554_REG_CONFIG 3
static int snd_ice1712_6fire_write_pca(ice1712_t *ice, unsigned char reg, unsigned char data);
static int snd_ice1712_6fire_write_pca(struct snd_ice1712 *ice, unsigned char reg, unsigned char data);
static int __devinit snd_ice1712_ews_init(ice1712_t *ice)
static int __devinit snd_ice1712_ews_init(struct snd_ice1712 *ice)
{
int err;
akm4xxx_t *ak;
struct snd_akm4xxx *ak;
/* set the analog DACs */
switch (ice->eeprom.subvendor) {
@ -507,7 +507,7 @@ static int __devinit snd_ice1712_ews_init(ice1712_t *ice)
}
/* analog section */
ak = ice->akm = kmalloc(sizeof(akm4xxx_t), GFP_KERNEL);
ak = ice->akm = kmalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
if (! ak)
return -ENOMEM;
ice->akm_codecs = 1;
@ -536,7 +536,7 @@ static int __devinit snd_ice1712_ews_init(ice1712_t *ice)
*/
/* i/o sensitivity - this callback is shared among other devices, too */
static int snd_ice1712_ewx_io_sense_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo){
static int snd_ice1712_ewx_io_sense_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){
static char *texts[2] = {
"+4dBu", "-10dBV",
@ -550,9 +550,9 @@ static int snd_ice1712_ewx_io_sense_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
return 0;
}
static int snd_ice1712_ewx_io_sense_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_ice1712_ewx_io_sense_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned char mask = kcontrol->private_value & 0xff;
snd_ice1712_save_gpio_status(ice);
@ -561,9 +561,9 @@ static int snd_ice1712_ewx_io_sense_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_
return 0;
}
static int snd_ice1712_ewx_io_sense_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_ice1712_ewx_io_sense_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned char mask = kcontrol->private_value & 0xff;
int val, nval;
@ -578,7 +578,7 @@ static int snd_ice1712_ewx_io_sense_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_
return val != nval;
}
static snd_kcontrol_new_t snd_ice1712_ewx2496_controls[] __devinitdata = {
static struct snd_kcontrol_new snd_ice1712_ewx2496_controls[] __devinitdata = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Input Sensitivity Switch",
@ -602,9 +602,9 @@ static snd_kcontrol_new_t snd_ice1712_ewx2496_controls[] __devinitdata = {
* EWS88MT specific controls
*/
/* analog output sensitivity;; address 0x48 bit 6 */
static int snd_ice1712_ews88mt_output_sense_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_ews88mt_output_sense_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned char data;
snd_i2c_lock(ice->i2c);
@ -618,9 +618,9 @@ static int snd_ice1712_ews88mt_output_sense_get(snd_kcontrol_t *kcontrol, snd_ct
}
/* analog output sensitivity;; address 0x48 bit 6 */
static int snd_ice1712_ews88mt_output_sense_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_ews88mt_output_sense_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned char data, ndata;
snd_i2c_lock(ice->i2c);
@ -638,9 +638,9 @@ static int snd_ice1712_ews88mt_output_sense_put(snd_kcontrol_t *kcontrol, snd_ct
}
/* analog input sensitivity; address 0x46 */
static int snd_ice1712_ews88mt_input_sense_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_ews88mt_input_sense_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
int channel = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
unsigned char data;
@ -657,9 +657,9 @@ static int snd_ice1712_ews88mt_input_sense_get(snd_kcontrol_t *kcontrol, snd_ctl
}
/* analog output sensitivity; address 0x46 */
static int snd_ice1712_ews88mt_input_sense_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_ews88mt_input_sense_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
int channel = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
unsigned char data, ndata;
@ -678,7 +678,7 @@ static int snd_ice1712_ews88mt_input_sense_put(snd_kcontrol_t *kcontrol, snd_ctl
return ndata != data;
}
static snd_kcontrol_new_t snd_ice1712_ews88mt_input_sense __devinitdata = {
static struct snd_kcontrol_new snd_ice1712_ews88mt_input_sense __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Input Sensitivity Switch",
.info = snd_ice1712_ewx_io_sense_info,
@ -687,7 +687,7 @@ static snd_kcontrol_new_t snd_ice1712_ews88mt_input_sense __devinitdata = {
.count = 8,
};
static snd_kcontrol_new_t snd_ice1712_ews88mt_output_sense __devinitdata = {
static struct snd_kcontrol_new snd_ice1712_ews88mt_output_sense __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Output Sensitivity Switch",
.info = snd_ice1712_ewx_io_sense_info,
@ -700,7 +700,7 @@ static snd_kcontrol_new_t snd_ice1712_ews88mt_output_sense __devinitdata = {
* EWS88D specific controls
*/
static int snd_ice1712_ews88d_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
static int snd_ice1712_ews88d_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
@ -709,9 +709,9 @@ static int snd_ice1712_ews88d_control_info(snd_kcontrol_t *kcontrol, snd_ctl_ele
return 0;
}
static int snd_ice1712_ews88d_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_ews88d_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
int shift = kcontrol->private_value & 0xff;
int invert = (kcontrol->private_value >> 8) & 1;
unsigned char data[2];
@ -729,9 +729,9 @@ static int snd_ice1712_ews88d_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem
return 0;
}
static int snd_ice1712_ews88d_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_ice1712_ews88d_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
int shift = kcontrol->private_value & 0xff;
int invert = (kcontrol->private_value >> 8) & 1;
unsigned char data[2], ndata[2];
@ -769,7 +769,7 @@ static int snd_ice1712_ews88d_control_put(snd_kcontrol_t * kcontrol, snd_ctl_ele
.private_value = xshift | (xinvert << 8),\
}
static snd_kcontrol_new_t snd_ice1712_ews88d_controls[] __devinitdata = {
static struct snd_kcontrol_new snd_ice1712_ews88d_controls[] __devinitdata = {
EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "IEC958 Input Optical", 0, 1, 0), /* inverted */
EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT Output Optical", 1, 0, 0),
EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT External Master Clock", 2, 0, 0),
@ -782,7 +782,7 @@ static snd_kcontrol_new_t snd_ice1712_ews88d_controls[] __devinitdata = {
* DMX 6Fire specific controls
*/
static int snd_ice1712_6fire_read_pca(ice1712_t *ice, unsigned char reg)
static int snd_ice1712_6fire_read_pca(struct snd_ice1712 *ice, unsigned char reg)
{
unsigned char byte;
snd_i2c_lock(ice->i2c);
@ -798,7 +798,7 @@ static int snd_ice1712_6fire_read_pca(ice1712_t *ice, unsigned char reg)
return byte;
}
static int snd_ice1712_6fire_write_pca(ice1712_t *ice, unsigned char reg, unsigned char data)
static int snd_ice1712_6fire_write_pca(struct snd_ice1712 *ice, unsigned char reg, unsigned char data)
{
unsigned char bytes[2];
snd_i2c_lock(ice->i2c);
@ -812,7 +812,7 @@ static int snd_ice1712_6fire_write_pca(ice1712_t *ice, unsigned char reg, unsign
return 0;
}
static int snd_ice1712_6fire_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
static int snd_ice1712_6fire_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
@ -821,9 +821,9 @@ static int snd_ice1712_6fire_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem
return 0;
}
static int snd_ice1712_6fire_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_6fire_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
int shift = kcontrol->private_value & 0xff;
int invert = (kcontrol->private_value >> 8) & 1;
int data;
@ -837,9 +837,9 @@ static int snd_ice1712_6fire_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_
return 0;
}
static int snd_ice1712_6fire_control_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_6fire_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
int shift = kcontrol->private_value & 0xff;
int invert = (kcontrol->private_value >> 8) & 1;
int data, ndata;
@ -858,7 +858,7 @@ static int snd_ice1712_6fire_control_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_
return 0;
}
static int snd_ice1712_6fire_select_input_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
static int snd_ice1712_6fire_select_input_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[4] = {
"Internal", "Front Input", "Rear Input", "Wave Table"
@ -872,9 +872,9 @@ static int snd_ice1712_6fire_select_input_info(snd_kcontrol_t *kcontrol, snd_ctl
return 0;
}
static int snd_ice1712_6fire_select_input_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_6fire_select_input_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
int data;
if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0)
@ -883,9 +883,9 @@ static int snd_ice1712_6fire_select_input_get(snd_kcontrol_t *kcontrol, snd_ctl_
return 0;
}
static int snd_ice1712_6fire_select_input_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
static int snd_ice1712_6fire_select_input_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ice1712_t *ice = snd_kcontrol_chip(kcontrol);
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
int data, ndata;
if ((data = snd_ice1712_6fire_read_pca(ice, PCF9554_REG_OUTPUT)) < 0)
@ -909,7 +909,7 @@ static int snd_ice1712_6fire_select_input_put(snd_kcontrol_t *kcontrol, snd_ctl_
.private_value = xshift | (xinvert << 8),\
}
static snd_kcontrol_new_t snd_ice1712_6fire_controls[] __devinitdata = {
static struct snd_kcontrol_new snd_ice1712_6fire_controls[] __devinitdata = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Analog Input Select",
@ -925,7 +925,7 @@ static snd_kcontrol_new_t snd_ice1712_6fire_controls[] __devinitdata = {
};
static int __devinit snd_ice1712_ews_add_controls(ice1712_t *ice)
static int __devinit snd_ice1712_ews_add_controls(struct snd_ice1712 *ice)
{
unsigned int idx;
int err;

View File

@ -33,7 +33,7 @@
#include "hoontech.h"
static void __devinit snd_ice1712_stdsp24_gpio_write(ice1712_t *ice, unsigned char byte)
static void __devinit snd_ice1712_stdsp24_gpio_write(struct snd_ice1712 *ice, unsigned char byte)
{
byte |= ICE1712_STDSP24_CLOCK_BIT;
udelay(100);
@ -46,7 +46,7 @@ static void __devinit snd_ice1712_stdsp24_gpio_write(ice1712_t *ice, unsigned ch
snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte);
}
static void __devinit snd_ice1712_stdsp24_darear(ice1712_t *ice, int activate)
static void __devinit snd_ice1712_stdsp24_darear(struct snd_ice1712 *ice, int activate)
{
down(&ice->gpio_mutex);
ICE1712_STDSP24_0_DAREAR(ice->spec.hoontech.boxbits, activate);
@ -54,7 +54,7 @@ static void __devinit snd_ice1712_stdsp24_darear(ice1712_t *ice, int activate)
up(&ice->gpio_mutex);
}
static void __devinit snd_ice1712_stdsp24_mute(ice1712_t *ice, int activate)
static void __devinit snd_ice1712_stdsp24_mute(struct snd_ice1712 *ice, int activate)
{
down(&ice->gpio_mutex);
ICE1712_STDSP24_3_MUTE(ice->spec.hoontech.boxbits, activate);
@ -62,7 +62,7 @@ static void __devinit snd_ice1712_stdsp24_mute(ice1712_t *ice, int activate)
up(&ice->gpio_mutex);
}
static void __devinit snd_ice1712_stdsp24_insel(ice1712_t *ice, int activate)
static void __devinit snd_ice1712_stdsp24_insel(struct snd_ice1712 *ice, int activate)
{
down(&ice->gpio_mutex);
ICE1712_STDSP24_3_INSEL(ice->spec.hoontech.boxbits, activate);
@ -70,7 +70,7 @@ static void __devinit snd_ice1712_stdsp24_insel(ice1712_t *ice, int activate)
up(&ice->gpio_mutex);
}
static void __devinit snd_ice1712_stdsp24_box_channel(ice1712_t *ice, int box, int chn, int activate)
static void __devinit snd_ice1712_stdsp24_box_channel(struct snd_ice1712 *ice, int box, int chn, int activate)
{
down(&ice->gpio_mutex);
@ -118,7 +118,7 @@ static void __devinit snd_ice1712_stdsp24_box_channel(ice1712_t *ice, int box, i
up(&ice->gpio_mutex);
}
static void __devinit snd_ice1712_stdsp24_box_midi(ice1712_t *ice, int box, int master)
static void __devinit snd_ice1712_stdsp24_box_midi(struct snd_ice1712 *ice, int box, int master)
{
down(&ice->gpio_mutex);
@ -144,7 +144,7 @@ static void __devinit snd_ice1712_stdsp24_box_midi(ice1712_t *ice, int box, int
up(&ice->gpio_mutex);
}
static void __devinit snd_ice1712_stdsp24_midi2(ice1712_t *ice, int activate)
static void __devinit snd_ice1712_stdsp24_midi2(struct snd_ice1712 *ice, int activate)
{
down(&ice->gpio_mutex);
ICE1712_STDSP24_3_MIDI2(ice->spec.hoontech.boxbits, activate);
@ -152,7 +152,7 @@ static void __devinit snd_ice1712_stdsp24_midi2(ice1712_t *ice, int activate)
up(&ice->gpio_mutex);
}
static int __devinit snd_ice1712_hoontech_init(ice1712_t *ice)
static int __devinit snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
{
int box, chn;
@ -221,9 +221,9 @@ static int __devinit snd_ice1712_hoontech_init(ice1712_t *ice)
*/
/* start callback for STDSP24 with modified hardware */
static void stdsp24_ak4524_lock(akm4xxx_t *ak, int chip)
static void stdsp24_ak4524_lock(struct snd_akm4xxx *ak, int chip)
{
ice1712_t *ice = ak->private_data[0];
struct snd_ice1712 *ice = ak->private_data[0];
unsigned char tmp;
snd_ice1712_save_gpio_status(ice);
tmp = ICE1712_STDSP24_SERIAL_DATA |
@ -234,10 +234,10 @@ static void stdsp24_ak4524_lock(akm4xxx_t *ak, int chip)
snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~tmp);
}
static int __devinit snd_ice1712_value_init(ice1712_t *ice)
static int __devinit snd_ice1712_value_init(struct snd_ice1712 *ice)
{
/* Hoontech STDSP24 with modified hardware */
static akm4xxx_t akm_stdsp24_mv __devinitdata = {
static struct snd_akm4xxx akm_stdsp24_mv __devinitdata = {
.num_adcs = 2,
.num_dacs = 2,
.type = SND_AK4524,
@ -258,7 +258,7 @@ static int __devinit snd_ice1712_value_init(ice1712_t *ice)
};
int err;
akm4xxx_t *ak;
struct snd_akm4xxx *ak;
/* set the analog DACs */
ice->num_total_dacs = 2;
@ -267,7 +267,7 @@ static int __devinit snd_ice1712_value_init(ice1712_t *ice)
ice->num_total_adcs = 2;
/* analog section */
ak = ice->akm = kmalloc(sizeof(akm4xxx_t), GFP_KERNEL);
ak = ice->akm = kmalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
if (! ak)
return -ENOMEM;
ice->akm_codecs = 1;
@ -284,7 +284,7 @@ static int __devinit snd_ice1712_value_init(ice1712_t *ice)
return 0;
}
static int __devinit snd_ice1712_ez8_init(ice1712_t *ice)
static int __devinit snd_ice1712_ez8_init(struct snd_ice1712 *ice)
{
ice->gpio.write_mask = ice->eeprom.gpiomask;
ice->gpio.direction = ice->eeprom.gpiodir;

File diff suppressed because it is too large Load Diff

View File

@ -215,9 +215,9 @@
*
*/
typedef struct _snd_ice1712 ice1712_t;
struct snd_ice1712;
typedef struct {
struct snd_ice1712_eeprom {
unsigned int subvendor; /* PCI[2c-2f] */
unsigned char size; /* size of EEPROM image in bytes */
unsigned char version; /* must be 1 (or 2 for vt1724) */
@ -225,7 +225,7 @@ typedef struct {
unsigned int gpiomask;
unsigned int gpiostate;
unsigned int gpiodir;
} ice1712_eeprom_t;
};
enum {
ICE_EEP1_CODEC = 0, /* 06 */
@ -266,28 +266,28 @@ struct snd_ak4xxx_private {
unsigned int add_flags; /* additional bits at init */
unsigned int mask_flags; /* total mask bits */
struct snd_akm4xxx_ops {
void (*set_rate_val)(akm4xxx_t *ak, unsigned int rate);
void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate);
} ops;
};
struct snd_ice1712_spdif {
unsigned char cs8403_bits;
unsigned char cs8403_stream_bits;
snd_kcontrol_t *stream_ctl;
struct snd_kcontrol *stream_ctl;
struct snd_ice1712_spdif_ops {
void (*open)(ice1712_t *, snd_pcm_substream_t *);
void (*setup_rate)(ice1712_t *, int rate);
void (*close)(ice1712_t *, snd_pcm_substream_t *);
void (*default_get)(ice1712_t *, snd_ctl_elem_value_t * ucontrol);
int (*default_put)(ice1712_t *, snd_ctl_elem_value_t * ucontrol);
void (*stream_get)(ice1712_t *, snd_ctl_elem_value_t * ucontrol);
int (*stream_put)(ice1712_t *, snd_ctl_elem_value_t * ucontrol);
void (*open)(struct snd_ice1712 *, struct snd_pcm_substream *);
void (*setup_rate)(struct snd_ice1712 *, int rate);
void (*close)(struct snd_ice1712 *, struct snd_pcm_substream *);
void (*default_get)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol);
int (*default_put)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol);
void (*stream_get)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol);
int (*stream_put)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol);
} ops;
};
struct _snd_ice1712 {
struct snd_ice1712 {
unsigned long conp_dma_size;
unsigned long conc_dma_size;
unsigned long prop_dma_size;
@ -300,28 +300,28 @@ struct _snd_ice1712 {
unsigned long profi_port;
struct pci_dev *pci;
snd_card_t *card;
snd_pcm_t *pcm;
snd_pcm_t *pcm_ds;
snd_pcm_t *pcm_pro;
snd_pcm_substream_t *playback_con_substream;
snd_pcm_substream_t *playback_con_substream_ds[6];
snd_pcm_substream_t *capture_con_substream;
snd_pcm_substream_t *playback_pro_substream;
snd_pcm_substream_t *capture_pro_substream;
struct snd_card *card;
struct snd_pcm *pcm;
struct snd_pcm *pcm_ds;
struct snd_pcm *pcm_pro;
struct snd_pcm_substream *playback_con_substream;
struct snd_pcm_substream *playback_con_substream_ds[6];
struct snd_pcm_substream *capture_con_substream;
struct snd_pcm_substream *playback_pro_substream;
struct snd_pcm_substream *capture_pro_substream;
unsigned int playback_pro_size;
unsigned int capture_pro_size;
unsigned int playback_con_virt_addr[6];
unsigned int playback_con_active_buf[6];
unsigned int capture_con_virt_addr;
unsigned int ac97_ext_id;
ac97_t *ac97;
snd_rawmidi_t *rmidi[2];
struct snd_ac97 *ac97;
struct snd_rawmidi *rmidi[2];
spinlock_t reg_lock;
snd_info_entry_t *proc_entry;
struct snd_info_entry *proc_entry;
ice1712_eeprom_t eeprom;
struct snd_ice1712_eeprom eeprom;
unsigned int pro_volumes[20];
unsigned int omni: 1; /* Delta Omni I/O */
@ -335,16 +335,16 @@ struct _snd_ice1712 {
unsigned int cur_rate; /* current rate */
struct semaphore open_mutex;
snd_pcm_substream_t *pcm_reserved[4];
snd_pcm_hw_constraint_list_t *hw_rates; /* card-specific rate constraints */
struct snd_pcm_substream *pcm_reserved[4];
struct snd_pcm_hw_constraint_list *hw_rates; /* card-specific rate constraints */
unsigned int akm_codecs;
akm4xxx_t *akm;
struct snd_akm4xxx *akm;
struct snd_ice1712_spdif spdif;
struct semaphore i2c_mutex; /* I2C mutex for ICE1724 registers */
snd_i2c_bus_t *i2c; /* I2C bus */
snd_i2c_device_t *cs8427; /* CS8427 I2C device */
struct snd_i2c_bus *i2c; /* I2C bus */
struct snd_i2c_device *cs8427; /* CS8427 I2C device */
unsigned int cs8427_timeout; /* CS8427 reset timeout in HZ/100 */
struct ice1712_gpio {
@ -352,20 +352,20 @@ struct _snd_ice1712 {
unsigned int write_mask; /* current mask bits */
unsigned int saved[2]; /* for ewx_i2c */
/* operators */
void (*set_mask)(ice1712_t *ice, unsigned int data);
void (*set_dir)(ice1712_t *ice, unsigned int data);
void (*set_data)(ice1712_t *ice, unsigned int data);
unsigned int (*get_data)(ice1712_t *ice);
void (*set_mask)(struct snd_ice1712 *ice, unsigned int data);
void (*set_dir)(struct snd_ice1712 *ice, unsigned int data);
void (*set_data)(struct snd_ice1712 *ice, unsigned int data);
unsigned int (*get_data)(struct snd_ice1712 *ice);
/* misc operators - move to another place? */
void (*set_pro_rate)(ice1712_t *ice, unsigned int rate);
void (*i2s_mclk_changed)(ice1712_t *ice);
void (*set_pro_rate)(struct snd_ice1712 *ice, unsigned int rate);
void (*i2s_mclk_changed)(struct snd_ice1712 *ice);
} gpio;
struct semaphore gpio_mutex;
/* other board-specific data */
union {
/* additional i2c devices for EWS boards */
snd_i2c_device_t *i2cdevs[3];
struct snd_i2c_device *i2cdevs[3];
/* AC97 register cache for Aureon */
struct aureon_spec {
unsigned short stac9744[64];
@ -385,7 +385,7 @@ struct _snd_ice1712 {
unsigned short boxconfig[4];
} hoontech;
struct {
ak4114_t *ak4114;
struct ak4114 *ak4114;
unsigned int analog: 1;
} juli;
} spec;
@ -396,22 +396,22 @@ struct _snd_ice1712 {
/*
* gpio access functions
*/
static inline void snd_ice1712_gpio_set_dir(ice1712_t *ice, unsigned int bits)
static inline void snd_ice1712_gpio_set_dir(struct snd_ice1712 *ice, unsigned int bits)
{
ice->gpio.set_dir(ice, bits);
}
static inline void snd_ice1712_gpio_set_mask(ice1712_t *ice, unsigned int bits)
static inline void snd_ice1712_gpio_set_mask(struct snd_ice1712 *ice, unsigned int bits)
{
ice->gpio.set_mask(ice, bits);
}
static inline void snd_ice1712_gpio_write(ice1712_t *ice, unsigned int val)
static inline void snd_ice1712_gpio_write(struct snd_ice1712 *ice, unsigned int val)
{
ice->gpio.set_data(ice, val);
}
static inline unsigned int snd_ice1712_gpio_read(ice1712_t *ice)
static inline unsigned int snd_ice1712_gpio_read(struct snd_ice1712 *ice)
{
return ice->gpio.get_data(ice);
}
@ -421,14 +421,14 @@ static inline unsigned int snd_ice1712_gpio_read(ice1712_t *ice)
* The access to gpio will be protected by mutex, so don't forget to
* restore!
*/
static inline void snd_ice1712_save_gpio_status(ice1712_t *ice)
static inline void snd_ice1712_save_gpio_status(struct snd_ice1712 *ice)
{
down(&ice->gpio_mutex);
ice->gpio.saved[0] = ice->gpio.direction;
ice->gpio.saved[1] = ice->gpio.write_mask;
}
static inline void snd_ice1712_restore_gpio_status(ice1712_t *ice)
static inline void snd_ice1712_restore_gpio_status(struct snd_ice1712 *ice)
{
ice->gpio.set_dir(ice, ice->gpio.saved[0]);
ice->gpio.set_mask(ice, ice->gpio.saved[1]);
@ -443,14 +443,15 @@ static inline void snd_ice1712_restore_gpio_status(ice1712_t *ice)
.get = snd_ice1712_gpio_get, .put = snd_ice1712_gpio_put, \
.private_value = mask | (invert << 24) }
int snd_ice1712_gpio_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
int snd_ice1712_gpio_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
int snd_ice1712_gpio_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
int snd_ice1712_gpio_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
int snd_ice1712_gpio_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
int snd_ice1712_gpio_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
/*
* set gpio direction, write mask and data
*/
static inline void snd_ice1712_gpio_write_bits(ice1712_t *ice, unsigned int mask, unsigned int bits)
static inline void snd_ice1712_gpio_write_bits(struct snd_ice1712 *ice,
unsigned int mask, unsigned int bits)
{
ice->gpio.direction |= mask;
snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
@ -458,21 +459,22 @@ static inline void snd_ice1712_gpio_write_bits(ice1712_t *ice, unsigned int mask
snd_ice1712_gpio_write(ice, mask & bits);
}
int snd_ice1712_spdif_build_controls(ice1712_t *ice);
int snd_ice1712_spdif_build_controls(struct snd_ice1712 *ice);
int snd_ice1712_akm4xxx_init(akm4xxx_t *ak, const akm4xxx_t *template, const struct snd_ak4xxx_private *priv, ice1712_t *ice);
void snd_ice1712_akm4xxx_free(ice1712_t *ice);
int snd_ice1712_akm4xxx_build_controls(ice1712_t *ice);
int snd_ice1712_akm4xxx_init(struct snd_akm4xxx *ak, const struct snd_akm4xxx *template,
const struct snd_ak4xxx_private *priv, struct snd_ice1712 *ice);
void snd_ice1712_akm4xxx_free(struct snd_ice1712 *ice);
int snd_ice1712_akm4xxx_build_controls(struct snd_ice1712 *ice);
int snd_ice1712_init_cs8427(ice1712_t *ice, int addr);
int snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr);
static inline void snd_ice1712_write(ice1712_t * ice, u8 addr, u8 data)
static inline void snd_ice1712_write(struct snd_ice1712 * ice, u8 addr, u8 data)
{
outb(addr, ICEREG(ice, INDEX));
outb(data, ICEREG(ice, DATA));
}
static inline u8 snd_ice1712_read(ice1712_t * ice, u8 addr)
static inline u8 snd_ice1712_read(struct snd_ice1712 * ice, u8 addr)
{
outb(addr, ICEREG(ice, INDEX));
return inb(ICEREG(ice, DATA));
@ -488,8 +490,8 @@ struct snd_ice1712_card_info {
char *name;
char *model;
char *driver;
int (*chip_init)(ice1712_t *);
int (*build_controls)(ice1712_t *);
int (*chip_init)(struct snd_ice1712 *);
int (*build_controls)(struct snd_ice1712 *);
unsigned int no_mpu401: 1;
unsigned int eeprom_size;
unsigned char *eeprom_data;