diff options
Diffstat (limited to 'driver/aim-sound')
-rw-r--r-- | driver/aim-sound/sound.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/driver/aim-sound/sound.c b/driver/aim-sound/sound.c index d4e87d0..e4198e5 100644 --- a/driver/aim-sound/sound.c +++ b/driver/aim-sound/sound.c @@ -234,7 +234,6 @@ static int playback_thread(void *data) while (!kthread_should_stop()) { struct mbo *mbo = NULL; bool period_elapsed = false; - int ret; wait_event_interruptible( channel->playback_waitq, @@ -250,10 +249,7 @@ static int playback_thread(void *data) else memset(mbo->virt_address, 0, mbo->buffer_length); - ret = most_submit_mbo(mbo); - if (ret) - channel->is_stream_running = false; - + most_submit_mbo(mbo); if (period_elapsed) snd_pcm_period_elapsed(channel->substream); } @@ -457,7 +453,7 @@ static snd_pcm_uframes_t pcm_pointer(struct snd_pcm_substream *substream) /** * Initialization of struct snd_pcm_ops */ -static struct snd_pcm_ops pcm_ops = { +static const struct snd_pcm_ops pcm_ops = { .open = pcm_open, .close = pcm_close, .ioctl = snd_pcm_lib_ioctl, @@ -599,8 +595,8 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, return ret; } - ret = snd_card_create(-1, card_name, THIS_MODULE, sizeof(*channel), - &card); + ret = snd_card_new(NULL, -1, card_name, THIS_MODULE, + sizeof(*channel), &card); if (ret < 0) return ret; @@ -611,7 +607,8 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, channel->id = channel_id; init_waitqueue_head(&channel->playback_waitq); - if (audio_set_hw_params(&channel->pcm_hardware, pcm_format, cfg)) + ret = audio_set_hw_params(&channel->pcm_hardware, pcm_format, cfg); + if (ret) goto err_free_card; snprintf(card->driver, sizeof(card->driver), "%s", DRIVER_NAME); |