#define RME96_AD1855_VOL_BITS 10
-typedef struct snd_rme96 {
+struct rme96 {
spinlock_t lock;
int irq;
unsigned long port;
u8 rev; /* card revision number */
- snd_pcm_substream_t *playback_substream;
- snd_pcm_substream_t *capture_substream;
+ struct snd_pcm_substream *playback_substream;
+ struct snd_pcm_substream *capture_substream;
int playback_frlog; /* log2 of framesize */
int capture_frlog;
size_t playback_periodsize; /* in bytes, zero if not used */
size_t capture_periodsize; /* in bytes, zero if not used */
- snd_card_t *card;
- snd_pcm_t *spdif_pcm;
- snd_pcm_t *adat_pcm;
+ struct snd_card *card;
+ struct snd_pcm *spdif_pcm;
+ struct snd_pcm *adat_pcm;
struct pci_dev *pci;
- snd_kcontrol_t *spdif_ctl;
-} rme96_t;
+ struct snd_kcontrol *spdif_ctl;
+};
static struct pci_device_id snd_rme96_ids[] = {
{ PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96,
#define RME96_185X_MAX_OUT(rme96) ((1 << (RME96_DAC_IS_1852(rme96) ? RME96_AD1852_VOL_BITS : RME96_AD1855_VOL_BITS)) - 1)
static int
-snd_rme96_playback_prepare(snd_pcm_substream_t *substream);
+snd_rme96_playback_prepare(struct snd_pcm_substream *substream);
static int
-snd_rme96_capture_prepare(snd_pcm_substream_t *substream);
+snd_rme96_capture_prepare(struct snd_pcm_substream *substream);
static int
-snd_rme96_playback_trigger(snd_pcm_substream_t *substream,
+snd_rme96_playback_trigger(struct snd_pcm_substream *substream,
int cmd);
static int
-snd_rme96_capture_trigger(snd_pcm_substream_t *substream,
+snd_rme96_capture_trigger(struct snd_pcm_substream *substream,
int cmd);
static snd_pcm_uframes_t
-snd_rme96_playback_pointer(snd_pcm_substream_t *substream);
+snd_rme96_playback_pointer(struct snd_pcm_substream *substream);
static snd_pcm_uframes_t
-snd_rme96_capture_pointer(snd_pcm_substream_t *substream);
+snd_rme96_capture_pointer(struct snd_pcm_substream *substream);
static void __devinit
-snd_rme96_proc_init(rme96_t *rme96);
+snd_rme96_proc_init(struct rme96 *rme96);
static int
-snd_rme96_create_switches(snd_card_t *card,
- rme96_t *rme96);
+snd_rme96_create_switches(struct snd_card *card,
+ struct rme96 *rme96);
static int
-snd_rme96_getinputtype(rme96_t *rme96);
+snd_rme96_getinputtype(struct rme96 *rme96);
static inline unsigned int
-snd_rme96_playback_ptr(rme96_t *rme96)
+snd_rme96_playback_ptr(struct rme96 *rme96)
{
return (readl(rme96->iobase + RME96_IO_GET_PLAY_POS)
& RME96_RCR_AUDIO_ADDR_MASK) >> rme96->playback_frlog;
}
static inline unsigned int
-snd_rme96_capture_ptr(rme96_t *rme96)
+snd_rme96_capture_ptr(struct rme96 *rme96)
{
return (readl(rme96->iobase + RME96_IO_GET_REC_POS)
& RME96_RCR_AUDIO_ADDR_MASK) >> rme96->capture_frlog;
}
static int
-snd_rme96_playback_silence(snd_pcm_substream_t *substream,
+snd_rme96_playback_silence(struct snd_pcm_substream *substream,
int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
snd_pcm_uframes_t count)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
count <<= rme96->playback_frlog;
pos <<= rme96->playback_frlog;
memset_io(rme96->iobase + RME96_IO_PLAY_BUFFER + pos,
}
static int
-snd_rme96_playback_copy(snd_pcm_substream_t *substream,
+snd_rme96_playback_copy(struct snd_pcm_substream *substream,
int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void __user *src,
snd_pcm_uframes_t count)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
count <<= rme96->playback_frlog;
pos <<= rme96->playback_frlog;
copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src,
}
static int
-snd_rme96_capture_copy(snd_pcm_substream_t *substream,
+snd_rme96_capture_copy(struct snd_pcm_substream *substream,
int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void __user *dst,
snd_pcm_uframes_t count)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
count <<= rme96->capture_frlog;
pos <<= rme96->capture_frlog;
copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos,
/*
* Digital output capabilites (S/PDIF)
*/
-static snd_pcm_hardware_t snd_rme96_playback_spdif_info =
+static struct snd_pcm_hardware snd_rme96_playback_spdif_info =
{
.info = (SNDRV_PCM_INFO_MMAP_IOMEM |
SNDRV_PCM_INFO_MMAP_VALID |
/*
* Digital input capabilites (S/PDIF)
*/
-static snd_pcm_hardware_t snd_rme96_capture_spdif_info =
+static struct snd_pcm_hardware snd_rme96_capture_spdif_info =
{
.info = (SNDRV_PCM_INFO_MMAP_IOMEM |
SNDRV_PCM_INFO_MMAP_VALID |
/*
* Digital output capabilites (ADAT)
*/
-static snd_pcm_hardware_t snd_rme96_playback_adat_info =
+static struct snd_pcm_hardware snd_rme96_playback_adat_info =
{
.info = (SNDRV_PCM_INFO_MMAP_IOMEM |
SNDRV_PCM_INFO_MMAP_VALID |
/*
* Digital input capabilites (ADAT)
*/
-static snd_pcm_hardware_t snd_rme96_capture_adat_info =
+static struct snd_pcm_hardware snd_rme96_capture_adat_info =
{
.info = (SNDRV_PCM_INFO_MMAP_IOMEM |
SNDRV_PCM_INFO_MMAP_VALID |
* the volume.
*/
static void
-snd_rme96_write_SPI(rme96_t *rme96, u16 val)
+snd_rme96_write_SPI(struct rme96 *rme96, u16 val)
{
int i;
}
static void
-snd_rme96_apply_dac_volume(rme96_t *rme96)
+snd_rme96_apply_dac_volume(struct rme96 *rme96)
{
if (RME96_DAC_IS_1852(rme96)) {
snd_rme96_write_SPI(rme96, (rme96->vol[0] << 2) | 0x0);
}
static void
-snd_rme96_reset_dac(rme96_t *rme96)
+snd_rme96_reset_dac(struct rme96 *rme96)
{
writel(rme96->wcreg | RME96_WCR_PD,
rme96->iobase + RME96_IO_CONTROL_REGISTER);
}
static int
-snd_rme96_getmontracks(rme96_t *rme96)
+snd_rme96_getmontracks(struct rme96 *rme96)
{
return ((rme96->wcreg >> RME96_WCR_BITPOS_MONITOR_0) & 1) +
(((rme96->wcreg >> RME96_WCR_BITPOS_MONITOR_1) & 1) << 1);
}
static int
-snd_rme96_setmontracks(rme96_t *rme96,
+snd_rme96_setmontracks(struct rme96 *rme96,
int montracks)
{
if (montracks & 1) {
}
static int
-snd_rme96_getattenuation(rme96_t *rme96)
+snd_rme96_getattenuation(struct rme96 *rme96)
{
return ((rme96->wcreg >> RME96_WCR_BITPOS_GAIN_0) & 1) +
(((rme96->wcreg >> RME96_WCR_BITPOS_GAIN_1) & 1) << 1);
}
static int
-snd_rme96_setattenuation(rme96_t *rme96,
+snd_rme96_setattenuation(struct rme96 *rme96,
int attenuation)
{
switch (attenuation) {
}
static int
-snd_rme96_capture_getrate(rme96_t *rme96,
+snd_rme96_capture_getrate(struct rme96 *rme96,
int *is_adat)
{
int n, rate;
}
static int
-snd_rme96_playback_getrate(rme96_t *rme96)
+snd_rme96_playback_getrate(struct rme96 *rme96)
{
int rate, dummy;
}
static int
-snd_rme96_playback_setrate(rme96_t *rme96,
+snd_rme96_playback_setrate(struct rme96 *rme96,
int rate)
{
int ds;
}
static int
-snd_rme96_capture_analog_setrate(rme96_t *rme96,
+snd_rme96_capture_analog_setrate(struct rme96 *rme96,
int rate)
{
switch (rate) {
}
static int
-snd_rme96_setclockmode(rme96_t *rme96,
+snd_rme96_setclockmode(struct rme96 *rme96,
int mode)
{
switch (mode) {
}
static int
-snd_rme96_getclockmode(rme96_t *rme96)
+snd_rme96_getclockmode(struct rme96 *rme96)
{
if (rme96->areg & RME96_AR_WSEL) {
return RME96_CLOCKMODE_WORDCLOCK;
}
static int
-snd_rme96_setinputtype(rme96_t *rme96,
+snd_rme96_setinputtype(struct rme96 *rme96,
int type)
{
int n;
}
static int
-snd_rme96_getinputtype(rme96_t *rme96)
+snd_rme96_getinputtype(struct rme96 *rme96)
{
if (rme96->areg & RME96_AR_ANALOG) {
return RME96_INPUT_ANALOG;
}
static void
-snd_rme96_setframelog(rme96_t *rme96,
+snd_rme96_setframelog(struct rme96 *rme96,
int n_channels,
int is_playback)
{
}
static int
-snd_rme96_playback_setformat(rme96_t *rme96,
+snd_rme96_playback_setformat(struct rme96 *rme96,
int format)
{
switch (format) {
}
static int
-snd_rme96_capture_setformat(rme96_t *rme96,
+snd_rme96_capture_setformat(struct rme96 *rme96,
int format)
{
switch (format) {
}
static void
-snd_rme96_set_period_properties(rme96_t *rme96,
+snd_rme96_set_period_properties(struct rme96 *rme96,
size_t period_bytes)
{
switch (period_bytes) {
}
static int
-snd_rme96_playback_hw_params(snd_pcm_substream_t *substream,
- snd_pcm_hw_params_t *params)
+snd_rme96_playback_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
int err, rate, dummy;
runtime->dma_area = (void __force *)(rme96->iobase +
}
static int
-snd_rme96_capture_hw_params(snd_pcm_substream_t *substream,
- snd_pcm_hw_params_t *params)
+snd_rme96_capture_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
int err, isadat, rate;
runtime->dma_area = (void __force *)(rme96->iobase +
}
static void
-snd_rme96_playback_start(rme96_t *rme96,
+snd_rme96_playback_start(struct rme96 *rme96,
int from_pause)
{
if (!from_pause) {
}
static void
-snd_rme96_capture_start(rme96_t *rme96,
+snd_rme96_capture_start(struct rme96 *rme96,
int from_pause)
{
if (!from_pause) {
}
static void
-snd_rme96_playback_stop(rme96_t *rme96)
+snd_rme96_playback_stop(struct rme96 *rme96)
{
/*
* Check if there is an unconfirmed IRQ, if so confirm it, or else
}
static void
-snd_rme96_capture_stop(rme96_t *rme96)
+snd_rme96_capture_stop(struct rme96 *rme96)
{
rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER);
if (rme96->rcreg & RME96_RCR_IRQ_2) {
void *dev_id,
struct pt_regs *regs)
{
- rme96_t *rme96 = (rme96_t *)dev_id;
+ struct rme96 *rme96 = (struct rme96 *)dev_id;
rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER);
/* fastpath out, to ease interrupt sharing */
static unsigned int period_bytes[] = { RME96_SMALL_BLOCK_SIZE, RME96_LARGE_BLOCK_SIZE };
-static snd_pcm_hw_constraint_list_t hw_constraints_period_bytes = {
+static struct snd_pcm_hw_constraint_list hw_constraints_period_bytes = {
.count = ARRAY_SIZE(period_bytes),
.list = period_bytes,
.mask = 0
};
static int
-snd_rme96_playback_spdif_open(snd_pcm_substream_t *substream)
+snd_rme96_playback_spdif_open(struct snd_pcm_substream *substream)
{
int rate, dummy;
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_set_sync(substream);
}
static int
-snd_rme96_capture_spdif_open(snd_pcm_substream_t *substream)
+snd_rme96_capture_spdif_open(struct snd_pcm_substream *substream)
{
int isadat, rate;
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_set_sync(substream);
}
static int
-snd_rme96_playback_adat_open(snd_pcm_substream_t *substream)
+snd_rme96_playback_adat_open(struct snd_pcm_substream *substream)
{
int rate, dummy;
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_set_sync(substream);
}
static int
-snd_rme96_capture_adat_open(snd_pcm_substream_t *substream)
+snd_rme96_capture_adat_open(struct snd_pcm_substream *substream)
{
int isadat, rate;
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_set_sync(substream);
}
static int
-snd_rme96_playback_close(snd_pcm_substream_t *substream)
+snd_rme96_playback_close(struct snd_pcm_substream *substream)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
int spdif = 0;
spin_lock_irq(&rme96->lock);
}
static int
-snd_rme96_capture_close(snd_pcm_substream_t *substream)
+snd_rme96_capture_close(struct snd_pcm_substream *substream)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
spin_lock_irq(&rme96->lock);
if (RME96_ISRECORDING(rme96)) {
}
static int
-snd_rme96_playback_prepare(snd_pcm_substream_t *substream)
+snd_rme96_playback_prepare(struct snd_pcm_substream *substream)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
spin_lock_irq(&rme96->lock);
if (RME96_ISPLAYING(rme96)) {
}
static int
-snd_rme96_capture_prepare(snd_pcm_substream_t *substream)
+snd_rme96_capture_prepare(struct snd_pcm_substream *substream)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
spin_lock_irq(&rme96->lock);
if (RME96_ISRECORDING(rme96)) {
}
static int
-snd_rme96_playback_trigger(snd_pcm_substream_t *substream,
+snd_rme96_playback_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
}
static int
-snd_rme96_capture_trigger(snd_pcm_substream_t *substream,
+snd_rme96_capture_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
}
static snd_pcm_uframes_t
-snd_rme96_playback_pointer(snd_pcm_substream_t *substream)
+snd_rme96_playback_pointer(struct snd_pcm_substream *substream)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
return snd_rme96_playback_ptr(rme96);
}
static snd_pcm_uframes_t
-snd_rme96_capture_pointer(snd_pcm_substream_t *substream)
+snd_rme96_capture_pointer(struct snd_pcm_substream *substream)
{
- rme96_t *rme96 = snd_pcm_substream_chip(substream);
+ struct rme96 *rme96 = snd_pcm_substream_chip(substream);
return snd_rme96_capture_ptr(rme96);
}
-static snd_pcm_ops_t snd_rme96_playback_spdif_ops = {
+static struct snd_pcm_ops snd_rme96_playback_spdif_ops = {
.open = snd_rme96_playback_spdif_open,
.close = snd_rme96_playback_close,
.ioctl = snd_pcm_lib_ioctl,
.mmap = snd_pcm_lib_mmap_iomem,
};
-static snd_pcm_ops_t snd_rme96_capture_spdif_ops = {
+static struct snd_pcm_ops snd_rme96_capture_spdif_ops = {
.open = snd_rme96_capture_spdif_open,
.close = snd_rme96_capture_close,
.ioctl = snd_pcm_lib_ioctl,
.mmap = snd_pcm_lib_mmap_iomem,
};
-static snd_pcm_ops_t snd_rme96_playback_adat_ops = {
+static struct snd_pcm_ops snd_rme96_playback_adat_ops = {
.open = snd_rme96_playback_adat_open,
.close = snd_rme96_playback_close,
.ioctl = snd_pcm_lib_ioctl,
.mmap = snd_pcm_lib_mmap_iomem,
};
-static snd_pcm_ops_t snd_rme96_capture_adat_ops = {
+static struct snd_pcm_ops snd_rme96_capture_adat_ops = {
.open = snd_rme96_capture_adat_open,
.close = snd_rme96_capture_close,
.ioctl = snd_pcm_lib_ioctl,
static void
snd_rme96_free(void *private_data)
{
- rme96_t *rme96 = (rme96_t *)private_data;
+ struct rme96 *rme96 = (struct rme96 *)private_data;
if (rme96 == NULL) {
return;
}
static void
-snd_rme96_free_spdif_pcm(snd_pcm_t *pcm)
+snd_rme96_free_spdif_pcm(struct snd_pcm *pcm)
{
- rme96_t *rme96 = (rme96_t *) pcm->private_data;
+ struct rme96 *rme96 = (struct rme96 *) pcm->private_data;
rme96->spdif_pcm = NULL;
}
static void
-snd_rme96_free_adat_pcm(snd_pcm_t *pcm)
+snd_rme96_free_adat_pcm(struct snd_pcm *pcm)
{
- rme96_t *rme96 = (rme96_t *) pcm->private_data;
+ struct rme96 *rme96 = (struct rme96 *) pcm->private_data;
rme96->adat_pcm = NULL;
}
static int __devinit
-snd_rme96_create(rme96_t *rme96)
+snd_rme96_create(struct rme96 *rme96)
{
struct pci_dev *pci = rme96->pci;
int err;
*/
static void
-snd_rme96_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+snd_rme96_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
int n;
- rme96_t *rme96 = (rme96_t *)entry->private_data;
+ struct rme96 *rme96 = (struct rme96 *)entry->private_data;
rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER);
}
static void __devinit
-snd_rme96_proc_init(rme96_t *rme96)
+snd_rme96_proc_init(struct rme96 *rme96)
{
- snd_info_entry_t *entry;
+ struct snd_info_entry *entry;
if (! snd_card_proc_new(rme96->card, "rme96", &entry))
snd_info_set_text_ops(entry, rme96, 1024, snd_rme96_proc_read);
*/
static int
-snd_rme96_info_loopback_control(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+snd_rme96_info_loopback_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
return 0;
}
static int
-snd_rme96_get_loopback_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_get_loopback_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
spin_lock_irq(&rme96->lock);
ucontrol->value.integer.value[0] = rme96->wcreg & RME96_WCR_SEL ? 0 : 1;
return 0;
}
static int
-snd_rme96_put_loopback_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_put_loopback_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change;
}
static int
-snd_rme96_info_inputtype_control(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+snd_rme96_info_inputtype_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *_texts[5] = { "Optical", "Coaxial", "Internal", "XLR", "Analog" };
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
char *texts[5] = { _texts[0], _texts[1], _texts[2], _texts[3], _texts[4] };
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
return 0;
}
static int
-snd_rme96_get_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_get_inputtype_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
unsigned int items = 3;
spin_lock_irq(&rme96->lock);
return 0;
}
static int
-snd_rme96_put_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_put_inputtype_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change, items = 3;
}
static int
-snd_rme96_info_clockmode_control(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+snd_rme96_info_clockmode_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[3] = { "AutoSync", "Internal", "Word" };
return 0;
}
static int
-snd_rme96_get_clockmode_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_get_clockmode_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
spin_lock_irq(&rme96->lock);
ucontrol->value.enumerated.item[0] = snd_rme96_getclockmode(rme96);
return 0;
}
static int
-snd_rme96_put_clockmode_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_put_clockmode_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change;
}
static int
-snd_rme96_info_attenuation_control(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+snd_rme96_info_attenuation_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[4] = { "0 dB", "-6 dB", "-12 dB", "-18 dB" };
return 0;
}
static int
-snd_rme96_get_attenuation_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_get_attenuation_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
spin_lock_irq(&rme96->lock);
ucontrol->value.enumerated.item[0] = snd_rme96_getattenuation(rme96);
return 0;
}
static int
-snd_rme96_put_attenuation_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_put_attenuation_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change;
}
static int
-snd_rme96_info_montracks_control(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+snd_rme96_info_montracks_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[4] = { "1+2", "3+4", "5+6", "7+8" };
return 0;
}
static int
-snd_rme96_get_montracks_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_get_montracks_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
spin_lock_irq(&rme96->lock);
ucontrol->value.enumerated.item[0] = snd_rme96_getmontracks(rme96);
return 0;
}
static int
-snd_rme96_put_montracks_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+snd_rme96_put_montracks_control(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
unsigned int val;
int change;
return change;
}
-static u32 snd_rme96_convert_from_aes(snd_aes_iec958_t *aes)
+static u32 snd_rme96_convert_from_aes(struct snd_aes_iec958 *aes)
{
u32 val = 0;
val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? RME96_WCR_PRO : 0;
return val;
}
-static void snd_rme96_convert_to_aes(snd_aes_iec958_t *aes, u32 val)
+static void snd_rme96_convert_to_aes(struct snd_aes_iec958 *aes, u32 val)
{
aes->status[0] = ((val & RME96_WCR_PRO) ? IEC958_AES0_PROFESSIONAL : 0) |
((val & RME96_WCR_DOLBY) ? IEC958_AES0_NONAUDIO : 0);
aes->status[0] |= (val & RME96_WCR_EMP) ? IEC958_AES0_CON_EMPHASIS_5015 : 0;
}
-static int snd_rme96_control_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_rme96_control_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1;
return 0;
}
-static int snd_rme96_control_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_rme96_control_spdif_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
snd_rme96_convert_to_aes(&ucontrol->value.iec958, rme96->wcreg_spdif);
return 0;
}
-static int snd_rme96_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_rme96_control_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
int change;
u32 val;
return change;
}
-static int snd_rme96_control_spdif_stream_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_rme96_control_spdif_stream_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1;
return 0;
}
-static int snd_rme96_control_spdif_stream_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_rme96_control_spdif_stream_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
snd_rme96_convert_to_aes(&ucontrol->value.iec958, rme96->wcreg_spdif_stream);
return 0;
}
-static int snd_rme96_control_spdif_stream_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_rme96_control_spdif_stream_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
int change;
u32 val;
return change;
}
-static int snd_rme96_control_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_rme96_control_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1;
return 0;
}
-static int snd_rme96_control_spdif_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_rme96_control_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
ucontrol->value.iec958.status[0] = kcontrol->private_value;
return 0;
}
static int
-snd_rme96_dac_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+snd_rme96_dac_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
}
static int
-snd_rme96_dac_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u)
+snd_rme96_dac_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *u)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
spin_lock_irq(&rme96->lock);
u->value.integer.value[0] = rme96->vol[0];
}
static int
-snd_rme96_dac_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u)
+snd_rme96_dac_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *u)
{
- rme96_t *rme96 = snd_kcontrol_chip(kcontrol);
+ struct rme96 *rme96 = snd_kcontrol_chip(kcontrol);
int change = 0;
if (!RME96_HAS_ANALOG_OUT(rme96)) {
return change;
}
-static snd_kcontrol_new_t snd_rme96_controls[] = {
+static struct snd_kcontrol_new snd_rme96_controls[] = {
{
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
};
static int
-snd_rme96_create_switches(snd_card_t *card,
- rme96_t *rme96)
+snd_rme96_create_switches(struct snd_card *card,
+ struct rme96 *rme96)
{
int idx, err;
- snd_kcontrol_t *kctl;
+ struct snd_kcontrol *kctl;
for (idx = 0; idx < 7; idx++) {
if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme96_controls[idx], rme96))) < 0)
* Card initialisation
*/
-static void snd_rme96_card_free(snd_card_t *card)
+static void snd_rme96_card_free(struct snd_card *card)
{
snd_rme96_free(card->private_data);
}
const struct pci_device_id *pci_id)
{
static int dev;
- rme96_t *rme96;
- snd_card_t *card;
+ struct rme96 *rme96;
+ struct snd_card *card;
int err;
u8 val;
return -ENOENT;
}
if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
- sizeof(rme96_t))) == NULL)
+ sizeof(struct rme96))) == NULL)
return -ENOMEM;
card->private_free = snd_rme96_card_free;
- rme96 = (rme96_t *)card->private_data;
+ rme96 = (struct rme96 *)card->private_data;
rme96->card = card;
rme96->pci = pci;
snd_card_set_dev(card, &pci->dev);