aboutsummaryrefslogtreecommitdiff
path: root/include/sound/effect_driver.h
blob: 410e5f9ce131041ec0169ba822a0c74d8959d7f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 *  effect_driver.h - effect offload driver APIs
 *
 *  Copyright (C) 2013 Intel Corporation
 *  Authors:	Vinod Koul <vinod.koul@intel.com>
 *  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 */
#ifndef __EFFECT_DRIVER_H
#define __EFFECT_DRIVER_H

#include <sound/effect_offload.h>

struct snd_effect_ops {
	int (*create)(struct snd_card *card, struct snd_effect *effect);
	int (*destroy)(struct snd_card *card, struct snd_effect *effect);
	int (*set_params)(struct snd_card *card,
				struct snd_effect_params *params);
	int (*get_params)(struct snd_card *card,
				struct snd_effect_params *params);
	int (*query_num_effects)(struct snd_card *card);
	int (*query_effect_caps)(struct snd_card *card,
					struct snd_effect_caps *caps);
};

#if IS_ENABLED(CONFIG_SND_EFFECTS_OFFLOAD)
int snd_effect_register(struct snd_card *card, struct snd_effect_ops *ops);
int snd_effect_deregister(struct snd_card *card);
#else
static inline int snd_effect_register(struct snd_card *card,
					struct snd_effect_ops *ops)
{
	return -ENODEV;
}
static inline int snd_effect_deregister(struct snd_card *card)
{
	return -ENODEV;
}
#endif

/* IOCTL fns */
int snd_ctl_effect_create(struct snd_card *card, void *arg);
int snd_ctl_effect_destroy(struct snd_card *card, void *arg);
int snd_ctl_effect_set_params(struct snd_card *card, void *arg);
int snd_ctl_effect_get_params(struct snd_card *card, void *arg);
int snd_ctl_effect_query_num_effects(struct snd_card *card, void *arg);
int snd_ctl_effect_query_effect_caps(struct snd_card *card, void *arg);
#endif