Lines Matching refs:index
377 int index, count, start, num; in dsp_tone_copy() local
390 index = tone->index; /* gives current sequence index */ in dsp_tone_copy()
398 if (!pat->seq[index]) { in dsp_tone_copy()
400 index = 0; in dsp_tone_copy()
403 if (count < pat->seq[index]) in dsp_tone_copy()
407 "(index=%d)\n", __func__, index); in dsp_tone_copy()
408 count -= pat->seq[index]; in dsp_tone_copy()
409 index++; in dsp_tone_copy()
412 start = count % (*(pat->siz[index])); in dsp_tone_copy()
414 if (num + count > pat->seq[index]) in dsp_tone_copy()
415 num = pat->seq[index] - count; in dsp_tone_copy()
416 if (num + start > (*(pat->siz[index]))) in dsp_tone_copy()
417 num = (*(pat->siz[index])) - start; in dsp_tone_copy()
419 memcpy(data, pat->data[index] + start, num); in dsp_tone_copy()
425 tone->index = index; in dsp_tone_copy()
465 int index = tone->index; in dsp_tone_timeout() local
470 index++; in dsp_tone_timeout()
471 if (!pat->seq[index]) in dsp_tone_timeout()
472 index = 0; in dsp_tone_timeout()
473 tone->index = index; in dsp_tone_timeout()
476 if (pat->data[index] == DATA_S) in dsp_tone_timeout()
479 dsp_tone_hw_message(dsp, pat->data[index], *(pat->siz[index])); in dsp_tone_timeout()
482 tone->tl.expires = jiffies + (pat->seq[index] * HZ) / 8000; in dsp_tone_timeout()
534 tonet->index = 0; in dsp_tone()