diff options
Diffstat (limited to 'sound/pci/ctxfi/ctatc.c')
-rw-r--r-- | sound/pci/ctxfi/ctatc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 799eb98e7794..e54006ef83cf 100644 --- 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) | |||
445 | u32 size, max_cisz; | 445 | u32 size, max_cisz; |
446 | int position; | 446 | int position; |
447 | 447 | ||
448 | if (!src) | ||
449 | return 0; | ||
448 | position = src->ops->get_ca(src); | 450 | position = src->ops->get_ca(src); |
449 | 451 | ||
450 | size = apcm->vm_block->size; | 452 | size = apcm->vm_block->size; |
@@ -782,6 +784,8 @@ atc_pcm_capture_position(struct ct_atc *atc, struct ct_atc_pcm *apcm) | |||
782 | { | 784 | { |
783 | struct src *src = apcm->src; | 785 | struct src *src = apcm->src; |
784 | 786 | ||
787 | if (!src) | ||
788 | return 0; | ||
785 | return src->ops->get_ca(src) - apcm->vm_block->addr; | 789 | return src->ops->get_ca(src) - apcm->vm_block->addr; |
786 | } | 790 | } |
787 | 791 | ||