X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fdrivers%2Fvx%2Fvx_core.c;h=a4d72534bafde295a3764fcc409608b03c4fd14b;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=31a94efd6534e25edc794af34eb78c08105ace63;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index 31a94efd6..a4d72534b 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c @@ -506,7 +506,7 @@ static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret) */ 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) @@ -550,7 +550,7 @@ static void vx_interrupt(unsigned long private_data) */ 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)) @@ -572,6 +572,7 @@ static void vx_reset_board(vx_core_t *chip, int cold_reset) 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; @@ -603,9 +604,10 @@ static void vx_reset_board(vx_core_t *chip, int cold_reset) 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" }; @@ -629,6 +631,7 @@ static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 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); @@ -731,7 +734,7 @@ vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw, 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;