aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-alsa.c
diff options
context:
space:
mode:
authorRicardo Cerqueira <v4l@cerqueira.org>2005-11-09 00:37:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:16 -0500
commita866623cdc94a3a800167568db24bc55b6860ef0 (patch)
treefcde723cc25e104823c9e13fc01000e60d85e6d7 /drivers/media/video/saa7134/saa7134-alsa.c
parentb2c15ea9b23c216bb49303c076bbdcef7e7ba278 (diff)
[PATCH] v4l: 727: fixed a bug that caused some saa7133 code to run on saa7134 boards
- Fixed a bug that caused some saa7133 code to run on saa7134 boards Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-alsa.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index cf4ee6d6ef64..465beac941d7 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -45,9 +45,6 @@ MODULE_PARM_DESC(alsa_debug,"enable debug messages [alsa]");
45 * Configuration macros 45 * Configuration macros
46 */ 46 */
47 47
48#define MAX_PCM_DEVICES 1
49#define MAX_PCM_SUBSTREAMS 1
50
51/* defaults */ 48/* defaults */
52#define MAX_BUFFER_SIZE (256*1024) 49#define MAX_BUFFER_SIZE (256*1024)
53#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 50#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
@@ -804,6 +801,7 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
804 break; 801 break;
805 } 802 }
806 803
804 break;
807 case PCI_DEVICE_ID_PHILIPS_SAA7133: 805 case PCI_DEVICE_ID_PHILIPS_SAA7133:
808 case PCI_DEVICE_ID_PHILIPS_SAA7135: 806 case PCI_DEVICE_ID_PHILIPS_SAA7135:
809 xbarin = 0x03; // adc 807 xbarin = 0x03; // adc
@@ -833,6 +831,7 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
833 saa_dsp_writel(dev, SAA7133_DIGITAL_INPUT_XBAR1, 0); 831 saa_dsp_writel(dev, SAA7133_DIGITAL_INPUT_XBAR1, 0);
834 saa_writel(SAA7133_ANALOG_IO_SELECT, 0); 832 saa_writel(SAA7133_ANALOG_IO_SELECT, 0);
835 } 833 }
834 break;
836 } 835 }
837 } 836 }
838 837
@@ -891,7 +890,7 @@ static int snd_saa7134_dev_free(snd_device_t *device)
891 * 890 *
892 */ 891 */
893 892
894int alsa_card_saa7134_create(struct saa7134_dev *saadev) 893int alsa_card_saa7134_create(struct saa7134_dev *saadev, unsigned int devicenum)
895{ 894{
896 static int dev; 895 static int dev;
897 snd_card_t *card; 896 snd_card_t *card;
@@ -906,8 +905,11 @@ int alsa_card_saa7134_create(struct saa7134_dev *saadev)
906 if (!enable[dev]) 905 if (!enable[dev])
907 return -ENODEV; 906 return -ENODEV;
908 907
909 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 908 if (devicenum) {
910 0); 909 card = snd_card_new(devicenum, id[dev], THIS_MODULE, 0);
910 } else {
911 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
912 }
911 if (card == NULL) 913 if (card == NULL)
912 return -ENOMEM; 914 return -ENOMEM;
913 915
@@ -949,7 +951,7 @@ int alsa_card_saa7134_create(struct saa7134_dev *saadev)
949 951
950 strcpy(card->shortname, "SAA7134"); 952 strcpy(card->shortname, "SAA7134");
951 sprintf(card->longname, "%s at 0x%lx irq %d", 953 sprintf(card->longname, "%s at 0x%lx irq %d",
952 card->shortname, chip->iobase, chip->irq); 954 chip->saadev->name, chip->iobase, chip->irq);
953 955
954 if ((err = snd_card_register(card)) == 0) { 956 if ((err = snd_card_register(card)) == 0) {
955 snd_saa7134_cards[dev] = card; 957 snd_saa7134_cards[dev] = card;