コード例 #1
0
static int snd_pcm_timer_stop(struct snd_timer * timer)
{
	struct snd_pcm_substream *substream;
	
	substream = snd_timer_chip(timer);
	substream->timer_running = 0;
	return 0;
}
コード例 #2
0
ファイル: timer.c プロジェクト: 12rafael/jellytimekernel
static int snd_emu10k1_timer_stop(struct snd_timer *timer)
{
	struct snd_emu10k1 *emu;
	unsigned long flags;

	emu = snd_timer_chip(timer);
	spin_lock_irqsave(&emu->reg_lock, flags);
	snd_emu10k1_intr_disable(emu, INTE_INTERVALTIMERENB);
	spin_unlock_irqrestore(&emu->reg_lock, flags);
	return 0;
}
コード例 #3
0
ファイル: pcm_timer.c プロジェクト: 274914765/C
static int snd_pcm_timer_stop(struct snd_timer * timer)
{
    unsigned long flags;
    struct snd_pcm_substream *substream;
    
    substream = snd_timer_chip(timer);
    spin_lock_irqsave(&substream->timer_lock, flags);
    substream->timer_running = 0;
    spin_unlock_irqrestore(&substream->timer_lock, flags);
    return 0;
}
コード例 #4
0
static int snd_ad1816a_timer_stop(struct snd_timer *timer)
{
	unsigned long flags;
	struct snd_ad1816a *chip = snd_timer_chip(timer);
	spin_lock_irqsave(&chip->lock, flags);

	snd_ad1816a_write_mask(chip, AD1816A_INTERRUPT_ENABLE,
		AD1816A_TIMER_ENABLE, 0x0000);

	spin_unlock_irqrestore(&chip->lock, flags);
	return 0;
}
コード例 #5
0
ファイル: gus_timer.c プロジェクト: Antonio-Zhou/Linux-2.6.11
static int snd_gf1_timer2_stop(snd_timer_t * timer)
{
	unsigned long flags;
	unsigned char tmp;
	snd_gus_card_t *gus;

	gus = snd_timer_chip(timer);
	spin_lock_irqsave(&gus->reg_lock, flags);
	tmp = (gus->gf1.timer_enabled &= ~8);
	snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp);	/* disable timer #1 */
	spin_unlock_irqrestore(&gus->reg_lock, flags);
	return 0;
}
コード例 #6
0
ファイル: opl3_lib.c プロジェクト: asimkadav/fgft
/* static MJR */ int snd_opl3_timer2_stop(struct snd_timer * timer)
{
	unsigned long flags;
	unsigned char tmp;
	struct snd_opl3 *opl3;

	opl3 = snd_timer_chip(timer);
	spin_lock_irqsave(&opl3->timer_lock, flags);
	tmp = (opl3->timer_enable | OPL3_TIMER2_MASK) & ~OPL3_TIMER2_START;
	opl3->timer_enable = tmp;
	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp);	/* disable timer #1 */
	spin_unlock_irqrestore(&opl3->timer_lock, flags);
	return 0;
}
コード例 #7
0
ファイル: timer.c プロジェクト: 12rafael/jellytimekernel
static int snd_emu10k1_timer_start(struct snd_timer *timer)
{
	struct snd_emu10k1 *emu;
	unsigned long flags;
	unsigned int delay;

	emu = snd_timer_chip(timer);
	delay = timer->sticks - 1;
	if (delay < 5 ) /* minimum time is 5 ticks */
		delay = 5;
	spin_lock_irqsave(&emu->reg_lock, flags);
	snd_emu10k1_intr_enable(emu, INTE_INTERVALTIMERENB);
	outw(delay & TIMER_RATE_MASK, emu->port + TIMER);
	spin_unlock_irqrestore(&emu->reg_lock, flags);
	return 0;
}
コード例 #8
0
ファイル: opl3_lib.c プロジェクト: asimkadav/fgft
/* static MJR */ int snd_opl3_timer2_start(struct snd_timer * timer)
{
	unsigned long flags;
	unsigned char tmp;
	unsigned int ticks;
	struct snd_opl3 *opl3;

	opl3 = snd_timer_chip(timer);
	spin_lock_irqsave(&opl3->timer_lock, flags);
	ticks = timer->sticks;
	tmp = (opl3->timer_enable | OPL3_TIMER2_START) & ~OPL3_TIMER2_MASK;
	opl3->timer_enable = tmp;
	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER2, 256 - ticks);	/* timer 1 count */
	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp);	/* enable timer 1 IRQ */
	spin_unlock_irqrestore(&opl3->timer_lock, flags);
	return 0;
}
コード例 #9
0
ファイル: gus_timer.c プロジェクト: Antonio-Zhou/Linux-2.6.11
static int snd_gf1_timer2_start(snd_timer_t * timer)
{
	unsigned long flags;
	unsigned char tmp;
	unsigned int ticks;
	snd_gus_card_t *gus;

	gus = snd_timer_chip(timer);
	spin_lock_irqsave(&gus->reg_lock, flags);
	ticks = timer->sticks;
	tmp = (gus->gf1.timer_enabled |= 8);
	snd_gf1_write8(gus, SNDRV_GF1_GB_ADLIB_TIMER_2, 256 - ticks);	/* timer 2 count */
	snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp);	/* enable timer 2 IRQ */
	snd_gf1_adlib_write(gus, 0x04, tmp >> 2);	/* timer 2 start */
	spin_unlock_irqrestore(&gus->reg_lock, flags);
	return 0;
}
コード例 #10
0
static int snd_ad1816a_timer_start(struct snd_timer *timer)
{
	unsigned short bits;
	unsigned long flags;
	struct snd_ad1816a *chip = snd_timer_chip(timer);
	spin_lock_irqsave(&chip->lock, flags);
	bits = snd_ad1816a_read(chip, AD1816A_INTERRUPT_ENABLE);

	if (!(bits & AD1816A_TIMER_ENABLE)) {
		snd_ad1816a_write(chip, AD1816A_TIMER_BASE_COUNT,
			timer->sticks & 0xffff);

		snd_ad1816a_write_mask(chip, AD1816A_INTERRUPT_ENABLE,
			AD1816A_TIMER_ENABLE, 0xffff);
	}
	spin_unlock_irqrestore(&chip->lock, flags);
	return 0;
}
コード例 #11
0
static int snd_ad1816a_timer_open(struct snd_timer *timer)
{
	struct snd_ad1816a *chip = snd_timer_chip(timer);
	snd_ad1816a_open(chip, AD1816A_MODE_TIMER);
	return 0;
}
コード例 #12
0
static int snd_ad1816a_timer_close(snd_timer_t *timer)
{
	ad1816a_t *chip = snd_timer_chip(timer);
	snd_ad1816a_close(chip, AD1816A_MODE_TIMER);
	return 0;
}