Commit 877211f5 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[ALSA] Remove xxx_t typedefs: PCM



Modules: PCM Midlevel

Remove xxx_t typedefs from the core PCM codes.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 24c1f931
......@@ -24,7 +24,7 @@
#include <sound/pcm.h>
typedef struct sndrv_pcm_indirect {
struct snd_pcm_indirect {
unsigned int hw_buffer_size; /* Byte size of hardware buffer */
unsigned int hw_queue_size; /* Max queue size of hw buffer (0 = buffer size) */
unsigned int hw_data; /* Offset to next dst (or src) in hw ring buffer */
......@@ -35,20 +35,20 @@ typedef struct sndrv_pcm_indirect {
unsigned int sw_io; /* Current software pointer in bytes */
int sw_ready; /* Bytes ready to be transferred to/from hw */
snd_pcm_uframes_t appl_ptr; /* Last seen appl_ptr */
} snd_pcm_indirect_t;
};
typedef void (*snd_pcm_indirect_copy_t)(snd_pcm_substream_t *substream,
snd_pcm_indirect_t *rec, size_t bytes);
typedef void (*snd_pcm_indirect_copy_t)(struct snd_pcm_substream *substream,
struct snd_pcm_indirect *rec, size_t bytes);
/*
* helper function for playback ack callback
*/
static inline void
snd_pcm_indirect_playback_transfer(snd_pcm_substream_t *substream,
snd_pcm_indirect_t *rec,
snd_pcm_indirect_playback_transfer(struct snd_pcm_substream *substream,
struct snd_pcm_indirect *rec,
snd_pcm_indirect_copy_t copy)
{
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr;
snd_pcm_sframes_t diff = appl_ptr - rec->appl_ptr;
int qsize;
......@@ -89,8 +89,8 @@ snd_pcm_indirect_playback_transfer(snd_pcm_substream_t *substream,
* ptr = current byte pointer
*/
static inline snd_pcm_uframes_t
snd_pcm_indirect_playback_pointer(snd_pcm_substream_t *substream,
snd_pcm_indirect_t *rec, unsigned int ptr)
snd_pcm_indirect_playback_pointer(struct snd_pcm_substream *substream,
struct snd_pcm_indirect *rec, unsigned int ptr)
{
int bytes = ptr - rec->hw_io;
if (bytes < 0)
......@@ -110,11 +110,11 @@ snd_pcm_indirect_playback_pointer(snd_pcm_substream_t *substream,
* helper function for capture ack callback
*/
static inline void
snd_pcm_indirect_capture_transfer(snd_pcm_substream_t *substream,
snd_pcm_indirect_t *rec,
snd_pcm_indirect_capture_transfer(struct snd_pcm_substream *substream,
struct snd_pcm_indirect *rec,
snd_pcm_indirect_copy_t copy)
{
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr;
snd_pcm_sframes_t diff = appl_ptr - rec->appl_ptr;
......@@ -154,8 +154,8 @@ snd_pcm_indirect_capture_transfer(snd_pcm_substream_t *substream,
* ptr = current byte pointer
*/
static inline snd_pcm_uframes_t
snd_pcm_indirect_capture_pointer(snd_pcm_substream_t *substream,
snd_pcm_indirect_t *rec, unsigned int ptr)
snd_pcm_indirect_capture_pointer(struct snd_pcm_substream *substream,
struct snd_pcm_indirect *rec, unsigned int ptr)
{
int qsize;
int bytes = ptr - rec->hw_io;
......
This diff is collapsed.
......@@ -22,17 +22,17 @@
*
*/
extern int snd_pcm_hw_param_mask(snd_pcm_substream_t *pcm, snd_pcm_hw_params_t *params,
snd_pcm_hw_param_t var, const snd_mask_t *val);
extern unsigned int snd_pcm_hw_param_value_min(const snd_pcm_hw_params_t *params,
extern int snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var, const struct snd_mask *val);
extern unsigned int snd_pcm_hw_param_value_min(const struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var, int *dir);
extern unsigned int snd_pcm_hw_param_value_max(const snd_pcm_hw_params_t *params,
extern unsigned int snd_pcm_hw_param_value_max(const struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var, int *dir);
extern int _snd_pcm_hw_param_min(snd_pcm_hw_params_t *params,
extern int _snd_pcm_hw_param_min(struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var, unsigned int val, int dir);
extern int _snd_pcm_hw_param_setinteger(snd_pcm_hw_params_t *params,
extern int _snd_pcm_hw_param_setinteger(struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var);
extern int _snd_pcm_hw_param_set(snd_pcm_hw_params_t *params,
extern int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var, unsigned int val, int dir);
/* To share the same code we have alsa-lib */
......@@ -71,20 +71,20 @@ INLINE unsigned int ld2(u_int32_t v)
INLINE size_t snd_mask_sizeof(void)
{
return sizeof(snd_mask_t);
return sizeof(struct snd_mask);
}
INLINE void snd_mask_none(snd_mask_t *mask)
INLINE void snd_mask_none(struct snd_mask *mask)
{
memset(mask, 0, sizeof(*mask));
}
INLINE void snd_mask_any(snd_mask_t *mask)
INLINE void snd_mask_any(struct snd_mask *mask)
{
memset(mask, 0xff, SNDRV_MASK_SIZE * sizeof(u_int32_t));
}
INLINE int snd_mask_empty(const snd_mask_t *mask)
INLINE int snd_mask_empty(const struct snd_mask *mask)
{
int i;
for (i = 0; i < SNDRV_MASK_SIZE; i++)
......@@ -93,7 +93,7 @@ INLINE int snd_mask_empty(const snd_mask_t *mask)
return 1;
}
INLINE unsigned int snd_mask_min(const snd_mask_t *mask)
INLINE unsigned int snd_mask_min(const struct snd_mask *mask)
{
int i;
assert(!snd_mask_empty(mask));
......@@ -104,7 +104,7 @@ INLINE unsigned int snd_mask_min(const snd_mask_t *mask)
return 0;
}
INLINE unsigned int snd_mask_max(const snd_mask_t *mask)
INLINE unsigned int snd_mask_max(const struct snd_mask *mask)
{
int i;
assert(!snd_mask_empty(mask));
......@@ -115,19 +115,19 @@ INLINE unsigned int snd_mask_max(const snd_mask_t *mask)
return 0;
}
INLINE void snd_mask_set(snd_mask_t *mask, unsigned int val)
INLINE void snd_mask_set(struct snd_mask *mask, unsigned int val)
{
assert(val <= SNDRV_MASK_BITS);
mask->bits[MASK_OFS(val)] |= MASK_BIT(val);
}
INLINE void snd_mask_reset(snd_mask_t *mask, unsigned int val)
INLINE void snd_mask_reset(struct snd_mask *mask, unsigned int val)
{
assert(val <= SNDRV_MASK_BITS);
mask->bits[MASK_OFS(val)] &= ~MASK_BIT(val);
}
INLINE void snd_mask_set_range(snd_mask_t *mask, unsigned int from, unsigned int to)
INLINE void snd_mask_set_range(struct snd_mask *mask, unsigned int from, unsigned int to)
{
unsigned int i;
assert(to <= SNDRV_MASK_BITS && from <= to);
......@@ -135,7 +135,7 @@ INLINE void snd_mask_set_range(snd_mask_t *mask, unsigned int from, unsigned int
mask->bits[MASK_OFS(i)] |= MASK_BIT(i);
}
INLINE void snd_mask_reset_range(snd_mask_t *mask, unsigned int from, unsigned int to)
INLINE void snd_mask_reset_range(struct snd_mask *mask, unsigned int from, unsigned int to)
{
unsigned int i;
assert(to <= SNDRV_MASK_BITS && from <= to);
......@@ -143,7 +143,7 @@ INLINE void snd_mask_reset_range(snd_mask_t *mask, unsigned int from, unsigned i
mask->bits[MASK_OFS(i)] &= ~MASK_BIT(i);
}
INLINE void snd_mask_leave(snd_mask_t *mask, unsigned int val)
INLINE void snd_mask_leave(struct snd_mask *mask, unsigned int val)
{
unsigned int v;
assert(val <= SNDRV_MASK_BITS);
......@@ -152,30 +152,30 @@ INLINE void snd_mask_leave(snd_mask_t *mask, unsigned int val)
mask->bits[MASK_OFS(val)] = v;
}
INLINE void snd_mask_intersect(snd_mask_t *mask, const snd_mask_t *v)
INLINE void snd_mask_intersect(struct snd_mask *mask, const struct snd_mask *v)
{
int i;
for (i = 0; i < SNDRV_MASK_SIZE; i++)
mask->bits[i] &= v->bits[i];
}
INLINE int snd_mask_eq(const snd_mask_t *mask, const snd_mask_t *v)
INLINE int snd_mask_eq(const struct snd_mask *mask, const struct snd_mask *v)
{
return ! memcmp(mask, v, SNDRV_MASK_SIZE * sizeof(u_int32_t));
}
INLINE void snd_mask_copy(snd_mask_t *mask, const snd_mask_t *v)
INLINE void snd_mask_copy(struct snd_mask *mask, const struct snd_mask *v)
{
*mask = *v;
}
INLINE int snd_mask_test(const snd_mask_t *mask, unsigned int val)
INLINE int snd_mask_test(const struct snd_mask *mask, unsigned int val)
{
assert(val <= SNDRV_MASK_BITS);
return mask->bits[MASK_OFS(val)] & MASK_BIT(val);
}
INLINE int snd_mask_single(const snd_mask_t *mask)
INLINE int snd_mask_single(const struct snd_mask *mask)
{
int i, c = 0;
assert(!snd_mask_empty(mask));
......@@ -191,9 +191,9 @@ INLINE int snd_mask_single(const snd_mask_t *mask)
return 1;
}
INLINE int snd_mask_refine(snd_mask_t *mask, const snd_mask_t *v)
INLINE int snd_mask_refine(struct snd_mask *mask, const struct snd_mask *v)
{
snd_mask_t old;
struct snd_mask old;
assert(!snd_mask_empty(mask));
snd_mask_copy(&old, mask);
snd_mask_intersect(mask, v);
......@@ -202,7 +202,7 @@ INLINE int snd_mask_refine(snd_mask_t *mask, const snd_mask_t *v)
return !snd_mask_eq(mask, &old);
}
INLINE int snd_mask_refine_first(snd_mask_t *mask)
INLINE int snd_mask_refine_first(struct snd_mask *mask)
{
assert(!snd_mask_empty(mask));
if (snd_mask_single(mask))
......@@ -211,7 +211,7 @@ INLINE int snd_mask_refine_first(snd_mask_t *mask)
return 1;
}
INLINE int snd_mask_refine_last(snd_mask_t *mask)
INLINE int snd_mask_refine_last(struct snd_mask *mask)
{
assert(!snd_mask_empty(mask));
if (snd_mask_single(mask))
......@@ -220,7 +220,7 @@ INLINE int snd_mask_refine_last(snd_mask_t *mask)
return 1;
}
INLINE int snd_mask_refine_min(snd_mask_t *mask, unsigned int val)
INLINE int snd_mask_refine_min(struct snd_mask *mask, unsigned int val)
{
assert(!snd_mask_empty(mask));
if (snd_mask_min(mask) >= val)
......@@ -231,7 +231,7 @@ INLINE int snd_mask_refine_min(snd_mask_t *mask, unsigned int val)
return 1;
}
INLINE int snd_mask_refine_max(snd_mask_t *mask, unsigned int val)
INLINE int snd_mask_refine_max(struct snd_mask *mask, unsigned int val)
{
assert(!snd_mask_empty(mask));
if (snd_mask_max(mask) <= val)
......@@ -242,7 +242,7 @@ INLINE int snd_mask_refine_max(snd_mask_t *mask, unsigned int val)
return 1;
}
INLINE int snd_mask_refine_set(snd_mask_t *mask, unsigned int val)
INLINE int snd_mask_refine_set(struct snd_mask *mask, unsigned int val)
{
int changed;
assert(!snd_mask_empty(mask));
......@@ -253,13 +253,13 @@ INLINE int snd_mask_refine_set(snd_mask_t *mask, unsigned int val)
return changed;
}
INLINE int snd_mask_value(const snd_mask_t *mask)
INLINE int snd_mask_value(const struct snd_mask *mask)
{
assert(!snd_mask_empty(mask));
return snd_mask_min(mask);
}
INLINE void snd_interval_any(snd_interval_t *i)
INLINE void snd_interval_any(struct snd_interval *i)
{
i->min = 0;
i->openmin = 0;
......@@ -269,42 +269,42 @@ INLINE void snd_interval_any(snd_interval_t *i)
i->empty = 0;
}
INLINE void snd_interval_none(snd_interval_t *i)
INLINE void snd_interval_none(struct snd_interval *i)
{
i->empty = 1;
}
INLINE int snd_interval_checkempty(const snd_interval_t *i)
INLINE int snd_interval_checkempty(const struct snd_interval *i)
{
return (i->min > i->max ||
(i->min == i->max && (i->openmin || i->openmax)));
}
INLINE int snd_interval_empty(const snd_interval_t *i)
INLINE int snd_interval_empty(const struct snd_interval *i)
{
return i->empty;
}
INLINE int snd_interval_single(const snd_interval_t *i)
INLINE int snd_interval_single(const struct snd_interval *i)
{
assert(!snd_interval_empty(i));
return (i->min == i->max ||
(i->min + 1 == i->max && i->openmax));
}
INLINE int snd_interval_value(const snd_interval_t *i)
INLINE int snd_interval_value(const struct snd_interval *i)
{
assert(snd_interval_single(i));
return i->min;
}
INLINE int snd_interval_min(const snd_interval_t *i)
INLINE int snd_interval_min(const struct snd_interval *i)
{
assert(!snd_interval_empty(i));
return i->min;
}
INLINE int snd_interval_max(const snd_interval_t *i)
INLINE int snd_interval_max(const struct snd_interval *i)
{
unsigned int v;
assert(!snd_interval_empty(i));
......@@ -314,18 +314,18 @@ INLINE int snd_interval_max(const snd_interval_t *i)
return v;
}
INLINE int snd_interval_test(const snd_interval_t *i, unsigned int val)
INLINE int snd_interval_test(const struct snd_interval *i, unsigned int val)
{
return !((i->min > val || (i->min == val && i->openmin) ||
i->max < val || (i->max == val && i->openmax)));
}
INLINE void snd_interval_copy(snd_interval_t *d, const snd_interval_t *s)
INLINE void snd_interval_copy(struct snd_interval *d, const struct snd_interval *s)
{
*d = *s;
}
INLINE int snd_interval_setinteger(snd_interval_t *i)
INLINE int snd_interval_setinteger(struct snd_interval *i)
{
if (i->integer)
return 0;
......@@ -335,7 +335,7 @@ INLINE int snd_interval_setinteger(snd_interval_t *i)
return 1;
}
INLINE int snd_interval_eq(const snd_interval_t *i1, const snd_interval_t *i2)
INLINE int snd_interval_eq(const struct snd_interval *i1, const struct snd_interval *i2)
{
if (i1->empty)
return i2->empty;
......
......@@ -33,18 +33,18 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Abramo Bagnara <abramo@alsa-proj
MODULE_DESCRIPTION("Midlevel PCM code for ALSA.");
MODULE_LICENSE("GPL");
snd_pcm_t *snd_pcm_devices[SNDRV_CARDS * SNDRV_PCM_DEVICES];
struct snd_pcm *snd_pcm_devices[SNDRV_CARDS * SNDRV_PCM_DEVICES];
static LIST_HEAD(snd_pcm_notify_list);
static DECLARE_MUTEX(register_mutex);
static int snd_pcm_free(snd_pcm_t *pcm);
static int snd_pcm_dev_free(snd_device_t *device);
static int snd_pcm_dev_register(snd_device_t *device);
static int snd_pcm_dev_disconnect(snd_device_t *device);
static int snd_pcm_dev_unregister(snd_device_t *device);
static int snd_pcm_free(struct snd_pcm *pcm);
static int snd_pcm_dev_free(struct snd_device *device);
static int snd_pcm_dev_register(struct snd_device *device);
static int snd_pcm_dev_disconnect(struct snd_device *device);
static int snd_pcm_dev_unregister(struct snd_device *device);
static int snd_pcm_control_ioctl(snd_card_t * card,
snd_ctl_file_t * control,
static int snd_pcm_control_ioctl(struct snd_card *card,
struct snd_ctl_file *control,
unsigned int cmd, unsigned long arg)
{
unsigned int tmp;
......@@ -71,13 +71,13 @@ static int snd_pcm_control_ioctl(snd_card_t * card,
}
case SNDRV_CTL_IOCTL_PCM_INFO:
{
snd_pcm_info_t __user *info;
struct snd_pcm_info __user *info;
unsigned int device, subdevice;
snd_pcm_stream_t stream;
snd_pcm_t *pcm;
snd_pcm_str_t *pstr;
snd_pcm_substream_t *substream;
info = (snd_pcm_info_t __user *)arg;
int stream;
struct snd_pcm *pcm;
struct snd_pcm_str *pstr;
struct snd_pcm_substream *substream;
info = (struct snd_pcm_info __user *)arg;
if (get_user(device, &info->device))
return -EFAULT;
if (device >= SNDRV_PCM_DEVICES)
......@@ -200,7 +200,7 @@ static char *snd_pcm_tstamp_mode_names[] = {
TSTAMP(MMAP),
};
static const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
static const char *snd_pcm_stream_name(int stream)
{
snd_assert(stream <= SNDRV_PCM_STREAM_LAST, return NULL);
return snd_pcm_stream_names[stream];
......@@ -208,23 +208,20 @@ static const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
static const char *snd_pcm_access_name(snd_pcm_access_t access)
{
snd_assert(access <= SNDRV_PCM_ACCESS_LAST, return NULL);
return snd_pcm_access_names[access];
}
const char *snd_pcm_format_name(snd_pcm_format_t format)
{
snd_assert(format <= SNDRV_PCM_FORMAT_LAST, return NULL);
return snd_pcm_format_names[format];
}
static const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat)
{
snd_assert(subformat <= SNDRV_PCM_SUBFORMAT_LAST, return NULL);
return snd_pcm_subformat_names[subformat];
}
static const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
static const char *snd_pcm_tstamp_mode_name(int mode)
{
snd_assert(mode <= SNDRV_PCM_TSTAMP_LAST, return NULL);
return snd_pcm_tstamp_mode_names[mode];
......@@ -232,7 +229,6 @@ static const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
static const char *snd_pcm_state_name(snd_pcm_state_t state)
{
snd_assert(state <= SNDRV_PCM_STATE_LAST, return NULL);
return snd_pcm_state_names[state];
}
......@@ -268,9 +264,10 @@ static const char *snd_pcm_oss_format_name(int format)
#endif
#ifdef CONFIG_PROC_FS
static void snd_pcm_proc_info_read(snd_pcm_substream_t *substream, snd_info_buffer_t *buffer)
static void snd_pcm_proc_info_read(struct snd_pcm_substream *substream,
struct snd_info_buffer *buffer)
{
snd_pcm_info_t *info;
struct snd_pcm_info *info;
int err;
if (! substream)
......@@ -302,20 +299,25 @@ static void snd_pcm_proc_info_read(snd_pcm_substream_t *substream, snd_info_buff
kfree(info);
}
static void snd_pcm_stream_proc_info_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void snd_pcm_stream_proc_info_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_pcm_proc_info_read(((snd_pcm_str_t *)entry->private_data)->substream, buffer);
snd_pcm_proc_info_read(((struct snd_pcm_str *)entry->private_data)->substream,
buffer);
}
static void snd_pcm_substream_proc_info_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_pcm_proc_info_read((snd_pcm_substream_t *)entry->private_data, buffer);
snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data,
buffer);
}
static void snd_pcm_substream_proc_hw_params_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_pcm_substream_t *substream = (snd_pcm_substream_t *)entry->private_data;
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_pcm_substream *substream = entry->private_data;
struct snd_pcm_runtime *runtime = substream->runtime;
if (!runtime) {
snd_iprintf(buffer, "closed\n");
return;
......@@ -347,10 +349,11 @@ static void snd_pcm_substream_proc_hw_params_read(snd_info_entry_t *entry, snd_i
snd_pcm_stream_unlock_irq(substream);
}
static void snd_pcm_substream_proc_sw_params_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void snd_pcm_substream_proc_sw_params_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_pcm_substream_t *substream = (snd_pcm_substream_t *)entry->private_data;
snd_pcm_runtime_t *runtime = substream->runtime;
struct snd_pcm_substream *substream = entry->private_data;
struct snd_pcm_runtime *runtime = substream->runtime;
if (!runtime) {
snd_iprintf(buffer, "closed\n");
return;
......@@ -374,11 +377,12 @@ static void snd_pcm_substream_proc_sw_params_read(snd_info_entry_t *entry, snd_i
snd_pcm_stream_unlock_irq(substream);
}
static void snd_pcm_substream_proc_status_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_pcm_substream_t *substream = (snd_pcm_substream_t *)entry->private_data;
snd_pcm_runtime_t *runtime = substream->runtime;
snd_pcm_status_t status;
struct snd_pcm_substream *substream = entry->private_data;
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_pcm_status status;
int err;
if (!runtime) {
snd_iprintf(buffer, "closed\n");
......@@ -405,25 +409,27 @@ static void snd_pcm_substream_proc_status_read(snd_info_entry_t *entry, snd_info
#endif
#ifdef CONFIG_SND_DEBUG
static void snd_pcm_xrun_debug_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void snd_pcm_xrun_debug_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data;
struct snd_pcm_str *pstr = entry->private_data;
snd_iprintf(buffer, "%d\n", pstr->xrun_debug);
}
static void snd_pcm_xrun_debug_write(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void snd_pcm_xrun_debug_write(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data;
struct snd_pcm_str *pstr = entry->private_data;
char line[64];
if (!snd_info_get_line(buffer, line, sizeof(line)))
pstr->xrun_debug = simple_strtoul(line, NULL, 10);
}
#endif
static int snd_pcm_stream_proc_init(snd_pcm_str_t *pstr)
static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
{
snd_pcm_t *pcm = pstr->pcm;
snd_info_entry_t *entry;
struct snd_pcm *pcm = pstr->pcm;
struct snd_info_entry *entry;
char name[16];
sprintf(name, "pcm%i%c", pcm->device,
......@@ -447,7 +453,8 @@ static int snd_pcm_stream_proc_init(snd_pcm_str_t *pstr)
pstr->proc_info_entry = entry;
#ifdef CONFIG_SND_DEBUG
if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug", pstr->proc_root)) != NULL) {
if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug",
pstr->proc_root)) != NULL) {
entry->c.text.read_size = 64;
entry->c.text.read = snd_pcm_xrun_debug_read;
entry->c.text.write_size = 64;
......@@ -464,7 +471,7 @@ static int snd_pcm_stream_proc_init(snd_pcm_str_t *pstr)
return 0;
}
static int snd_pcm_stream_proc_done(snd_pcm_str_t *pstr)
static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr)
{
#ifdef CONFIG_SND_DEBUG
if (pstr->proc_xrun_debug_entry) {
......@@ -483,10 +490,10 @@ static int snd_pcm_stream_proc_done(snd_pcm_str_t *pstr)
return 0;
}
static int snd_pcm_substream_proc_init(snd_pcm_substream_t *substream)
static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream)
{
snd_info_entry_t *entry;
snd_card_t *card;
struct snd_info_entry *entry;
struct snd_card *card;
char name[16];
card = substream->pcm->card;
......@@ -540,7 +547,7 @@ static int snd_pcm_substream_proc_init(snd_pcm_substream_t *substream)
return 0;
}
static int snd_pcm_substream_proc_done(snd_pcm_substream_t *substream)
static int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream)
{
if (substream->proc_info_entry) {
snd_info_unregister(substream->proc_info_entry);
......@@ -578,11 +585,11 @@ static int snd_pcm_substream_proc_done(snd_pcm_substream_t *substream)
*
* Returns zero if successful, or a negative error code on failure.
*/
int snd_pcm_new_stream(snd_pcm_t *pcm, int stream, int substream_count)
int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count)
{
int idx, err;
snd_pcm_str_t *pstr = &pcm->streams[stream];
snd_pcm_substream_t *substream, *prev;
struct snd_pcm_str *pstr = &pcm->streams[stream];