aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-24 18:39:38 +0200
committerTakashi Iwai <tiwai@suse.de>2011-05-24 18:39:38 +0200
commit74a7aaa2ef0b11244a8238867465e6e6e365262d (patch)
tree2c93f2800f27efe9e2bdab6bfbd6de3dd35044d1
parentdfd8c5b7f3f3d265b6680a4c492d551b73114b03 (diff)
downloadsalsa-lib-74a7aaa2ef0b11244a8238867465e6e6e365262d.tar.gz
Fix builds with new definitions
and minor clean-ups.
-rw-r--r--src/cards.c10
-rw-r--r--src/ctl_func.h1
-rw-r--r--src/ctl_macros.h3
-rw-r--r--src/hcontrol.c74
-rw-r--r--src/hwdep.c6
-rw-r--r--src/hwdep.h1
-rw-r--r--src/input.h2
-rw-r--r--src/input_abi.c6
-rw-r--r--src/local.h3
-rw-r--r--src/mixer.c2
-rw-r--r--src/pcm.c80
-rw-r--r--src/pcm_func.h1
-rw-r--r--src/pcm_macros.h7
-rw-r--r--src/pcm_misc.c2
-rw-r--r--src/rawmidi.c28
-rw-r--r--src/timer.c2
-rw-r--r--src/timer.h2
-rw-r--r--src/version.h.in4
18 files changed, 110 insertions, 124 deletions
diff --git a/src/cards.c b/src/cards.c
index a268f27..b360a17 100644
--- a/src/cards.c
+++ b/src/cards.c
@@ -29,6 +29,9 @@
#include "control.h"
#include "local.h"
+/* common helper function to set nonblock mode
+ * called from various *_macros.h
+ */
int _snd_set_nonblock(int fd, int nonblock)
{
long flags;
@@ -61,7 +64,7 @@ int snd_card_next(int *rcard)
return -EINVAL;
card = *rcard;
card = card < 0 ? 0 : card + 1;
- for (; card < 32; card++) {
+ for (; card < SALSA_MAX_CARDS; card++) {
if (snd_card_load(card)) {
*rcard = card;
return 0;
@@ -125,7 +128,7 @@ int snd_card_get_index(const char *string)
return card;
return -ENODEV;
}
- for (card = 0; card < 32; card++) {
+ for (card = 0; card < SALSA_MAX_CARDS; card++) {
if (!snd_card_load(card))
continue;
if (get_card_info(card, &info) < 0)
@@ -164,6 +167,9 @@ int snd_card_get_longname(int card, char **name)
return 0;
}
+/* very simple device name parsing; only limited prefix are allowed:
+ * "hw" and "default"
+ */
int _snd_dev_get_device(const char *name, int *cardp, int *devp, int *subdevp)
{
int card;
diff --git a/src/ctl_func.h b/src/ctl_func.h
index 31a51b3..976848c 100644
--- a/src/ctl_func.h
+++ b/src/ctl_func.h
@@ -5,6 +5,7 @@
*/
#include "global.h"
+#include "asound.h"
#include "ctl_types.h"
int snd_card_load(int card);
diff --git a/src/ctl_macros.h b/src/ctl_macros.h
index 0d22ed3..04af071 100644
--- a/src/ctl_macros.h
+++ b/src/ctl_macros.h
@@ -235,8 +235,7 @@ int snd_ctl_elem_list_alloc_space(snd_ctl_elem_list_t *obj,
unsigned int entries)
{
free(obj->pids);
- obj->pids = (struct sndrv_ctl_elem_id *)
- calloc(entries, sizeof(*obj->pids));
+ obj->pids = calloc(entries, sizeof(*obj->pids));
if (!obj->pids) {
obj->space = 0;
return -ENOMEM;
diff --git a/src/hcontrol.c b/src/hcontrol.c
index be157e8..22a862b 100644
--- a/src/hcontrol.c
+++ b/src/hcontrol.c
@@ -123,14 +123,14 @@ static int snd_hctl_elem_add(snd_hctl_t *hctl, snd_hctl_elem_t *elem)
if (snd_hctl_find_elem(hctl, &elem->id))
return -EBUSY;
add_elem_list(hctl, elem);
- return snd_hctl_throw_event(hctl, SNDRV_CTL_EVENT_MASK_ADD, elem);
+ return snd_hctl_throw_event(hctl, SND_CTL_EVENT_MASK_ADD, elem);
}
static void snd_hctl_elem_remove(snd_hctl_t *hctl,
snd_hctl_elem_t *elem)
{
del_elem_list(hctl, elem);
- snd_hctl_elem_throw_event(elem, SNDRV_CTL_EVENT_MASK_REMOVE);
+ snd_hctl_elem_throw_event(elem, SND_CTL_EVENT_MASK_REMOVE);
free(elem);
}
@@ -172,19 +172,20 @@ int snd_hctl_load(snd_hctl_t *hctl)
snd_hctl_elem_t *elem;
memset(&list, 0, sizeof(list));
- if ((err = snd_ctl_elem_list(hctl->ctl, &list)) < 0)
+ err = snd_ctl_elem_list(hctl->ctl, &list);
+ if (err < 0)
goto _end;
while (list.count != list.used) {
err = snd_ctl_elem_list_alloc_space(&list, list.count);
if (err < 0)
goto _end;
- if ((err = snd_ctl_elem_list(hctl->ctl, &list)) < 0)
+ err = snd_ctl_elem_list(hctl->ctl, &list);
+ if (err < 0)
goto _end;
}
for (idx = 0; idx < list.count; idx++) {
elem = calloc(1, sizeof(*elem));
if (!elem) {
- snd_hctl_free(hctl);
err = -ENOMEM;
goto _end;
}
@@ -192,57 +193,50 @@ int snd_hctl_load(snd_hctl_t *hctl)
elem->hctl = hctl;
add_elem_list(hctl, elem);
}
- for (elem = hctl->first_elem; elem; elem = elem->next) {
- int res = snd_hctl_throw_event(hctl, SNDRV_CTL_EVENT_MASK_ADD,
- elem);
- if (res < 0)
- return res;
- }
+ for (elem = hctl->first_elem; elem; elem = elem->next)
+ snd_hctl_throw_event(hctl, SND_CTL_EVENT_MASK_ADD, elem);
err = snd_ctl_subscribe_events(hctl->ctl, 1);
_end:
- free(list.pids);
+ snd_ctl_elem_list_free_space(&list);
+ if (err < 0)
+ snd_hctl_free(hctl);
return err;
}
static int snd_hctl_handle_event(snd_hctl_t *hctl, snd_ctl_event_t *event)
{
snd_hctl_elem_t *elem;
- int res;
+ int err;
- switch (event->type) {
- case SND_CTL_EVENT_ELEM:
- break;
- default:
+ if (event->type != SND_CTL_EVENT_ELEM)
return 0;
- }
- if (event->data.elem.mask == SNDRV_CTL_EVENT_MASK_REMOVE) {
- snd_hctl_elem_t *res;
- res = snd_hctl_find_elem(hctl, &event->data.elem.id);
- if (!res)
+ if (event->data.elem.mask == SND_CTL_EVENT_MASK_REMOVE) {
+ elem = snd_hctl_find_elem(hctl, &event->data.elem.id);
+ if (!elem)
return -ENOENT;
- snd_hctl_elem_remove(hctl, res);
+ snd_hctl_elem_remove(hctl, elem);
return 0;
}
- if (event->data.elem.mask & SNDRV_CTL_EVENT_MASK_ADD) {
- elem = calloc(1, sizeof(snd_hctl_elem_t));
- if (elem == NULL)
+ if (event->data.elem.mask & SND_CTL_EVENT_MASK_ADD) {
+ elem = calloc(1, sizeof(*elem));
+ if (!elem)
return -ENOMEM;
elem->id = event->data.elem.id;
elem->hctl = hctl;
- res = snd_hctl_elem_add(hctl, elem);
- if (res < 0)
- return res;
+ err = snd_hctl_elem_add(hctl, elem);
+ if (err < 0)
+ return err;
}
- if (event->data.elem.mask & (SNDRV_CTL_EVENT_MASK_VALUE |
- SNDRV_CTL_EVENT_MASK_INFO)) {
+ if (event->data.elem.mask & (SND_CTL_EVENT_MASK_VALUE |
+ SND_CTL_EVENT_MASK_INFO)) {
elem = snd_hctl_find_elem(hctl, &event->data.elem.id);
if (!elem)
return -ENOENT;
- res = snd_hctl_elem_throw_event(elem, event->data.elem.mask &
- (SNDRV_CTL_EVENT_MASK_VALUE |
- SNDRV_CTL_EVENT_MASK_INFO));
- if (res < 0)
- return res;
+ err = snd_hctl_elem_throw_event(elem, event->data.elem.mask &
+ (SND_CTL_EVENT_MASK_VALUE |
+ SND_CTL_EVENT_MASK_INFO));
+ if (err < 0)
+ return err;
}
return 0;
}
@@ -253,9 +247,10 @@ int snd_hctl_handle_events(snd_hctl_t *hctl)
int res;
unsigned int count = 0;
- while ((res = snd_ctl_read(hctl->ctl, &event)) != 0 &&
- res != -EAGAIN) {
- if (res < 0)
+ while ((res = snd_ctl_read(hctl->ctl, &event)) != 0) {
+ if (res == -EAGAIN)
+ break;
+ else if (res < 0)
return res;
res = snd_hctl_handle_event(hctl, &event);
if (res < 0)
@@ -264,4 +259,3 @@ int snd_hctl_handle_events(snd_hctl_t *hctl)
}
return count;
}
-
diff --git a/src/hwdep.c b/src/hwdep.c
index e85089f..14e76a7 100644
--- a/src/hwdep.c
+++ b/src/hwdep.c
@@ -33,7 +33,7 @@
int snd_hwdep_open(snd_hwdep_t **handlep, const char *name, int mode)
{
int card, device, fd, ver, err;
- char filename[32];
+ char filename[sizeof(SALSA_DEVPATH) + 24];
snd_hwdep_t *hwdep;
*handlep = NULL;
@@ -41,9 +41,9 @@ int snd_hwdep_open(snd_hwdep_t **handlep, const char *name, int mode)
err = _snd_dev_get_device(name, &card, &device, NULL);
if (err < 0)
return err;
- if (card < 0 || card >= 32)
+ if (card < 0 || card >= SALSA_MAX_CARDS)
return -EINVAL;
- if (device < 0 || device >= 32)
+ if (device < 0 || device >= SALSA_MAX_DEVICES)
return -EINVAL;
snprintf(filename, sizeof(filename), "%s/hwC%dD%d",
SALSA_DEVPATH, card, device);
diff --git a/src/hwdep.h b/src/hwdep.h
index 43ab842..9c2e372 100644
--- a/src/hwdep.h
+++ b/src/hwdep.h
@@ -23,6 +23,7 @@
#define __ALSA_HWDEP_H
#include "recipe.h"
+#include "asound.h"
#include "hwdep_func.h"
#include "hwdep_macros.h"
diff --git a/src/input.h b/src/input.h
index fc077a9..a31bc26 100644
--- a/src/input.h
+++ b/src/input.h
@@ -27,9 +27,7 @@
typedef FILE snd_input_t;
-/** Input type. */
typedef enum _snd_input_type {
- /** Input from a stdio stream. */
SND_INPUT_STDIO,
} snd_input_type_t;
diff --git a/src/input_abi.c b/src/input_abi.c
index b0a49f6..d55fb50 100644
--- a/src/input_abi.c
+++ b/src/input_abi.c
@@ -10,12 +10,6 @@
typedef FILE snd_input_t;
-/** Input type. */
-typedef enum _snd_input_type {
- /** Input from a stdio stream. */
- SND_INPUT_STDIO,
-} snd_input_type_t;
-
int snd_input_stdio_open(snd_input_t **inputp, const char *file, const char *mode)
{
if ((*inputp = fopen(file, mode)) == NULL)
diff --git a/src/local.h b/src/local.h
index 1e09a9b..a038147 100644
--- a/src/local.h
+++ b/src/local.h
@@ -1,6 +1,9 @@
#ifndef __LOCAL_H_INC
#define __LOCAL_H_INC
+#define SALSA_MAX_CARDS 32
+#define SALSA_MAX_DEVICES 32
+
int _snd_dev_get_device(const char *name, int *cardp, int *devp, int *subdevp);
int _snd_ctl_hw_open(snd_ctl_t **ctlp, int card);
diff --git a/src/mixer.c b/src/mixer.c
index 5ef1549..d088cc8 100644
--- a/src/mixer.c
+++ b/src/mixer.c
@@ -726,8 +726,8 @@ static int update_simple_element(snd_hctl_elem_t *hp, snd_mixer_elem_t *elem)
}
/*
+ * registration - supports only ABSTRACT_NONE type
*/
-
int snd_mixer_selem_register(snd_mixer_t *mixer,
struct snd_mixer_selem_regopt *options,
snd_mixer_class_t **classp)
diff --git a/src/pcm.c b/src/pcm.c
index a6f9cfa..acdf935 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -46,7 +46,7 @@ static int open_with_subdev(const char *filename, int fmode,
{
snd_pcm_info_t info;
snd_ctl_t *ctl;
- int err, counts, fd;
+ int err, fd;
err = _snd_ctl_hw_open(&ctl, card);
if (err < 0)
@@ -56,18 +56,17 @@ static int open_with_subdev(const char *filename, int fmode,
if (err < 0)
return err;
- for (counts = 0; counts < 3; counts++) {
- fd = open(filename, fmode);
- if (fd < 0)
- return -errno;
- memzero_valgrind(&info, sizeof(info));
- if (ioctl(fd, SNDRV_PCM_IOCTL_INFO, &info) >= 0 &&
- info.subdevice == subdev) {
- snd_ctl_close(ctl);
- return fd;
- }
- close(fd);
+ fd = open(filename, fmode);
+ if (fd < 0)
+ return -errno;
+
+ memzero_valgrind(&info, sizeof(info));
+ if (ioctl(fd, SNDRV_PCM_IOCTL_INFO, &info) >= 0 &&
+ info.subdevice == subdev) {
+ snd_ctl_close(ctl);
+ return fd;
}
+ close(fd);
snd_ctl_close(ctl);
return -EBUSY;
}
@@ -75,7 +74,7 @@ static int open_with_subdev(const char *filename, int fmode,
int snd_pcm_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_stream_t stream, int mode)
{
- char filename[32];
+ char filename[sizeof(SALSA_DEVPATH) + 24];
int card, dev, subdev;
int fd, err, fmode, ver;
snd_pcm_t *pcm = NULL;
@@ -198,7 +197,7 @@ static inline int snd_pcm_check_error(snd_pcm_t *pcm, int err)
snd_pcm_sframes_t snd_pcm_writei(snd_pcm_t *pcm, const void *buffer,
snd_pcm_uframes_t size)
{
- struct sndrv_xferi xferi;
+ struct snd_xferi xferi;
#ifdef DELIGHT_VALGRIND
xferi.result = 0;
@@ -214,7 +213,7 @@ snd_pcm_sframes_t snd_pcm_writei(snd_pcm_t *pcm, const void *buffer,
snd_pcm_sframes_t snd_pcm_writen(snd_pcm_t *pcm, void **bufs,
snd_pcm_uframes_t size)
{
- struct sndrv_xfern xfern;
+ struct snd_xfern xfern;
#ifdef DELIGHT_VALGRIND
xfern.result = 0;
@@ -230,7 +229,7 @@ snd_pcm_sframes_t snd_pcm_writen(snd_pcm_t *pcm, void **bufs,
snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer,
snd_pcm_uframes_t size)
{
- struct sndrv_xferi xferi;
+ struct snd_xferi xferi;
#ifdef DELIGHT_VALGRIND
xferi.result = 0;
@@ -246,7 +245,7 @@ snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer,
snd_pcm_sframes_t snd_pcm_readn(snd_pcm_t *pcm, void **bufs,
snd_pcm_uframes_t size)
{
- struct sndrv_xfern xfern;
+ struct snd_xfern xfern;
#ifdef DELIGHT_VALGRIND
xfern.result = 0;
@@ -869,7 +868,7 @@ static int snd_pcm_hw_mmap_status(snd_pcm_t *pcm)
return 0;
pcm->mmap_status =
- mmap(NULL, page_align(sizeof(struct sndrv_pcm_mmap_status)),
+ mmap(NULL, page_align(sizeof(struct snd_pcm_mmap_status)),
PROT_READ, MAP_FILE|MAP_SHARED,
pcm->fd, SNDRV_PCM_MMAP_OFFSET_STATUS);
if (pcm->mmap_status == MAP_FAILED)
@@ -877,14 +876,14 @@ static int snd_pcm_hw_mmap_status(snd_pcm_t *pcm)
if (!pcm->mmap_status)
goto no_mmap;
pcm->mmap_control =
- mmap(NULL, page_align(sizeof(struct sndrv_pcm_mmap_control)),
+ mmap(NULL, page_align(sizeof(struct snd_pcm_mmap_control)),
PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED,
pcm->fd, SNDRV_PCM_MMAP_OFFSET_CONTROL);
if (pcm->mmap_control == MAP_FAILED)
pcm->mmap_control = NULL;
if (!pcm->mmap_control) {
munmap(pcm->mmap_status,
- page_align(sizeof(struct sndrv_pcm_mmap_status)));
+ page_align(sizeof(struct snd_pcm_mmap_status)));
pcm->mmap_status = NULL;
goto no_mmap;
}
@@ -909,9 +908,9 @@ static void snd_pcm_hw_munmap_status(snd_pcm_t *pcm)
pcm->sync_ptr = NULL;
} else {
munmap(pcm->mmap_status,
- page_align(sizeof(struct sndrv_pcm_mmap_status)));
+ page_align(sizeof(struct snd_pcm_mmap_status)));
munmap(pcm->mmap_control,
- page_align(sizeof(struct sndrv_pcm_mmap_control)));
+ page_align(sizeof(struct snd_pcm_mmap_control)));
}
pcm->mmap_status = NULL;
pcm->mmap_control = NULL;
@@ -958,7 +957,7 @@ snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm)
_snd_pcm_sync_ptr(pcm, 0);
avail = snd_pcm_mmap_avail(pcm);
switch (snd_pcm_state(pcm)) {
- case SNDRV_PCM_STATE_RUNNING:
+ case SND_PCM_STATE_RUNNING:
if (avail >= pcm->sw_params.stop_threshold) {
if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_XRUN) < 0)
return -errno;
@@ -968,7 +967,7 @@ snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm)
return -EPIPE;
}
break;
- case SNDRV_PCM_STATE_XRUN:
+ case SND_PCM_STATE_XRUN:
return -EPIPE;
default:
break;
@@ -1087,26 +1086,19 @@ int snd_pcm_wait(snd_pcm_t *pcm, int timeout)
int snd_pcm_recover(snd_pcm_t *pcm, int err, int silent)
{
- if (err > 0)
- err = -err;
- if (err == -EINTR) /* nothing to do, continue */
- return 0;
- if (err == -EPIPE) {
- err = snd_pcm_prepare(pcm);
- if (err < 0)
- return err;
- return 0;
- }
- if (err == -ESTRPIPE) {
- while ((err = snd_pcm_resume(pcm)) == -EAGAIN)
- /* wait until suspend flag is released */
- poll(NULL, 0, 1000);
- if (err < 0) {
- err = snd_pcm_prepare(pcm);
- if (err < 0)
- return err;
- }
- return 0;
+ if (err > 0)
+ err = -err;
+ switch (err) {
+ case -EINTR:
+ return 0;
+ case -EPIPE:
+ return snd_pcm_prepare(pcm);
+ case -ESTRPIPE:
+ while ((err = snd_pcm_resume(pcm)) == -EAGAIN)
+ sleep(1);
+ if (err < 0)
+ return snd_pcm_prepare(pcm);
+ return 0;
}
return err;
}
diff --git a/src/pcm_func.h b/src/pcm_func.h
index 3d63568..0191eb6 100644
--- a/src/pcm_func.h
+++ b/src/pcm_func.h
@@ -5,6 +5,7 @@
*/
#include "global.h"
+#include "asound.h"
#include "output.h"
#include "pcm_types.h"
diff --git a/src/pcm_macros.h b/src/pcm_macros.h
index 0ae3a98..0d58740 100644
--- a/src/pcm_macros.h
+++ b/src/pcm_macros.h
@@ -14,7 +14,6 @@
#include <sys/ioctl.h>
#include <sys/poll.h>
-typedef struct sndrv_interval snd_interval_t;
typedef struct {
struct sndrv_pcm_channel_info info;
void *addr;
@@ -60,9 +59,9 @@ struct _snd_pcm {
unsigned int frame_bits;
snd_pcm_uframes_t min_align;
- struct sndrv_pcm_mmap_status *mmap_status;
- struct sndrv_pcm_mmap_control *mmap_control;
- struct sndrv_pcm_sync_ptr *sync_ptr;
+ struct snd_pcm_mmap_status *mmap_status;
+ struct snd_pcm_mmap_control *mmap_control;
+ struct snd_pcm_sync_ptr *sync_ptr;
snd_pcm_channel_info_t *mmap_channels;
snd_pcm_channel_area_t *running_areas;
diff --git a/src/pcm_misc.c b/src/pcm_misc.c
index 47a0736..f28ac8b 100644
--- a/src/pcm_misc.c
+++ b/src/pcm_misc.c
@@ -283,7 +283,7 @@ u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format)
int i, p, w;
u_int64_t silence;
- if ((int)format < 0 || (int)format > SNDRV_PCM_FORMAT_LAST)
+ if ((int)format < 0 || (int)format > SND_PCM_FORMAT_LAST)
return 0;
fmt = &pcm_formats[format];
if (!fmt->phys)
diff --git a/src/rawmidi.c b/src/rawmidi.c
index 0e54b58..45b3de2 100644
--- a/src/rawmidi.c
+++ b/src/rawmidi.c
@@ -36,7 +36,7 @@ static int open_with_subdev(const char *filename, int fmode,
{
snd_rawmidi_info_t info;
snd_ctl_t *ctl;
- int err, counts, fd;
+ int err, fd;
err = _snd_ctl_hw_open(&ctl, card);
if (err < 0)
@@ -46,20 +46,18 @@ static int open_with_subdev(const char *filename, int fmode,
if (err < 0)
return err;
- for (counts = 0; counts < 3; counts++) {
- fd = open(filename, fmode);
- if (fd < 0)
- return -errno;
- memzero_valgrind(&info, sizeof(info));
- info.stream = ((fmode & O_ACCMODE) != O_RDONLY) ?
- SNDRV_RAWMIDI_STREAM_OUTPUT : SNDRV_RAWMIDI_STREAM_INPUT;
- if (ioctl(fd, SNDRV_RAWMIDI_IOCTL_INFO, &info) >= 0 &&
- info.subdevice == subdev) {
- snd_ctl_close(ctl);
- return fd;
- }
- close(fd);
+ fd = open(filename, fmode);
+ if (fd < 0)
+ return -errno;
+ memzero_valgrind(&info, sizeof(info));
+ info.stream = ((fmode & O_ACCMODE) != O_RDONLY) ?
+ SND_RAWMIDI_STREAM_OUTPUT : SND_RAWMIDI_STREAM_INPUT;
+ if (ioctl(fd, SNDRV_RAWMIDI_IOCTL_INFO, &info) >= 0 &&
+ info.subdevice == subdev) {
+ snd_ctl_close(ctl);
+ return fd;
}
+ close(fd);
snd_ctl_close(ctl);
return -EBUSY;
}
@@ -93,7 +91,7 @@ int snd_rawmidi_open(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
{
int fd, err, fmode, ver;
int card, dev, subdev;
- char filename[32];
+ char filename[sizeof(SALSA_DEVPATH) + 24];
snd_rawmidi_hw_t *hw;
if (in_rmidi)
diff --git a/src/timer.c b/src/timer.c
index e2cb6cc..73b9868 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -34,7 +34,7 @@ int snd_timer_open(snd_timer_t **handle, const char *name, int mode)
{
int fd, ver, tmode, err;
snd_timer_t *tmr;
- struct sndrv_timer_select sel;
+ snd_timer_select_t sel;
int dev_class = SND_TIMER_CLASS_GLOBAL,
dev_sclass = SND_TIMER_SCLASS_NONE,
card = 0, device = 0, subdevice = 0;
diff --git a/src/timer.h b/src/timer.h
index 2568b8d..9c1342f 100644
--- a/src/timer.h
+++ b/src/timer.h
@@ -33,4 +33,4 @@
#define snd_timer_params_alloca(ptr) __snd_alloca(ptr, snd_timer_params)
#define snd_timer_status_alloca(ptr) __snd_alloca(ptr, snd_timer_status)
-#endif /** __ALSA_TIMER_H */
+#endif /* __ALSA_TIMER_H */
diff --git a/src/version.h.in b/src/version.h.in
index b1dede0..3248481 100644
--- a/src/version.h.in
+++ b/src/version.h.in
@@ -5,11 +5,11 @@
#define SND_LIB_MINOR @SND_LIB_MINOR@
#define SND_LIB_SUBMINOR @SND_LIB_SUBMINOR@
#define SND_LIB_EXTRAVER @SND_LIB_EXTRAVER@
-/** library version */
+/* library version */
#define SND_LIB_VERSION ((SND_LIB_MAJOR<<16)|\
(SND_LIB_MINOR<<8)|\
SND_LIB_SUBMINOR)
-/** library version (string) */
+/* library version (string) */
#define SND_LIB_VERSION_STR "@SND_LIB_VERSION@"
__SALSA_EXPORT_FUNC