summaryrefslogtreecommitdiffstats
path: root/driver/aim-sound/sound.c
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2017-01-23 11:40:19 +0100
committerChristian Gromm <christian.gromm@microchip.com>2017-01-23 11:40:19 +0100
commitf19c18408b515c5e33f96893cbe213d9ab30b904 (patch)
tree59a836c6c4dd36377fce657f4740264d9d7b95fb /driver/aim-sound/sound.c
parentf3ef1a2aa46088c165d1f3b1844f747d395a4799 (diff)
update driver packagedab_3.99.1dab/3.99.13.99.1
This patch updates the driver package to v1.4.0-stable. Change-Id: I8cb5f5287c49ea7fc178816d3713099a6e3079a8 Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Diffstat (limited to 'driver/aim-sound/sound.c')
-rw-r--r--driver/aim-sound/sound.c15
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);