Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99042
b: refs/heads/master
c: f99a633
h: refs/heads/master
v: v3
  • Loading branch information
Jarkko Nikula authored and Jaroslav Kysela committed May 19, 2008
1 parent 8864fb7 commit 6c74d91
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a2505988ea650b61bd07722e99080a40ff27653
refs/heads/master: f99a633a151686a599413bef758253dfd04887d1
25 changes: 14 additions & 11 deletions trunk/sound/soc/omap/n810.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@

#include <asm/mach-types.h>
#include <asm/arch/hardware.h>
#include <asm/arch/gpio.h>
#include <linux/gpio.h>
#include <asm/arch/mcbsp.h>

#include "omap-mcbsp.h"
#include "omap-pcm.h"
#include "../codecs/tlv320aic3x.h"

#define RX44_HEADSET_AMP_GPIO 10
#define RX44_SPEAKER_AMP_GPIO 101
#define N810_HEADSET_AMP_GPIO 10
#define N810_SPEAKER_AMP_GPIO 101

static struct clk *sys_clkout2;
static struct clk *sys_clkout2_src;
Expand Down Expand Up @@ -154,9 +154,9 @@ static int n810_spk_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
if (SND_SOC_DAPM_EVENT_ON(event))
omap_set_gpio_dataout(RX44_SPEAKER_AMP_GPIO, 1);
gpio_set_value(N810_SPEAKER_AMP_GPIO, 1);
else
omap_set_gpio_dataout(RX44_SPEAKER_AMP_GPIO, 0);
gpio_set_value(N810_SPEAKER_AMP_GPIO, 0);

return 0;
}
Expand All @@ -165,9 +165,9 @@ static int n810_jack_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
if (SND_SOC_DAPM_EVENT_ON(event))
omap_set_gpio_dataout(RX44_HEADSET_AMP_GPIO, 1);
gpio_set_value(N810_HEADSET_AMP_GPIO, 1);
else
omap_set_gpio_dataout(RX44_HEADSET_AMP_GPIO, 0);
gpio_set_value(N810_HEADSET_AMP_GPIO, 0);

return 0;
}
Expand Down Expand Up @@ -303,12 +303,12 @@ static int __init n810_soc_init(void)
clk_set_parent(sys_clkout2_src, func96m_clk);
clk_set_rate(sys_clkout2, 12000000);

if (omap_request_gpio(RX44_HEADSET_AMP_GPIO) < 0)
if (gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0)
BUG();
if (omap_request_gpio(RX44_SPEAKER_AMP_GPIO) < 0)
if (gpio_request(N810_SPEAKER_AMP_GPIO, "spk_amp") < 0)
BUG();
omap_set_gpio_direction(RX44_HEADSET_AMP_GPIO, 0);
omap_set_gpio_direction(RX44_SPEAKER_AMP_GPIO, 0);
gpio_direction_output(N810_HEADSET_AMP_GPIO, 0);
gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0);

return 0;
err2:
Expand All @@ -323,6 +323,9 @@ static int __init n810_soc_init(void)

static void __exit n810_soc_exit(void)
{
gpio_free(N810_SPEAKER_AMP_GPIO);
gpio_free(N810_HEADSET_AMP_GPIO);

platform_device_unregister(n810_snd_device);
}

Expand Down

0 comments on commit 6c74d91

Please sign in to comment.