Re: [PATCH v4 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-08-13 Thread Ivan Orlov
On 8/13/24 07:02, Takashi Iwai wrote: On Sun, 11 Aug 2024 22:23:36 +0200, Ivan Orlov wrote: +static int snd_utimer_ioctl_create(struct file *file, + struct snd_timer_uinfo __user *_utimer_info) +{ + struct snd_utimer *utimer; + struct snd_timer_uinfo

Re: [PATCH v4 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-08-12 Thread Takashi Iwai
On Sun, 11 Aug 2024 22:23:36 +0200, Ivan Orlov wrote: > +static int snd_utimer_ioctl_create(struct file *file, > +struct snd_timer_uinfo __user *_utimer_info) > +{ > + struct snd_utimer *utimer; > + struct snd_timer_uinfo *utimer_info __free(kfree) = NULL; >

[PATCH v4 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-08-11 Thread Ivan Orlov
Implement two ioctl calls in order to support virtual userspace-driven ALSA timers. The first ioctl is SNDRV_TIMER_IOCTL_CREATE, which gets the snd_timer_uinfo struct as a parameter and returns a file descriptor of a virtual timer. It also updates the `id` field of the snd_timer_uinfo struct, whic