Lines Matching refs:tone
232 * tone sequence definition *
236 int tone;
359 * copy tone data *
365 * memcpy per function call, or two memcpy if the tone sequence changes.
373 * if tones has finished (e.g. knocking tone), dsp->tones is turned off
379 struct dsp_tone *tone = &dsp->tone;
381 /* if we have no tone, we copy silence */
382 if (!tone->tone) {
388 pat = (struct pattern *)tone->pattern;
390 index = tone->index; /* gives current sequence index */
391 count = tone->count; /* gives current sample */
402 /* check if we are currently playing this tone */
425 tone->index = index;
426 tone->count = count;
462 struct dsp *dsp = from_timer(dsp, t, tone.tl);
463 struct dsp_tone *tone = &dsp->tone;
464 struct pattern *pat = (struct pattern *)tone->pattern;
465 int index = tone->index;
467 if (!tone->tone)
473 tone->index = index;
475 /* set next tone */
481 tone->tl.expires = jiffies + (pat->seq[index] * HZ) / 8000;
482 add_timer(&tone->tl);
487 * set/release tone *
496 dsp_tone(struct dsp *dsp, int tone)
500 struct dsp_tone *tonet = &dsp->tone;
505 /* we turn off the tone */
506 if (!tone) {
511 tonet->tone = 0;
517 while (pattern[i].tone) {
518 if (pattern[i].tone == tone) {
525 printk(KERN_WARNING "dsp: given tone 0x%x is invalid\n", tone);
529 printk(KERN_DEBUG "%s: now starting tone %d (index=%d)\n",
530 __func__, tone, 0);
531 tonet->tone = tone;
538 /* set first tone */