Home Home > GIT Browse > stable-xen
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-08-22 20:13:09 +0200
committerTakashi Iwai <tiwai@suse.de>2017-08-22 20:13:09 +0200
commit99a99ef6c7a293611f38f5aa2100ab07784342f7 (patch)
treedb93b1e05e62a1d23f28d4c62a74fb7d068e5c40
parenta3c362f9ead01492504c051c0db1316a1ff81e51 (diff)
ALSA: ice1712: Add support for STAudio ADCIII (bsc#1048934).
-rw-r--r--patches.drivers/ALSA-ice1712-Add-support-for-STAudio-ADCIII107
-rw-r--r--series.conf1
2 files changed, 108 insertions, 0 deletions
diff --git a/patches.drivers/ALSA-ice1712-Add-support-for-STAudio-ADCIII b/patches.drivers/ALSA-ice1712-Add-support-for-STAudio-ADCIII
new file mode 100644
index 0000000000..4e5cfcf9b7
--- /dev/null
+++ b/patches.drivers/ALSA-ice1712-Add-support-for-STAudio-ADCIII
@@ -0,0 +1,107 @@
+From e8a91ae18bdc0bcedd2a07e42e66ca09dc2105d2 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 21 Aug 2017 16:13:27 +0200
+Subject: [PATCH] ALSA: ice1712: Add support for STAudio ADCIII
+References: bsc#1048934
+Git-commit: e8a91ae18bdc0bcedd2a07e42e66ca09dc2105d2
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
+Patch-mainline: Queued in subsystem maintainer repository
+
+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>
+
+---
+ sound/pci/ice1712/hoontech.c | 39 ++++++++++++++++++++++++++++++++++-----
+ sound/pci/ice1712/hoontech.h | 1 +
+ 2 files changed, 35 insertions(+), 5 deletions(-)
+
+--- a/sound/pci/ice1712/hoontech.c
++++ b/sound/pci/ice1712/hoontech.c
+@@ -166,7 +166,7 @@ static void snd_ice1712_stdsp24_midi2(st
+ 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(str
+ 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(str
+ 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(str
+ 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
+ .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 */
+ };
+--- a/sound/pci/ice1712/hoontech.h
++++ b/sound/pci/ice1712/hoontech.h
+@@ -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[];
+
diff --git a/series.conf b/series.conf
index 41e7ba63fa..4a5bd80b24 100644
--- a/series.conf
+++ b/series.conf
@@ -362,6 +362,7 @@
# Sound
##########################################################
patches.drivers/ALSA-hda-Implement-mic-mute-LED-mode-enum
+ patches.drivers/ALSA-ice1712-Add-support-for-STAudio-ADCIII
########################################################
# Char / serial