// SPDX-License-Identifier: GPL-2.0+ /* * u_audio.h -- interface to USB gadget "ALSA sound card" utilities * * Copyright (C) 2016 * Author: Ruslan Bilovol <ruslan.bilovol@gmail.com> */ #ifndef __U_AUDIO_H #define __U_AUDIO_H #include <linux/usb/composite.h> struct uac_params { /* playback */ int p_chmask; /* channel mask */ int p_srate; /* rate in Hz */ int p_ssize; /* sample size */ /* capture */ int c_chmask; /* channel mask */ int c_srate; /* rate in Hz */ int c_ssize; /* sample size */ int req_number; /* number of preallocated requests */ }; struct g_audio { struct usb_function func; struct usb_gadget *gadget; struct usb_ep *in_ep; struct usb_ep *out_ep; /* Max packet size for all in_ep possible speeds */ unsigned int in_ep_maxpsize; /* Max packet size for all out_ep possible speeds */ unsigned int out_ep_maxpsize; /* The ALSA Sound Card it represents on the USB-Client side */ struct snd_uac_chip *uac; struct uac_params params; };
static inline struct g_audio *func_to_g_audio(struct usb_function *f) { return container_of(f, struct g_audio, func); }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ruslan Bilovol | 25 | 100.00% | 1 | 100.00% |
Total | 25 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ruslan Bilovol | 36 | 100.00% | 1 | 100.00% |
Total | 36 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ruslan Bilovol | 217 | 99.09% | 1 | 33.33% |
Greg Kroah-Hartman | 2 | 0.91% | 2 | 66.67% |
Total | 219 | 100.00% | 3 | 100.00% |