diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2014-09-29 05:03:25 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-09-30 04:36:36 -0400 |
commit | a45c4d5142595a9b7907499f6d67f702bc20aeb4 (patch) | |
tree | 422e658bc530323ccd059f1709973ee80a504ae2 | |
parent | e5347f9ab7cdafc2dbc0d4f7f30204293be71d8e (diff) |
ALSA: ctxfi: ctatc: added reference to snd_card
added reference of the card in the convert_format function
so that we can know which card has called the function.
this reference of the snd_card will actually be used in a later patch
to convert the pr_* macro to dev_*.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/ctxfi/ctatc.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 5cc8c3860b11..d62aa9e2adcd 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
@@ -171,7 +171,8 @@ static unsigned long atc_get_ptp_phys(struct ct_atc *atc, int index) | |||
171 | return atc->vm->get_ptp_phys(atc->vm, index); | 171 | return atc->vm->get_ptp_phys(atc->vm, index); |
172 | } | 172 | } |
173 | 173 | ||
174 | static unsigned int convert_format(snd_pcm_format_t snd_format) | 174 | static unsigned int convert_format(snd_pcm_format_t snd_format, |
175 | struct snd_card *card) | ||
175 | { | 176 | { |
176 | switch (snd_format) { | 177 | switch (snd_format) { |
177 | case SNDRV_PCM_FORMAT_U8: | 178 | case SNDRV_PCM_FORMAT_U8: |
@@ -268,7 +269,8 @@ static int atc_pcm_playback_prepare(struct ct_atc *atc, struct ct_atc_pcm *apcm) | |||
268 | src = apcm->src; | 269 | src = apcm->src; |
269 | src->ops->set_pitch(src, pitch); | 270 | src->ops->set_pitch(src, pitch); |
270 | src->ops->set_rom(src, select_rom(pitch)); | 271 | src->ops->set_rom(src, select_rom(pitch)); |
271 | src->ops->set_sf(src, convert_format(apcm->substream->runtime->format)); | 272 | src->ops->set_sf(src, convert_format(apcm->substream->runtime->format, |
273 | atc->card)); | ||
272 | src->ops->set_pm(src, (src->ops->next_interleave(src) != NULL)); | 274 | src->ops->set_pm(src, (src->ops->next_interleave(src) != NULL)); |
273 | 275 | ||
274 | /* Get AMIXER resource */ | 276 | /* Get AMIXER resource */ |
@@ -738,7 +740,8 @@ static int atc_pcm_capture_start(struct ct_atc *atc, struct ct_atc_pcm *apcm) | |||
738 | 740 | ||
739 | /* Set up recording SRC */ | 741 | /* Set up recording SRC */ |
740 | src = apcm->src; | 742 | src = apcm->src; |
741 | src->ops->set_sf(src, convert_format(apcm->substream->runtime->format)); | 743 | src->ops->set_sf(src, convert_format(apcm->substream->runtime->format, |
744 | atc->card)); | ||
742 | src->ops->set_sa(src, apcm->vm_block->addr); | 745 | src->ops->set_sa(src, apcm->vm_block->addr); |
743 | src->ops->set_la(src, apcm->vm_block->addr + apcm->vm_block->size); | 746 | src->ops->set_la(src, apcm->vm_block->addr + apcm->vm_block->size); |
744 | src->ops->set_ca(src, apcm->vm_block->addr); | 747 | src->ops->set_ca(src, apcm->vm_block->addr); |
@@ -807,7 +810,8 @@ static int spdif_passthru_playback_get_resources(struct ct_atc *atc, | |||
807 | src = apcm->src; | 810 | src = apcm->src; |
808 | src->ops->set_pitch(src, pitch); | 811 | src->ops->set_pitch(src, pitch); |
809 | src->ops->set_rom(src, select_rom(pitch)); | 812 | src->ops->set_rom(src, select_rom(pitch)); |
810 | src->ops->set_sf(src, convert_format(apcm->substream->runtime->format)); | 813 | src->ops->set_sf(src, convert_format(apcm->substream->runtime->format, |
814 | atc->card)); | ||
811 | src->ops->set_pm(src, (src->ops->next_interleave(src) != NULL)); | 815 | src->ops->set_pm(src, (src->ops->next_interleave(src) != NULL)); |
812 | src->ops->set_bp(src, 1); | 816 | src->ops->set_bp(src, 1); |
813 | 817 | ||