*/
static void vx_interrupt(unsigned long private_data)
{
- vx_core_t *chip = snd_magic_cast(vx_core_t, (void*)private_data, return);
+ vx_core_t *chip = (vx_core_t *) private_data;
unsigned int events;
if (chip->chip_status & VX_STAT_IS_STALE)
*/
irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs)
{
- vx_core_t *chip = snd_magic_cast(vx_core_t, dev, return IRQ_NONE);
+ vx_core_t *chip = dev;
if (! (chip->chip_status & VX_STAT_CHIP_INIT) ||
(chip->chip_status & VX_STAT_IS_STALE))
if (cold_reset) {
chip->audio_source_target = chip->audio_source;
chip->clock_source = INTERNAL_QUARTZ;
+ chip->clock_mode = VX_CLOCK_MODE_AUTO;
chip->freq = 48000;
chip->uer_detected = VX_UER_MODE_NOT_PRESENT;
chip->uer_bits = SNDRV_PCM_DEFAULT_CON_SPDIF;
static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
{
- vx_core_t *chip = snd_magic_cast(vx_core_t, entry->private_data, return);
+ vx_core_t *chip = entry->private_data;
static char *audio_src_vxp[] = { "Line", "Mic", "Digital" };
static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" };
+ static char *clock_mode[] = { "Auto", "Internal", "External" };
static char *clock_src[] = { "Internal", "External" };
static char *uer_type[] = { "Consumer", "Professional", "Not Present" };
snd_iprintf(buffer, "Input Source: %s\n", vx_is_pcmcia(chip) ?
audio_src_vxp[chip->audio_source] :
audio_src_vx2[chip->audio_source]);
+ snd_iprintf(buffer, "Clock Mode: %s\n", clock_mode[chip->clock_mode]);
snd_iprintf(buffer, "Clock Source: %s\n", clock_src[chip->clock_source]);
snd_iprintf(buffer, "Frequency: %d\n", chip->freq);
snd_iprintf(buffer, "Detected Frequency: %d\n", chip->freq_detected);
snd_assert(card && hw && ops, return NULL);
- chip = snd_magic_kcalloc(vx_core_t, extra_size, GFP_KERNEL);
+ chip = kcalloc(1, sizeof(chip) + extra_size, GFP_KERNEL);
if (! chip) {
snd_printk(KERN_ERR "vx_core: no memory\n");
return NULL;