aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-softmixer.h
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2019-05-13 14:30:01 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2019-05-14 15:14:20 +0200
commitb5206132b6fb5b060acacaf2aee45841a7792a8c (patch)
treeef69b33d17629f6eddd249eadc7f2c446557620a /plugins/alsa/alsa-softmixer.h
parent6c627f8650b88b19704dd4e513fe7fff701c00c1 (diff)
parent43df82896d8535f99233b4d3ab35a744b07871e0 (diff)
Bug AGL: SPEC-2387 This brings the following commits from master: * 43df828 loops/avirt: forget saved loops after creation * 622096c plug route: added a calculation for the number of physical c.. * c950295 streams: improved log output * 7520fbf core-pcm: fixed channels setting issues * 293fe69 core pcm: use the same model for writing and reading audio * e355716 pcm plugs: rework the alsa config cleanup * eb45566 alsa-api-pcm: added an 'optional' parameter * 93bf6e6 alsa-transaction: simplify the cleanup * bb70b48 alsa-api-pcm: added support of quirks * 93ca785 alsa-utils-dump: added missing ending null char Change-Id: I8ccc641b1f6827873e479185c0098d732d1b2b0a Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-softmixer.h')
-rw-r--r--plugins/alsa/alsa-softmixer.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/plugins/alsa/alsa-softmixer.h b/plugins/alsa/alsa-softmixer.h
index 2e7874d..ea3e201 100644
--- a/plugins/alsa/alsa-softmixer.h
+++ b/plugins/alsa/alsa-softmixer.h
@@ -128,6 +128,10 @@ typedef struct {
bool closeAtDeletion; // intermediate pcms in the pcm chain must not be closed, else it make libasound abort()
bool isPcmPlug;
+
+ void * private_data;
+ void (*private_data_clean) (struct SoftMixerT_ *, void *);
+ unsigned int quirks;
} AlsaPcmCtlT;
typedef struct {
@@ -154,8 +158,11 @@ typedef struct {
int tid;
char* info;
- int nbPcmFds;
- struct pollfd * pollFds;
+ int nbPcmFdsIn;
+ struct pollfd * pollFdsIn;
+
+ int nbPcmFdsOut;
+ struct pollfd * pollFdsOut;
sem_t sem;
pthread_mutex_t mutex;
@@ -210,6 +217,7 @@ typedef struct AlsaSndCtlT_ {
long nbRegistry;
struct cds_list_head registryList;
struct SubscribeHandleT_ * eventSubscribeHandle;
+ bool optional;
} AlsaSndCtlT;
@@ -220,12 +228,20 @@ typedef struct {
unsigned int nbSinks;
AlsaPcmChannelT sinks;
int ccount;
+ int physicalChannelCount;
AlsaPcmHwInfoT *params;
struct cds_list_head list;
- snd_config_t * routeConfig;
+
bool isPcmPlug;
+ unsigned int quirks;
} AlsaSndZoneT;
+
+/* This is a list of known sound card (hardware or driver) specific bugs */
+
+/* - do not trust the result of snd_pcm_poll_descriptors_revents */
+#define QUIRK_BOGUS_POLL_REVENTS_DEMANGLING (1<<0)
+
typedef struct {
const char *uid;
const char *verb;
@@ -238,6 +254,8 @@ typedef struct {
struct cds_list_head list;
bool isPcmPlug;
void * apiVerbHandle;
+ unsigned int quirks;
+ bool optional;
} AlsaSndPcmT;
typedef struct {
@@ -277,9 +295,10 @@ typedef struct AlsaStreamAudioT_ {
AlsaPcmCopyHandleT *copy;
struct cds_list_head list; /* link to the global list*/
AlsaPcmCtlT * softvol;
- snd_config_t * softvolConfig;
- snd_config_t * rateConfig;
+
void * verbApiHandle;
+ bool optional;
+ bool noHwDetected;
} AlsaStreamAudioT;
typedef struct SoftMixerT_{