X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpci%2Fice1712%2Fdelta.c;h=eb20f73be61a68682c91f3294c7d26720b1ac546;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=85fc5e4f67cd5db446ecc1346e1ba5434c1f2e0a;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index 85fc5e4f6..eb20f73be 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c @@ -126,7 +126,7 @@ 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) { - ice1712_t *ice = snd_magic_cast(ice1712_t, device->bus->private_data, return -EIO); + ice1712_t *ice = device->bus->private_data; int res = count; unsigned char tmp; @@ -143,7 +143,7 @@ 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) { - ice1712_t *ice = snd_magic_cast(ice1712_t, device->bus->private_data, return -EIO); + ice1712_t *ice = device->bus->private_data; int res = count; unsigned char tmp; @@ -526,9 +526,13 @@ static int __devinit snd_ice1712_delta_init(ice1712_t *ice) break; case ICE1712_SUBDEVICE_DELTA1010: case ICE1712_SUBDEVICE_DELTA1010LT: + case ICE1712_SUBDEVICE_MEDIASTATION: ice->num_total_dacs = 8; ice->num_total_adcs = 8; break; + case ICE1712_SUBDEVICE_DELTADIO2496: + ice->num_total_dacs = 4; /* two AK4324 codecs */ + break; case ICE1712_SUBDEVICE_VX442: ice->num_total_dacs = 4; ice->num_total_adcs = 4; @@ -551,6 +555,7 @@ static int __devinit snd_ice1712_delta_init(ice1712_t *ice) return err; break; case ICE1712_SUBDEVICE_DELTA1010: + case ICE1712_SUBDEVICE_MEDIASTATION: ice->gpio.set_pro_rate = delta_1010_set_rate_val; break; case ICE1712_SUBDEVICE_DELTADIO2496: @@ -572,6 +577,7 @@ static int __devinit snd_ice1712_delta_init(ice1712_t *ice) switch (ice->eeprom.subvendor) { case ICE1712_SUBDEVICE_DELTA1010: case ICE1712_SUBDEVICE_DELTADIO2496: + case ICE1712_SUBDEVICE_MEDIASTATION: return 0; } @@ -630,6 +636,7 @@ static int __devinit snd_ice1712_delta_add_controls(ice1712_t *ice) /* 1010 and dio specific controls */ switch (ice->eeprom.subvendor) { case ICE1712_SUBDEVICE_DELTA1010: + case ICE1712_SUBDEVICE_MEDIASTATION: err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta1010_wordclock_select, ice)); if (err < 0) return err; @@ -654,6 +661,7 @@ static int __devinit snd_ice1712_delta_add_controls(ice1712_t *ice) case ICE1712_SUBDEVICE_DELTA1010: case ICE1712_SUBDEVICE_DELTADIO2496: case ICE1712_SUBDEVICE_DELTA66: + case ICE1712_SUBDEVICE_MEDIASTATION: err = snd_ice1712_spdif_build_controls(ice); if (err < 0) return err; @@ -665,6 +673,7 @@ static int __devinit snd_ice1712_delta_add_controls(ice1712_t *ice) case ICE1712_SUBDEVICE_DELTA1010: case ICE1712_SUBDEVICE_DELTADIO2496: case ICE1712_SUBDEVICE_DELTA66: + case ICE1712_SUBDEVICE_MEDIASTATION: err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta_spdif_in_status, ice)); if (err < 0) return err; @@ -751,5 +760,12 @@ struct snd_ice1712_card_info snd_ice1712_delta_cards[] __devinitdata = { .build_controls = snd_ice1712_delta_add_controls, .no_mpu401 = 1, }, + { + .subvendor = ICE1712_SUBDEVICE_MEDIASTATION, + .name = "Lionstracs Mediastation", + .model = "mediastation", + .chip_init = snd_ice1712_delta_init, + .build_controls = snd_ice1712_delta_add_controls, + }, { } /* terminator */ };