Lines Matching refs:pat
378 struct pattern *pat; in dsp_tone_copy() local
388 pat = (struct pattern *)tone->pattern; in dsp_tone_copy()
398 if (!pat->seq[index]) { in dsp_tone_copy()
403 if (count < pat->seq[index]) in dsp_tone_copy()
408 count -= pat->seq[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()
464 struct pattern *pat = (struct pattern *)tone->pattern; in dsp_tone_timeout() local
471 if (!pat->seq[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()
481 tone->tl.expires = jiffies + (pat->seq[index] * HZ) / 8000; in dsp_tone_timeout()
498 struct pattern *pat; in dsp_tone() local
515 pat = NULL; in dsp_tone()
519 pat = &pattern[i]; in dsp_tone()
524 if (!pat) { in dsp_tone()
532 tonet->pattern = pat; in dsp_tone()
539 dsp_tone_hw_message(dsp, pat->data[0], *(pat->siz[0])); in dsp_tone()
543 tonet->tl.expires = jiffies + (pat->seq[0] * HZ) / 8000; in dsp_tone()