^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #define MAXPACK 50
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define MAXBUFFERMS 100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #define MAXSTRIDE 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #define SSS (((MAXPACK*MAXBUFFERMS*MAXSTRIDE + 4096) / 4096) * 4096)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) struct snd_usx2y_hwdep_pcm_shm {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) char playback[SSS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) char capture0x8[SSS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) char capture0xA[SSS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) volatile int playback_iso_head;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) int playback_iso_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) int frame,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) } captured_iso[128];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) volatile int captured_iso_head;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) volatile unsigned captured_iso_frames;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) int capture_iso_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) int usx2y_hwdep_pcm_new(struct snd_card *card);