• Home
  • Raw
  • Download

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
110 beep = chip->beep; in snd_pmac_beep_event()
111 if (!beep) in snd_pmac_beep_event()
116 if (beep->running) in snd_pmac_beep_event()
129 if (chip->playback.running || chip->capture.running || beep->running) { in snd_pmac_beep_event()
133 beep->running = 1; in snd_pmac_beep_event()
136 if (hz == beep->hz && beep->volume == beep->volume_play) { in snd_pmac_beep_event()
137 nsamples = beep->nsamples; in snd_pmac_beep_event()
144 p = beep->buf; in snd_pmac_beep_event()
146 p[0] = p[1] = beep_wform[j >> 8] * beep->volume; in snd_pmac_beep_event()
149 beep->hz = hz; in snd_pmac_beep_event()
150 beep->volume_play = beep->volume; in snd_pmac_beep_event()
151 beep->nsamples = nsamples; in snd_pmac_beep_event()
155 snd_pmac_beep_dma_start(chip, beep->nsamples * 4, beep->addr, beep_speed); in snd_pmac_beep_event()
178 if (snd_BUG_ON(!chip->beep)) in snd_pmac_get_beep()
180 ucontrol->value.integer.value[0] = chip->beep->volume; in snd_pmac_get_beep()
189 if (snd_BUG_ON(!chip->beep)) in snd_pmac_put_beep()
191 oval = chip->beep->volume; in snd_pmac_put_beep()
195 chip->beep->volume = nval; in snd_pmac_put_beep()
196 return oval != chip->beep->volume; in snd_pmac_put_beep()
210 struct pmac_beep *beep; in snd_pmac_attach_beep() local
216 beep = kzalloc(sizeof(*beep), GFP_KERNEL); in snd_pmac_attach_beep()
217 if (! beep) in snd_pmac_attach_beep()
220 &beep->addr, GFP_KERNEL); in snd_pmac_attach_beep()
239 beep->dev = input_dev; in snd_pmac_attach_beep()
240 beep->buf = dmabuf; in snd_pmac_attach_beep()
241 beep->volume = BEEP_VOLUME; in snd_pmac_attach_beep()
242 beep->running = 0; in snd_pmac_attach_beep()
249 chip->beep = beep; in snd_pmac_attach_beep()
251 err = input_register_device(beep->dev); in snd_pmac_attach_beep()
261 dmabuf, beep->addr); in snd_pmac_attach_beep()
262 kfree(beep); in snd_pmac_attach_beep()
268 if (chip->beep) { in snd_pmac_detach_beep()
269 input_unregister_device(chip->beep->dev); in snd_pmac_detach_beep()
271 chip->beep->buf, chip->beep->addr); in snd_pmac_detach_beep()
272 kfree(chip->beep); in snd_pmac_detach_beep()
273 chip->beep = NULL; in snd_pmac_detach_beep()