projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c399f3b
)
ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
author
Takashi Iwai
<tiwai@suse.de>
Tue, 9 Jun 2009 06:17:14 +0000
(08:17 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 9 Jun 2009 06:17:14 +0000
(08:17 +0200)
The SRC instances may not exist when PCM pointer callback is called at
the state before initialization is finished. Add the NULL check just
to be sure.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ctxfi/ctatc.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/ctxfi/ctatc.c
b/sound/pci/ctxfi/ctatc.c
index 799eb98e77943e606779c70ef4ab124a482c7bb2..e54006ef83cf2c743265ce356f744b5c67e40285 100644
(file)
--- a/
sound/pci/ctxfi/ctatc.c
+++ b/
sound/pci/ctxfi/ctatc.c
@@
-445,6
+445,8
@@
atc_pcm_playback_position(struct ct_atc *atc, struct ct_atc_pcm *apcm)
u32 size, max_cisz;
int position;
+ if (!src)
+ return 0;
position = src->ops->get_ca(src);
size = apcm->vm_block->size;
@@
-782,6
+784,8
@@
atc_pcm_capture_position(struct ct_atc *atc, struct ct_atc_pcm *apcm)
{
struct src *src = apcm->src;
+ if (!src)
+ return 0;
return src->ops->get_ca(src) - apcm->vm_block->addr;
}