mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-04 20:19:47 +08:00 
			
		
		
		
	ALSA: ice1712: Add support for STAudio ADCIII
STAudio ADCIII has the same SSID as Hoontech STDSP24, but requires a slightly different configuration. This patch allows user to choose this model via model=staudio option to set the proper configuration for the board. Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1048934 Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									782fbec745
								
							
						
					
					
						commit
						e8a91ae18b
					
				| @ -166,7 +166,7 @@ static void snd_ice1712_stdsp24_midi2(struct snd_ice1712 *ice, int activate) | |||||||
| 	mutex_unlock(&ice->gpio_mutex); | 	mutex_unlock(&ice->gpio_mutex); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice) | static int hoontech_init(struct snd_ice1712 *ice, bool staudio) | ||||||
| { | { | ||||||
| 	struct hoontech_spec *spec; | 	struct hoontech_spec *spec; | ||||||
| 	int box, chn; | 	int box, chn; | ||||||
| @ -203,6 +203,9 @@ static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice) | |||||||
| 	ICE1712_STDSP24_3_INSEL(spec->boxbits, 0); | 	ICE1712_STDSP24_3_INSEL(spec->boxbits, 0); | ||||||
| 
 | 
 | ||||||
| 	/* let's go - activate only functions in first box */ | 	/* let's go - activate only functions in first box */ | ||||||
|  | 	if (staudio) | ||||||
|  | 		spec->config = ICE1712_STDSP24_MUTE; | ||||||
|  | 	else | ||||||
| 		spec->config = 0; | 		spec->config = 0; | ||||||
| 			    /* ICE1712_STDSP24_MUTE |
 | 			    /* ICE1712_STDSP24_MUTE |
 | ||||||
| 			       ICE1712_STDSP24_INSEL | | 			       ICE1712_STDSP24_INSEL | | ||||||
| @ -226,9 +229,16 @@ static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice) | |||||||
| 				     ICE1712_STDSP24_BOX_CHN4 | | 				     ICE1712_STDSP24_BOX_CHN4 | | ||||||
| 				     ICE1712_STDSP24_BOX_MIDI1 | | 				     ICE1712_STDSP24_BOX_MIDI1 | | ||||||
| 				     ICE1712_STDSP24_BOX_MIDI2; | 				     ICE1712_STDSP24_BOX_MIDI2; | ||||||
|  | 	if (staudio) { | ||||||
|  | 		spec->boxconfig[1] = | ||||||
|  | 		spec->boxconfig[2] = | ||||||
|  | 		spec->boxconfig[3] = spec->boxconfig[0]; | ||||||
|  | 	} else { | ||||||
| 		spec->boxconfig[1] = | 		spec->boxconfig[1] = | ||||||
| 		spec->boxconfig[2] = | 		spec->boxconfig[2] = | ||||||
| 		spec->boxconfig[3] = 0; | 		spec->boxconfig[3] = 0; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	snd_ice1712_stdsp24_darear(ice, | 	snd_ice1712_stdsp24_darear(ice, | ||||||
| 		(spec->config & ICE1712_STDSP24_DAREAR) ? 1 : 0); | 		(spec->config & ICE1712_STDSP24_DAREAR) ? 1 : 0); | ||||||
| 	snd_ice1712_stdsp24_mute(ice, | 	snd_ice1712_stdsp24_mute(ice, | ||||||
| @ -248,6 +258,16 @@ static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice) | |||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice) | ||||||
|  | { | ||||||
|  | 	return hoontech_init(ice, false); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | static int snd_ice1712_staudio_init(struct snd_ice1712 *ice) | ||||||
|  | { | ||||||
|  | 	return hoontech_init(ice, true); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| /*
 | /*
 | ||||||
|  * AK4524 access |  * AK4524 access | ||||||
|  */ |  */ | ||||||
| @ -351,5 +371,14 @@ struct snd_ice1712_card_info snd_ice1712_hoontech_cards[] = { | |||||||
| 		.model = "ez8", | 		.model = "ez8", | ||||||
| 		.chip_init = snd_ice1712_ez8_init, | 		.chip_init = snd_ice1712_ez8_init, | ||||||
| 	}, | 	}, | ||||||
|  | 	{ | ||||||
|  | 		/* STAudio ADCIII has the same SSID as Hoontech StA DSP24,
 | ||||||
|  | 		 * thus identified only via the explicit model option | ||||||
|  | 		 */ | ||||||
|  | 		.subvendor = ICE1712_SUBDEVICE_STAUDIO_ADCIII,	/* a dummy id */ | ||||||
|  | 		.name = "STAudio ADCIII", | ||||||
|  | 		.model = "staudio", | ||||||
|  | 		.chip_init = snd_ice1712_staudio_init, | ||||||
|  | 	}, | ||||||
| 	{ } /* terminator */ | 	{ } /* terminator */ | ||||||
| }; | }; | ||||||
|  | |||||||
| @ -34,6 +34,7 @@ | |||||||
| #define ICE1712_SUBDEVICE_STDSP24_VALUE		0x00010010	/* A dummy id for Hoontech SoundTrack Audio DSP 24 Value */ | #define ICE1712_SUBDEVICE_STDSP24_VALUE		0x00010010	/* A dummy id for Hoontech SoundTrack Audio DSP 24 Value */ | ||||||
| #define ICE1712_SUBDEVICE_STDSP24_MEDIA7_1	0x16141217	/* Hoontech ST Audio DSP24 Media 7.1 */ | #define ICE1712_SUBDEVICE_STDSP24_MEDIA7_1	0x16141217	/* Hoontech ST Audio DSP24 Media 7.1 */ | ||||||
| #define ICE1712_SUBDEVICE_EVENT_EZ8		0x00010001	/* A dummy id for EZ8 */ | #define ICE1712_SUBDEVICE_EVENT_EZ8		0x00010001	/* A dummy id for EZ8 */ | ||||||
|  | #define ICE1712_SUBDEVICE_STAUDIO_ADCIII	0x00010002	/* A dummy id for STAudio ADCIII */ | ||||||
| 
 | 
 | ||||||
| extern struct snd_ice1712_card_info snd_ice1712_hoontech_cards[]; | extern struct snd_ice1712_card_info snd_ice1712_hoontech_cards[]; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Takashi Iwai
						Takashi Iwai