Lines Matching refs:beep

35 	struct pmac_beep *beep = chip->beep;  in snd_pmac_beep_stop()  local
36 if (beep && beep->running) { in snd_pmac_beep_stop()
37 beep->running = 0; in snd_pmac_beep_stop()
90 struct pmac_beep *beep; in snd_pmac_beep_event() local
108 if (! chip || (beep = chip->beep) == NULL) in snd_pmac_beep_event()
113 if (beep->running) in snd_pmac_beep_event()
126 if (chip->playback.running || chip->capture.running || beep->running) { in snd_pmac_beep_event()
130 beep->running = 1; in snd_pmac_beep_event()
133 if (hz == beep->hz && beep->volume == beep->volume_play) { in snd_pmac_beep_event()
134 nsamples = beep->nsamples; in snd_pmac_beep_event()
141 p = beep->buf; in snd_pmac_beep_event()
143 p[0] = p[1] = beep_wform[j >> 8] * beep->volume; in snd_pmac_beep_event()
146 beep->hz = hz; in snd_pmac_beep_event()
147 beep->volume_play = beep->volume; in snd_pmac_beep_event()
148 beep->nsamples = nsamples; in snd_pmac_beep_event()
152 snd_pmac_beep_dma_start(chip, beep->nsamples * 4, beep->addr, beep_speed); in snd_pmac_beep_event()
175 if (snd_BUG_ON(!chip->beep)) in snd_pmac_get_beep()
177 ucontrol->value.integer.value[0] = chip->beep->volume; in snd_pmac_get_beep()
186 if (snd_BUG_ON(!chip->beep)) in snd_pmac_put_beep()
188 oval = chip->beep->volume; in snd_pmac_put_beep()
192 chip->beep->volume = nval; in snd_pmac_put_beep()
193 return oval != chip->beep->volume; in snd_pmac_put_beep()
207 struct pmac_beep *beep; in snd_pmac_attach_beep() local
213 beep = kzalloc(sizeof(*beep), GFP_KERNEL); in snd_pmac_attach_beep()
214 if (! beep) in snd_pmac_attach_beep()
217 &beep->addr, GFP_KERNEL); in snd_pmac_attach_beep()
236 beep->dev = input_dev; in snd_pmac_attach_beep()
237 beep->buf = dmabuf; in snd_pmac_attach_beep()
238 beep->volume = BEEP_VOLUME; in snd_pmac_attach_beep()
239 beep->running = 0; in snd_pmac_attach_beep()
246 chip->beep = beep; in snd_pmac_attach_beep()
248 err = input_register_device(beep->dev); in snd_pmac_attach_beep()
258 dmabuf, beep->addr); in snd_pmac_attach_beep()
259 kfree(beep); in snd_pmac_attach_beep()
265 if (chip->beep) { in snd_pmac_detach_beep()
266 input_unregister_device(chip->beep->dev); in snd_pmac_detach_beep()
268 chip->beep->buf, chip->beep->addr); in snd_pmac_detach_beep()
269 kfree(chip->beep); in snd_pmac_detach_beep()
270 chip->beep = NULL; in snd_pmac_detach_beep()