diff options
author | Nickolay V. Shmyrev <devnull@localhost> | 2005-10-08 09:20:24 +0000 |
---|---|---|
committer | Nickolay V. Shmyrev <devnull@localhost> | 2005-10-08 09:20:24 +0000 |
commit | 276ea322732e226ef84fe7fcb6ec7735fc59d8d5 (patch) | |
tree | efb0b507fe600a851ef619cb23f09555d5a8e6a1 /linux/drivers/media/video/saa7134 | |
parent | 32988709bba3eb2b4460788a276dd88c0d6833e9 (diff) | |
download | mediapointer-dvb-s2-276ea322732e226ef84fe7fcb6ec7735fc59d8d5.tar.gz mediapointer-dvb-s2-276ea322732e226ef84fe7fcb6ec7735fc59d8d5.tar.bz2 |
* saa7134-alsa.c: (snd_saa7134_capsrc_put),
(alsa_card_saa7134_create):
* saa7134-core.c: (saa7134_initdev):
* saa7134.h:
- Fixed a bug that caused some saa7133 code to run on saa7134 boards
- dsp_nr (to force a given audio card number) from OSS now works for
ALSA as well.
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'linux/drivers/media/video/saa7134')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 18 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 4 |
3 files changed, 14 insertions, 12 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 9bb78fc5f..782d11a7e 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -2,7 +2,7 @@ * SAA713x ALSA support for V4L * Ricardo Cerqueira <v4l@cerqueira.org> * - * $Id: saa7134-alsa.c,v 1.4 2005/10/07 05:35:58 nsh Exp $ + * $Id: saa7134-alsa.c,v 1.5 2005/10/08 09:20:24 nsh Exp $ * * Caveats: * - Volume doesn't work (it's always at max) @@ -47,9 +47,6 @@ MODULE_PARM_DESC(alsa_debug,"enable debug messages [alsa]"); * Configuration macros */ -#define MAX_PCM_DEVICES 1 -#define MAX_PCM_SUBSTREAMS 1 - /* defaults */ #define MAX_BUFFER_SIZE (256*1024) #define USE_FORMATS SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_U16_BE @@ -821,6 +818,7 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ break; } + break; case PCI_DEVICE_ID_PHILIPS_SAA7133: case PCI_DEVICE_ID_PHILIPS_SAA7135: xbarin = 0x03; // adc @@ -850,6 +848,7 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ saa_dsp_writel(dev, SAA7133_DIGITAL_INPUT_XBAR1, 0); saa_writel(SAA7133_ANALOG_IO_SELECT, 0); } + break; } } @@ -908,7 +907,7 @@ static int snd_saa7134_dev_free(snd_device_t *device) * */ -int alsa_card_saa7134_create(struct saa7134_dev *saadev) +int alsa_card_saa7134_create(struct saa7134_dev *saadev, unsigned int devicenum) { static int dev; snd_card_t *card; @@ -923,8 +922,11 @@ int alsa_card_saa7134_create(struct saa7134_dev *saadev) if (!enable[dev]) return -ENODEV; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, - 0); + if (devicenum) { + card = snd_card_new(devicenum, id[dev], THIS_MODULE, 0); + } else { + card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); + } if (card == NULL) return -ENOMEM; @@ -966,7 +968,7 @@ int alsa_card_saa7134_create(struct saa7134_dev *saadev) strcpy(card->shortname, "SAA7134"); sprintf(card->longname, "%s at 0x%lx irq %d", - card->shortname, chip->iobase, chip->irq); + chip->saadev->name, chip->iobase, chip->irq); if ((err = snd_card_register(card)) == 0) { snd_saa7134_cards[dev] = card; diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index 2912f2f2f..ee4d489ad 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-core.c,v 1.43 2005/10/06 23:55:33 mkrufky Exp $ + * $Id: saa7134-core.c,v 1.44 2005/10/08 09:20:24 nsh Exp $ * * device driver for philips saa7134 based TV cards * driver core @@ -1086,7 +1086,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, printk(KERN_INFO "%s: registered device mixer%d\n", dev->name,dev->oss.minor_mixer >> 4); } else if (alsa) { - alsa_card_saa7134_create(dev); + alsa_card_saa7134_create(dev,dsp_nr[dev->nr]); printk(KERN_INFO "%s: registered ALSA devices\n", dev->name); } diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 56a7c43ba..9d54dbd45 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -1,5 +1,5 @@ /* - * $Id: saa7134.h,v 1.60 2005/10/06 21:37:02 nsh Exp $ + * $Id: saa7134.h,v 1.61 2005/10/08 09:20:24 nsh Exp $ * * v4l2 device driver for philips saa7134 based TV cards * @@ -660,7 +660,7 @@ int saa7134_input_init1(struct saa7134_dev *dev); void saa7134_input_fini(struct saa7134_dev *dev); void saa7134_input_irq(struct saa7134_dev *dev); -int alsa_card_saa7134_create(struct saa7134_dev *saadev); +int alsa_card_saa7134_create(struct saa7134_dev *saadev, unsigned int devnum); void alsa_card_saa7134_exit(void); void saa7134_irq_alsa_done(struct saa7134_dev *dev, unsigned long status); |