diff options
author | Ricardo Cerqueira <devnull@localhost> | 2005-11-08 00:33:20 +0000 |
---|---|---|
committer | Ricardo Cerqueira <devnull@localhost> | 2005-11-08 00:33:20 +0000 |
commit | 57f9899dd7d30b5bba34ffbabd5de076bd439904 (patch) | |
tree | abd44182646716743a9ce6fcfaee2039a11d75b1 /linux/drivers/media/video/saa7134/saa7134-alsa.c | |
parent | 9b819e50aaaa64e660e33eaf03b15de888625af3 (diff) | |
download | mediapointer-dvb-s2-57f9899dd7d30b5bba34ffbabd5de076bd439904.tar.gz mediapointer-dvb-s2-57f9899dd7d30b5bba34ffbabd5de076bd439904.tar.bz2 |
- Fix multiple board support in saa7134-alsa
- Minor comment updates
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-alsa.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 4a968dcaa..fff4aec63 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -1,7 +1,7 @@ /* * SAA713x ALSA support for V4L * - * $Id: saa7134-alsa.c,v 1.15 2005/11/07 23:06:28 rmcc Exp $ + * $Id: saa7134-alsa.c,v 1.16 2005/11/08 00:33:20 rmcc Exp $ * * Caveats: * - Volume doesn't work (it's always at max) @@ -60,6 +60,8 @@ static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0}; module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); +int position = 0; + #define dprintk(fmt, arg...) if (debug) \ printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg) @@ -110,13 +112,11 @@ static snd_card_t *snd_saa7134_cards[SNDRV_CARDS]; * * Called when the capture device is released or the buffer overflows * - * - Copied verbatim from saa7134-oss's dsp_dma_stop. Can be dropped - * if we just share dsp_dma_stop and use it here + * - Copied verbatim from saa7134-oss's dsp_dma_stop. * */ static void saa7134_dma_stop(struct saa7134_dev *dev) - { dev->dmasound.dma_blk = -1; dev->dmasound.dma_running = 0; @@ -128,8 +128,7 @@ static void saa7134_dma_stop(struct saa7134_dev *dev) * * Called when preparing the capture device for use * - * - Copied verbatim from saa7134-oss's dsp_dma_start. Can be dropped - * if we just share dsp_dma_start and use it here + * - Copied verbatim from saa7134-oss's dsp_dma_start. * */ @@ -286,8 +285,8 @@ static int snd_card_saa7134_capture_trigger(snd_pcm_substream_t * substream, * Must be called during the preparation stage, before memory is * allocated * - * - Copied verbatim from saa7134-oss. Can be dropped - * if we just share dsp_buffer_conf from OSS. + * - Copied verbatim from saa7134-oss. + * */ static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks) @@ -318,8 +317,8 @@ static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks) * ALSA, but I was unable to use ALSA's own DMA, and had to force the * usage of V4L's * - * - Copied verbatim from saa7134-oss. Can be dropped - * if we just share dsp_buffer_init from OSS. + * - Copied verbatim from saa7134-oss. + * */ static int dsp_buffer_init(struct saa7134_dev *dev) @@ -928,14 +927,13 @@ static int snd_saa7134_dev_free(snd_device_t *device) /* * ALSA initialization * - * Called by saa7134-core, it creates the basic structures and registers - * the ALSA devices + * Called by the init routine, once for each saa7134 device present, + * it creates the basic structures and registers the ALSA devices * */ -int alsa_card_saa7134_create (struct saa7134_dev *saadev) +int alsa_card_saa7134_create(struct saa7134_dev *saadev, int dev) { - static int dev; snd_card_t *card; snd_card_saa7134_t *chip; @@ -1030,7 +1028,8 @@ static int saa7134_alsa_init(void) list_for_each(list,&saa7134_devlist) { saadev = list_entry(list, struct saa7134_dev, devlist); - alsa_card_saa7134_create(saadev); + alsa_card_saa7134_create(saadev,position); + position++; } if (saadev == NULL) |