mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Merge kernel uapi/sound/asound.h and asequencer.h
Instead of keeping modified asound.h and asequencer.h, copy the files in the kernel include/uapi/sound as is, and give some renames for avoiding conflicts with alsa-lib's definitions. Some structs, unions and typedefs in asound.h and asequencer.h are once renamed in local.h before inclusion, then renamed back again. A bonus by this action is that some local codes don't have to refer to sndrv_xxx any longer. However, some codes like src/seq/seq.c need explicit cast because of unavoidable conflicts of struct types. Another significant change is that now snd_pcm_sw_params.period_event field is removed. Instead, try to access the last reserved field internally. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
3fd4ab9be0
commit
9b5beef1dd
12 changed files with 590 additions and 636 deletions
|
|
@ -1899,7 +1899,7 @@ int snd_seq_port_info_get_port(const snd_seq_port_info_t *info)
|
|||
const snd_seq_addr_t *snd_seq_port_info_get_addr(const snd_seq_port_info_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->addr;
|
||||
return (const snd_seq_addr_t *) &info->addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2094,7 +2094,7 @@ void snd_seq_port_info_set_port(snd_seq_port_info_t *info, int port)
|
|||
void snd_seq_port_info_set_addr(snd_seq_port_info_t *info, const snd_seq_addr_t *addr)
|
||||
{
|
||||
assert(info);
|
||||
info->addr = *addr;
|
||||
info->addr = *(const struct sndrv_seq_addr *)addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2444,7 +2444,7 @@ void snd_seq_port_subscribe_copy(snd_seq_port_subscribe_t *dst, const snd_seq_po
|
|||
const snd_seq_addr_t *snd_seq_port_subscribe_get_sender(const snd_seq_port_subscribe_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->sender;
|
||||
return (const snd_seq_addr_t *)&info->sender;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2456,7 +2456,7 @@ const snd_seq_addr_t *snd_seq_port_subscribe_get_sender(const snd_seq_port_subsc
|
|||
const snd_seq_addr_t *snd_seq_port_subscribe_get_dest(const snd_seq_port_subscribe_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->dest;
|
||||
return (const snd_seq_addr_t *)&info->dest;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2729,7 +2729,7 @@ int snd_seq_query_subscribe_get_port(const snd_seq_query_subscribe_t *info)
|
|||
const snd_seq_addr_t *snd_seq_query_subscribe_get_root(const snd_seq_query_subscribe_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->root;
|
||||
return (const snd_seq_addr_t *)&info->root;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2781,7 +2781,7 @@ int snd_seq_query_subscribe_get_num_subs(const snd_seq_query_subscribe_t *info)
|
|||
const snd_seq_addr_t *snd_seq_query_subscribe_get_addr(const snd_seq_query_subscribe_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->addr;
|
||||
return (const snd_seq_addr_t *)&info->addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2872,7 +2872,7 @@ void snd_seq_query_subscribe_set_port(snd_seq_query_subscribe_t *info, int port)
|
|||
void snd_seq_query_subscribe_set_root(snd_seq_query_subscribe_t *info, const snd_seq_addr_t *addr)
|
||||
{
|
||||
assert(info);
|
||||
info->root = *addr;
|
||||
info->root = *(const struct snd_seq_addr *)addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3227,7 +3227,7 @@ int snd_seq_query_named_queue(snd_seq_t *seq, const char *name)
|
|||
*/
|
||||
int snd_seq_get_queue_usage(snd_seq_t *seq, int q)
|
||||
{
|
||||
struct sndrv_seq_queue_client info;
|
||||
struct snd_seq_queue_client info;
|
||||
int err;
|
||||
assert(seq);
|
||||
memset(&info, 0, sizeof(info));
|
||||
|
|
@ -3249,7 +3249,7 @@ int snd_seq_get_queue_usage(snd_seq_t *seq, int q)
|
|||
*/
|
||||
int snd_seq_set_queue_usage(snd_seq_t *seq, int q, int used)
|
||||
{
|
||||
struct sndrv_seq_queue_client info;
|
||||
struct snd_seq_queue_client info;
|
||||
assert(seq);
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.queue = q;
|
||||
|
|
@ -3351,7 +3351,7 @@ snd_seq_tick_time_t snd_seq_queue_status_get_tick_time(const snd_seq_queue_statu
|
|||
const snd_seq_real_time_t *snd_seq_queue_status_get_real_time(const snd_seq_queue_status_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->time;
|
||||
return (const snd_seq_real_time_t *)&info->time;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4289,7 +4289,7 @@ int snd_seq_remove_events_get_queue(const snd_seq_remove_events_t *info)
|
|||
const snd_seq_timestamp_t *snd_seq_remove_events_get_time(const snd_seq_remove_events_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->time;
|
||||
return (const snd_seq_timestamp_t *)&info->time;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4302,7 +4302,7 @@ const snd_seq_timestamp_t *snd_seq_remove_events_get_time(const snd_seq_remove_e
|
|||
const snd_seq_addr_t *snd_seq_remove_events_get_dest(const snd_seq_remove_events_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->dest;
|
||||
return (const snd_seq_addr_t *)&info->dest;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4380,7 +4380,7 @@ void snd_seq_remove_events_set_queue(snd_seq_remove_events_t *info, int queue)
|
|||
void snd_seq_remove_events_set_time(snd_seq_remove_events_t *info, const snd_seq_timestamp_t *time)
|
||||
{
|
||||
assert(info);
|
||||
info->time = *time;
|
||||
info->time = *(const union sndrv_seq_timestamp *)time;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4393,7 +4393,7 @@ void snd_seq_remove_events_set_time(snd_seq_remove_events_t *info, const snd_seq
|
|||
void snd_seq_remove_events_set_dest(snd_seq_remove_events_t *info, const snd_seq_addr_t *addr)
|
||||
{
|
||||
assert(info);
|
||||
info->dest = *addr;
|
||||
info->dest = *(const struct sndrv_seq_addr *)addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4475,7 +4475,7 @@ static int remove_match(snd_seq_remove_events_t *info, snd_seq_event_t *ev)
|
|||
if (info->remove_mode & SNDRV_SEQ_REMOVE_TIME_TICK)
|
||||
res = snd_seq_compare_tick_time(&ev->time.tick, &info->time.tick);
|
||||
else
|
||||
res = snd_seq_compare_real_time(&ev->time.time, &info->time.time);
|
||||
res = snd_seq_compare_real_time(&ev->time.time, (snd_seq_real_time_t *)&info->time.time);
|
||||
if (!res)
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -4483,7 +4483,7 @@ static int remove_match(snd_seq_remove_events_t *info, snd_seq_event_t *ev)
|
|||
if (info->remove_mode & SNDRV_SEQ_REMOVE_TIME_TICK)
|
||||
res = snd_seq_compare_tick_time(&ev->time.tick, &info->time.tick);
|
||||
else
|
||||
res = snd_seq_compare_real_time(&ev->time.time, &info->time.time);
|
||||
res = snd_seq_compare_real_time(&ev->time.time, (snd_seq_real_time_t *)&info->time.time);
|
||||
if (res)
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue