Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16dab54b authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[ALSA] Add snd_card_set_generic_dev() call



ARM,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,MIPS
MIPS AU1x00 driver,PPC,PPC PowerMac driver,SPARC,SPARC AMD7930 driver
SPARC cs4231 driver,SPARC DBRI driver
- Added snd_card_set_generic_dev() call.
- Added SND_GENERIC_DRIVER to Kconfig.
- Clean up the error path in probe if necessary.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ecbcfe36
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ config SND_SA11XX_UDA1341
	tristate "SA11xx UDA1341TS driver (iPaq H3600)"
	depends on ARCH_SA1100 && SND && L3
	select SND_PCM
	select SND_GENERIC_DRIVER
	help
	  Say Y here if you have a Compaq iPaq H3x00 handheld computer
	  and want to use its Philips UDA 1341 audio chip.
+4 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
 *                              merged HAL layer (patches from Brian)
 */

/* $Id: sa11xx-uda1341.c,v 1.21 2005/01/28 19:34:04 tiwai Exp $ */
/* $Id: sa11xx-uda1341.c,v 1.22 2005/09/05 16:17:58 tiwai Exp $ */

/***************************************************************************************************
*
@@ -946,6 +946,9 @@ static int __init sa11xx_uda1341_init(void)
	strcpy(card->shortname, "H3600 UDA1341TS");
	sprintf(card->longname, "Compaq iPAQ H3600 with Philips UDA1341TS");
        
	if ((err = snd_card_set_generic_dev(card)) < 0)
		goto nodev;

	if ((err = snd_card_register(card)) == 0) {
		printk( KERN_INFO "iPAQ audio support initialized\n" );
		return 0;
+5 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ config SND_DUMMY
	tristate "Dummy (/dev/null) soundcard"
	depends on SND
	select SND_PCM
	select SND_GENERIC_DRIVER
	help
	  Say Y here to include the dummy driver.  This driver does
	  nothing, but emulates various mixer controls and PCM devices.
@@ -44,6 +45,7 @@ config SND_VIRMIDI
	depends on SND_SEQUENCER
	select SND_TIMER
	select SND_RAWMIDI
	select SND_GENERIC_DRIVER
	help
	  Say Y here to include the virtual MIDI driver.  This driver
	  allows to connect applications using raw MIDI devices to
@@ -59,6 +61,7 @@ config SND_MTPAV
	depends on SND
	select SND_TIMER
	select SND_RAWMIDI
	select SND_GENERIC_DRIVER
	help
	  To use a MOTU MidiTimePiece AV multiport MIDI adapter
	  connected to the parallel port, say Y here and make sure that
@@ -72,6 +75,7 @@ config SND_SERIAL_U16550
	depends on SND
	select SND_TIMER
	select SND_RAWMIDI
	select SND_GENERIC_DRIVER
	help
	  To include support for MIDI serial port interfaces, say Y here
	  and read <file:Documentation/sound/alsa/serial-u16550.txt>.
@@ -88,6 +92,7 @@ config SND_MPU401
	tristate "Generic MPU-401 UART driver"
	depends on SND
	select SND_MPU401_UART
	select SND_GENERIC_DRIVER
	help
	  Say Y here to include support for MIDI ports compatible with
	  the Roland MPU-401 interface in UART mode.
+4 −0
Original line number Diff line number Diff line
@@ -600,6 +600,10 @@ static int __init snd_card_dummy_probe(int dev)
	strcpy(card->driver, "Dummy");
	strcpy(card->shortname, "Dummy");
	sprintf(card->longname, "Dummy %i", dev + 1);

	if ((err = snd_card_set_generic_dev(card)) < 0)
		goto __nodev;

	if ((err = snd_card_register(card)) == 0) {
		snd_dummy_cards[dev] = card;
		return 0;
+16 −10
Original line number Diff line number Diff line
@@ -77,20 +77,26 @@ static int snd_mpu401_create(int dev, snd_card_t **rcard)
		strcat(card->longname, "polled");
	}

	if (snd_mpu401_uart_new(card, 0,
	if ((err = snd_mpu401_uart_new(card, 0,
				       MPU401_HW_MPU401,
				       port[dev], 0,
				irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) {
				       irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL)) < 0) {
		printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]);
		snd_card_free(card);
		return -ENODEV;
	}
	if ((err = snd_card_register(card)) < 0) {
		snd_card_free(card);
		return err;
		goto _err;
	}

	if ((err = snd_card_set_generic_dev(card)) < 0)
		goto _err;

	if ((err = snd_card_register(card)) < 0)
		goto _err;

	*rcard = card;
	return 0;

 _err:
	snd_card_free(card);
	return err;
}

static int __devinit snd_mpu401_probe(int dev)
Loading