Commit e8a91ae1 authored by Takashi Iwai's avatar Takashi Iwai

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=1048934Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 782fbec7
......@@ -166,7 +166,7 @@ static void snd_ice1712_stdsp24_midi2(struct snd_ice1712 *ice, int activate)
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;
int box, chn;
......@@ -203,7 +203,10 @@ static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
ICE1712_STDSP24_3_INSEL(spec->boxbits, 0);
/* let's go - activate only functions in first box */
spec->config = 0;
if (staudio)
spec->config = ICE1712_STDSP24_MUTE;
else
spec->config = 0;
/* ICE1712_STDSP24_MUTE |
ICE1712_STDSP24_INSEL |
ICE1712_STDSP24_DAREAR; */
......@@ -226,9 +229,16 @@ static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
ICE1712_STDSP24_BOX_CHN4 |
ICE1712_STDSP24_BOX_MIDI1 |
ICE1712_STDSP24_BOX_MIDI2;
spec->boxconfig[1] =
spec->boxconfig[2] =
spec->boxconfig[3] = 0;
if (staudio) {
spec->boxconfig[1] =
spec->boxconfig[2] =
spec->boxconfig[3] = spec->boxconfig[0];
} else {
spec->boxconfig[1] =
spec->boxconfig[2] =
spec->boxconfig[3] = 0;
}
snd_ice1712_stdsp24_darear(ice,
(spec->config & ICE1712_STDSP24_DAREAR) ? 1 : 0);
snd_ice1712_stdsp24_mute(ice,
......@@ -248,6 +258,16 @@ static int snd_ice1712_hoontech_init(struct snd_ice1712 *ice)
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
*/
......@@ -351,5 +371,14 @@ struct snd_ice1712_card_info snd_ice1712_hoontech_cards[] = {
.model = "ez8",
.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 */
};
......@@ -34,6 +34,7 @@
#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_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[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment