Lines Matching refs:beep

48 	struct pmac_beep *beep = chip->beep;  in snd_pmac_beep_stop()  local
49 if (beep && beep->running) { in snd_pmac_beep_stop()
50 beep->running = 0; in snd_pmac_beep_stop()
103 struct pmac_beep *beep; in snd_pmac_beep_event() local
121 if (! chip || (beep = chip->beep) == NULL) in snd_pmac_beep_event()
126 if (beep->running) in snd_pmac_beep_event()
139 if (chip->playback.running || chip->capture.running || beep->running) { in snd_pmac_beep_event()
143 beep->running = 1; in snd_pmac_beep_event()
146 if (hz == beep->hz && beep->volume == beep->volume_play) { in snd_pmac_beep_event()
147 nsamples = beep->nsamples; in snd_pmac_beep_event()
154 p = beep->buf; in snd_pmac_beep_event()
156 p[0] = p[1] = beep_wform[j >> 8] * beep->volume; in snd_pmac_beep_event()
159 beep->hz = hz; in snd_pmac_beep_event()
160 beep->volume_play = beep->volume; in snd_pmac_beep_event()
161 beep->nsamples = nsamples; in snd_pmac_beep_event()
165 snd_pmac_beep_dma_start(chip, beep->nsamples * 4, beep->addr, beep_speed); in snd_pmac_beep_event()
188 if (snd_BUG_ON(!chip->beep)) in snd_pmac_get_beep()
190 ucontrol->value.integer.value[0] = chip->beep->volume; in snd_pmac_get_beep()
199 if (snd_BUG_ON(!chip->beep)) in snd_pmac_put_beep()
201 oval = chip->beep->volume; in snd_pmac_put_beep()
205 chip->beep->volume = nval; in snd_pmac_put_beep()
206 return oval != chip->beep->volume; in snd_pmac_put_beep()
220 struct pmac_beep *beep; in snd_pmac_attach_beep() local
226 beep = kzalloc(sizeof(*beep), GFP_KERNEL); in snd_pmac_attach_beep()
227 if (! beep) in snd_pmac_attach_beep()
230 &beep->addr, GFP_KERNEL); in snd_pmac_attach_beep()
249 beep->dev = input_dev; in snd_pmac_attach_beep()
250 beep->buf = dmabuf; in snd_pmac_attach_beep()
251 beep->volume = BEEP_VOLUME; in snd_pmac_attach_beep()
252 beep->running = 0; in snd_pmac_attach_beep()
259 chip->beep = beep; in snd_pmac_attach_beep()
261 err = input_register_device(beep->dev); in snd_pmac_attach_beep()
271 dmabuf, beep->addr); in snd_pmac_attach_beep()
272 kfree(beep); in snd_pmac_attach_beep()
278 if (chip->beep) { in snd_pmac_detach_beep()
279 input_unregister_device(chip->beep->dev); in snd_pmac_detach_beep()
281 chip->beep->buf, chip->beep->addr); in snd_pmac_detach_beep()
282 kfree(chip->beep); in snd_pmac_detach_beep()
283 chip->beep = NULL; in snd_pmac_detach_beep()