From f19c18408b515c5e33f96893cbe213d9ab30b904 Mon Sep 17 00:00:00 2001 From: Christian Gromm Date: Mon, 23 Jan 2017 11:40:19 +0100 Subject: update driver package This patch updates the driver package to v1.4.0-stable. Change-Id: I8cb5f5287c49ea7fc178816d3713099a6e3079a8 Signed-off-by: Christian Gromm --- driver/aim-sound/sound.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'driver/aim-sound') 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); -- cgit 1.2.3-korg