25 #include <linux/hrtimer.h>
29 #include <linux/slab.h>
30 #include <linux/module.h>
35 #include <asm/clock.h>
82 dac_audio_stop_timer(chip);
108 .period_bytes_min = 1,
109 .period_bytes_max = (48*1024),
119 runtime->
hw = snd_sh_dac_pcm_hw;
137 dac_audio_stop_timer(chip);
172 dac_audio_start_timer(chip);
178 dac_audio_stop_timer(chip);
193 ssize_t b_count = frames_to_bytes(runtime , count);
194 ssize_t b_pos = frames_to_bytes(runtime , pos);
207 dac_audio_start_timer(chip);
220 ssize_t b_count = frames_to_bytes(runtime , count);
221 ssize_t b_pos = frames_to_bytes(runtime , pos);
234 dac_audio_start_timer(chip);
251 .open = snd_sh_dac_pcm_open,
252 .close = snd_sh_dac_pcm_close,
254 .hw_params = snd_sh_dac_pcm_hw_params,
255 .hw_free = snd_sh_dac_pcm_hw_free,
256 .prepare = snd_sh_dac_pcm_prepare,
257 .trigger = snd_sh_dac_pcm_trigger,
258 .pointer = snd_sh_dac_pcm_pointer,
259 .copy = snd_sh_dac_pcm_copy,
260 .silence = snd_sh_dac_pcm_silence,
293 platform_set_drvdata(devptr,
NULL);
299 static int snd_sh_dac_free(
struct snd_sh_dac *chip)
308 static int snd_sh_dac_dev_free(
struct snd_device *device)
312 return snd_sh_dac_free(chip);
357 .dev_free = snd_sh_dac_dev_free,
369 chip->
hrtimer.function = sh_dac_audio_timer;
371 dac_audio_reset(chip);
373 dac_audio_set_rate(chip);
375 chip->
pdata = devptr->
dev.platform_data;
385 snd_sh_dac_free(chip);
407 err = snd_sh_dac_create(card, devptr, &chip);
411 err = snd_sh_dac_pcm(chip, 0);
423 snd_printk(
"ALSA driver for SuperH DAC audio");
425 platform_set_drvdata(devptr, card);
437 .probe = snd_sh_dac_probe,
438 .remove = snd_sh_dac_remove,