ALSA: pcm: include pcm_local.h and remove some extraneous tabs
We need to include pcm_local.h to clean up some smatch warnings: symbol 'snd_pcm_timer_done' was not declared. Should it be static? symbol 'snd_pcm_timer_init' was not declared. Should it be static? symbol 'snd_pcm_timer_resolution_change' was not declared. Should it be static? Also remove some extraneous tabs on empty lines and replace space intentation with a tab. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>pull/476/head
parent
905e46acd3
commit
7421a1671a
|
|
@ -25,6 +25,8 @@
|
||||||
#include <sound/pcm.h>
|
#include <sound/pcm.h>
|
||||||
#include <sound/timer.h>
|
#include <sound/timer.h>
|
||||||
|
|
||||||
|
#include "pcm_local.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Timer functions
|
* Timer functions
|
||||||
*/
|
*/
|
||||||
|
|
@ -33,8 +35,8 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream)
|
||||||
{
|
{
|
||||||
unsigned long rate, mult, fsize, l, post;
|
unsigned long rate, mult, fsize, l, post;
|
||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
|
|
||||||
mult = 1000000000;
|
mult = 1000000000;
|
||||||
rate = runtime->rate;
|
rate = runtime->rate;
|
||||||
if (snd_BUG_ON(!rate))
|
if (snd_BUG_ON(!rate))
|
||||||
return;
|
return;
|
||||||
|
|
@ -65,7 +67,7 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream)
|
||||||
static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer)
|
static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer)
|
||||||
{
|
{
|
||||||
struct snd_pcm_substream *substream;
|
struct snd_pcm_substream *substream;
|
||||||
|
|
||||||
substream = timer->private_data;
|
substream = timer->private_data;
|
||||||
return substream->runtime ? substream->runtime->timer_resolution : 0;
|
return substream->runtime ? substream->runtime->timer_resolution : 0;
|
||||||
}
|
}
|
||||||
|
|
@ -73,7 +75,7 @@ static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer)
|
||||||
static int snd_pcm_timer_start(struct snd_timer * timer)
|
static int snd_pcm_timer_start(struct snd_timer * timer)
|
||||||
{
|
{
|
||||||
struct snd_pcm_substream *substream;
|
struct snd_pcm_substream *substream;
|
||||||
|
|
||||||
substream = snd_timer_chip(timer);
|
substream = snd_timer_chip(timer);
|
||||||
substream->timer_running = 1;
|
substream->timer_running = 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -82,7 +84,7 @@ static int snd_pcm_timer_start(struct snd_timer * timer)
|
||||||
static int snd_pcm_timer_stop(struct snd_timer * timer)
|
static int snd_pcm_timer_stop(struct snd_timer * timer)
|
||||||
{
|
{
|
||||||
struct snd_pcm_substream *substream;
|
struct snd_pcm_substream *substream;
|
||||||
|
|
||||||
substream = snd_timer_chip(timer);
|
substream = snd_timer_chip(timer);
|
||||||
substream->timer_running = 0;
|
substream->timer_running = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -112,7 +114,7 @@ void snd_pcm_timer_init(struct snd_pcm_substream *substream)
|
||||||
{
|
{
|
||||||
struct snd_timer_id tid;
|
struct snd_timer_id tid;
|
||||||
struct snd_timer *timer;
|
struct snd_timer *timer;
|
||||||
|
|
||||||
tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE;
|
tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE;
|
||||||
tid.dev_class = SNDRV_TIMER_CLASS_PCM;
|
tid.dev_class = SNDRV_TIMER_CLASS_PCM;
|
||||||
tid.card = substream->pcm->card->number;
|
tid.card = substream->pcm->card->number;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue