Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/topic/omap' into asoc-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Dec 2, 2012
2 parents d0f3ea4 + 1c08e7e commit 6a441c5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Required properties:

Optional properties:
- ti,dmic: phandle for the OMAP dmic node if the machine have it connected
- ti,jack_detection: Need to be set to <1> if the board capable to detect jack
- ti,jack_detection: Need to be present if the board capable to detect jack
insertion, removal.

Available audio endpoints for the audio-routing table:
Expand Down Expand Up @@ -59,7 +59,7 @@ sound {
compatible = "ti,abe-twl6040";
ti,model = "SDP4430";

ti,jack-detection = <1>;
ti,jack-detection;
ti,mclk-freq = <38400000>;

ti,mcpdm = <&mcpdm>;
Expand Down
4 changes: 1 addition & 3 deletions sound/soc/omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#include <linux/platform_data/asoc-ti-mcbsp.h>

#include <plat/cpu.h>

#include "mcbsp.h"

static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
Expand Down Expand Up @@ -612,7 +610,7 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp)
* system will refuse to enter idle if the CLKS pin source is not reset
* back to internal source.
*/
if (!cpu_class_is_omap1())
if (!mcbsp_omap1())
omap2_mcbsp_set_clks_src(mcbsp, MCBSP_CLKS_PRCM_SRC);

spin_lock(&mcbsp->lock);
Expand Down
6 changes: 6 additions & 0 deletions sound/soc/omap/mcbsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

#include "omap-pcm.h"

#ifdef CONFIG_ARCH_OMAP1
#define mcbsp_omap1() 1
#else
#define mcbsp_omap1() 0
#endif

/* McBSP register numbers. Register address offset = num * reg_step */
enum {
/* Common registers */
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/omap/omap-abe-twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ static __devinit int omap_abe_probe(struct platform_device *pdev)
num_links = 1;
}

of_property_read_u32(node, "ti,jack-detection",
&priv->jack_detection);
priv->jack_detection = of_property_read_bool(node,
"ti,jack-detection");
of_property_read_u32(node, "ti,mclk-freq",
&priv->mclk_freq);
if (!priv->mclk_freq) {
Expand Down
5 changes: 2 additions & 3 deletions sound/soc/omap/omap-mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <sound/initval.h>
#include <sound/soc.h>

#include <plat/cpu.h>
#include <linux/platform_data/asoc-ti-mcbsp.h>
#include "mcbsp.h"
#include "omap-mcbsp.h"
Expand Down Expand Up @@ -512,15 +511,15 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
regs->srgr2 |= CLKSM;
break;
case OMAP_MCBSP_SYSCLK_CLKS_FCLK:
if (cpu_class_is_omap1()) {
if (mcbsp_omap1()) {
err = -EINVAL;
break;
}
err = omap2_mcbsp_set_clks_src(mcbsp,
MCBSP_CLKS_PRCM_SRC);
break;
case OMAP_MCBSP_SYSCLK_CLKS_EXT:
if (cpu_class_is_omap1()) {
if (mcbsp_omap1()) {
err = 0;
break;
}
Expand Down

0 comments on commit 6a441c5

Please sign in to comment.