summaryrefslogtreecommitdiffstats
path: root/sound/aoa
diff options
context:
space:
mode:
Diffstat (limited to 'sound/aoa')
-rw-r--r--sound/aoa/Kconfig3
-rw-r--r--sound/aoa/core/snd-aoa-gpio-feature.c15
-rw-r--r--sound/aoa/fabrics/snd-aoa-fabric-layout.c14
-rw-r--r--sound/aoa/soundbus/Kconfig3
4 files changed, 27 insertions, 8 deletions
diff --git a/sound/aoa/Kconfig b/sound/aoa/Kconfig
index a85194fe0b0..2f4334d19cc 100644
--- a/sound/aoa/Kconfig
+++ b/sound/aoa/Kconfig
@@ -3,7 +3,8 @@ menu "Apple Onboard Audio driver"
config SND_AOA
tristate "Apple Onboard Audio driver"
- depends on SOUND && SND_PCM
+ depends on SND
+ select SND_PCM
---help---
This option enables the new driver for the various
Apple Onboard Audio components.
diff --git a/sound/aoa/core/snd-aoa-gpio-feature.c b/sound/aoa/core/snd-aoa-gpio-feature.c
index 2c6eb7784cc..bab97547a05 100644
--- a/sound/aoa/core/snd-aoa-gpio-feature.c
+++ b/sound/aoa/core/snd-aoa-gpio-feature.c
@@ -207,6 +207,17 @@ static void ftr_handle_notify(void *data)
mutex_unlock(&notif->mutex);
}
+static void gpio_enable_dual_edge(int gpio)
+{
+ int v;
+
+ if (gpio == -1)
+ return;
+ v = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio, 0);
+ v |= 0x80; /* enable dual edge */
+ pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio, v);
+}
+
static void ftr_gpio_init(struct gpio_runtime *rt)
{
get_gpio("headphone-mute", NULL,
@@ -234,6 +245,10 @@ static void ftr_gpio_init(struct gpio_runtime *rt)
&linein_detect_gpio,
&linein_detect_gpio_activestate);
+ gpio_enable_dual_edge(headphone_detect_gpio);
+ gpio_enable_dual_edge(lineout_detect_gpio);
+ gpio_enable_dual_edge(linein_detect_gpio);
+
get_irq(headphone_detect_node, &headphone_detect_irq);
get_irq(lineout_detect_node, &lineout_detect_irq);
get_irq(linein_detect_node, &linein_detect_irq);
diff --git a/sound/aoa/fabrics/snd-aoa-fabric-layout.c b/sound/aoa/fabrics/snd-aoa-fabric-layout.c
index 04a7238e949..cbc8a3b5cea 100644
--- a/sound/aoa/fabrics/snd-aoa-fabric-layout.c
+++ b/sound/aoa/fabrics/snd-aoa-fabric-layout.c
@@ -94,6 +94,7 @@ MODULE_ALIAS("sound-layout-82");
MODULE_ALIAS("sound-layout-84");
MODULE_ALIAS("sound-layout-86");
MODULE_ALIAS("sound-layout-92");
+MODULE_ALIAS("sound-layout-96");
/* onyx with all but microphone connected */
static struct codec_connection onyx_connections_nomic[] = {
@@ -381,6 +382,13 @@ static struct layout layouts[] = {
.connections = toonie_connections,
},
},
+ {
+ .layout_id = 96,
+ .codecs[0] = {
+ .name = "onyx",
+ .connections = onyx_connections_noheadphones,
+ },
+ },
/* unknown, untested, but this comes from Apple */
{ .layout_id = 41,
.codecs[0] = {
@@ -479,12 +487,6 @@ static struct layout layouts[] = {
.connections = onyx_connections_noheadphones,
},
},
- { .layout_id = 96,
- .codecs[0] = {
- .name = "onyx",
- .connections = onyx_connections_noheadphones,
- },
- },
{ .layout_id = 98,
.codecs[0] = {
.name = "toonie",
diff --git a/sound/aoa/soundbus/Kconfig b/sound/aoa/soundbus/Kconfig
index d532d27a9f5..7368b7ddfe0 100644
--- a/sound/aoa/soundbus/Kconfig
+++ b/sound/aoa/soundbus/Kconfig
@@ -1,6 +1,7 @@
config SND_AOA_SOUNDBUS
tristate "Apple Soundbus support"
- depends on SOUND && SND_PCM && EXPERIMENTAL
+ depends on SOUND
+ select SND_PCM
---help---
This option enables the generic driver for the soundbus
support on Apple machines.