aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Griffin <peter.griffin@linaro.org>2016-03-17 08:52:30 +0000
committerPeter Griffin <peter.griffin@linaro.org>2016-03-17 08:52:30 +0000
commit2d0984c463bf6cc996c9382f4d1adb61acb2206d (patch)
tree1ed959b41adb10132e565f36a5e9dfcbf2855a13
parent6e751b6e5a66826a721544c78e2b04011c9c0042 (diff)
-rw-r--r--arch/arm/boot/dts/stih407-family.dtsi45
-rw-r--r--arch/arm/configs/multi_v7_defconfig7
-rw-r--r--sound/soc/sti/sti_uniperif.c28
-rw-r--r--sound/soc/sti/uniperif_player.c14
4 files changed, 86 insertions, 8 deletions
diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi
index 7f3d6679c5f7..f5b28a20add5 100644
--- a/arch/arm/boot/dts/stih407-family.dtsi
+++ b/arch/arm/boot/dts/stih407-family.dtsi
@@ -664,5 +664,50 @@
"fdma_low",
"fdma_ic";
};
+
+ sti_uni_player2: sti-uni-player@2 {
+ compatible = "st,sti-uni-player";
+ status = "okay";
+ #sound-dai-cells = <0>;
+ st,syscfg = <&syscfg_core>;
+ clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
+ reg = <0x8D82000 0x158>;
+ interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
+ dmas = <&fdma0 4 0 1>;
+ dai-name = "Uni Player #1 (DAC)";
+ dma-names = "tx";
+ uniperiph-id = <2>;
+ version = <5>;
+ mode = "PCM";
+ };
+
+ sti_uni_player3: sti-uni-player@3 {
+ compatible = "st,sti-uni-player";
+ status = "okay";
+ #sound-dai-cells = <0>;
+ st,syscfg = <&syscfg_core>;
+ clocks = <&clk_s_d0_flexgen CLK_SPDIFF>;
+ reg = <0x8D85000 0x158>;
+ interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
+ dmas = <&fdma0 7 0 1>;
+ dma-names = "tx";
+ dai-name = "Uni Player #1 (PIO)";
+ uniperiph-id = <3>;
+ version = <5>;
+ mode = "SPDIF";
+ };
+
+ sti_uni_reader1: sti-uni-reader@1 {
+ compatible = "st,sti-uni-reader";
+ status = "disabled";
+ #sound-dai-cells = <0>;
+ st,syscfg = <&syscfg_core>;
+ reg = <0x8D84000 0x158>;
+ interrupts = <GIC_SPI 88 IRQ_TYPE_NONE>;
+ dmas = <&fdma0 6 0 1>;
+ dma-names = "rx";
+ dai-name = "Uni Reader #1 (HDMI RX)";
+ version = <3>;
+ };
};
};
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 125c7b628056..4fb24e95a90c 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -1,3 +1,4 @@
+CONFIG_SND_SOC_STI=y
CONFIG_SYSVIPC=y
CONFIG_FHANDLE=y
CONFIG_IRQ_DOMAIN_DEBUG=y
@@ -466,8 +467,8 @@ CONFIG_BACKLIGHT_PWM=y
CONFIG_BACKLIGHT_AS3711=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-CONFIG_SOUND=m
-CONFIG_SND=m
+CONFIG_SOUND=y
+CONFIG_SND=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_HDA_TEGRA=m
CONFIG_SND_HDA_INPUT_BEEP=y
@@ -475,7 +476,7 @@ CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_HDMI=m
CONFIG_SND_USB_AUDIO=y
-CONFIG_SND_SOC=m
+CONFIG_SND_SOC=y
CONFIG_SND_ATMEL_SOC=m
CONFIG_SND_ATMEL_SOC_WM8904=m
CONFIG_SND_SOC_SH4_FSI=m
diff --git a/sound/soc/sti/sti_uniperif.c b/sound/soc/sti/sti_uniperif.c
index 39bcefe5eea0..3f06b1130afc 100644
--- a/sound/soc/sti/sti_uniperif.c
+++ b/sound/soc/sti/sti_uniperif.c
@@ -146,6 +146,8 @@ static int sti_uniperiph_cpu_dai_of(struct device_node *node,
struct snd_soc_pcm_stream *stream;
struct uniperif *uni;
+ printk("%s:%d ()+\n",__FUNCTION__, __LINE__);
+
uni = devm_kzalloc(dev, sizeof(*uni), GFP_KERNEL);
if (!uni)
return -ENOMEM;
@@ -197,6 +199,8 @@ static int sti_uniperiph_cpu_dai_of(struct device_node *node,
stream->rates = uni->hw->rates;
stream->formats = uni->hw->formats;
+ printk("%s:%d ()-\n",__FUNCTION__, __LINE__);
+
return 0;
}
@@ -210,13 +214,19 @@ static int sti_uniperiph_probe(struct platform_device *pdev)
struct device_node *node = pdev->dev.of_node;
int ret;
+ printk("\n\n *********8 %s\n",__FUNCTION__);
+
/* Allocate the private data and the CPU_DAI array */
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
- if (!priv)
+ if (!priv) {
+ printk("%s:%d ERROR\n",__FUNCTION__, __LINE__);
return -ENOMEM;
+ }
priv->dai = devm_kzalloc(&pdev->dev, sizeof(*priv->dai), GFP_KERNEL);
- if (!priv->dai)
+ if (!priv->dai) {
+ printk("%s:%d ERROR\n",__FUNCTION__, __LINE__);
return -ENOMEM;
+ }
priv->pdev = pdev;
@@ -227,11 +237,21 @@ static int sti_uniperiph_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev,
&sti_uniperiph_dai_component,
priv->dai, 1);
- if (ret < 0)
+ if (ret < 0) {
+ printk("%s:%d ERROR\n",__FUNCTION__, __LINE__);
return ret;
+ }
- return devm_snd_dmaengine_pcm_register(&pdev->dev,
+ ret = devm_snd_dmaengine_pcm_register(&pdev->dev,
&dmaengine_pcm_config, 0);
+
+ if (ret < 0) {
+ printk("%s:%d ERROR\n",__FUNCTION__, __LINE__);
+ return ret;
+ }
+
+ return ret;
+
}
static const struct of_device_id snd_soc_sti_match[] = {
diff --git a/sound/soc/sti/uniperif_player.c b/sound/soc/sti/uniperif_player.c
index 843f037a317d..0e83cd4a0779 100644
--- a/sound/soc/sti/uniperif_player.c
+++ b/sound/soc/sti/uniperif_player.c
@@ -984,6 +984,8 @@ static int uni_player_parse_dt(struct platform_device *pdev,
struct device_node *pnode = pdev->dev.of_node;
const char *mode;
+ printk("%s:%d ()+\n",__FUNCTION__, __LINE__);
+
/* Allocate memory for the info structure */
info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
if (!info)
@@ -1022,8 +1024,12 @@ static int uni_player_parse_dt(struct platform_device *pdev,
player->info = info;
/* Get the PCM_CLK_SEL bit from audio-glue-ctrl SoC register */
- if (uni_player_parse_dt_clk_glue(pdev, player))
+ if (uni_player_parse_dt_clk_glue(pdev, player)) {
+ printk("ERROR uni_player_parse_dt\n");
return -EINVAL;
+ }
+
+ printk("%s:%d ()-\n",__FUNCTION__, __LINE__);
return 0;
}
@@ -1048,6 +1054,8 @@ int uni_player_init(struct platform_device *pdev,
player->hw = &uni_player_pcm_hw;
player->dai_ops = &uni_player_dai_ops;
+ printk("%s:%d ()+\n",__FUNCTION__, __LINE__);
+
ret = uni_player_parse_dt(pdev, player);
if (ret < 0) {
@@ -1079,6 +1087,8 @@ int uni_player_init(struct platform_device *pdev,
mutex_init(&player->ctrl_lock);
+ printk("%s:%d \n",__FUNCTION__, __LINE__);
+
/* Ensure that disabled by default */
SET_UNIPERIF_CONFIG_BACK_STALL_REQ_DISABLE(player);
SET_UNIPERIF_CTRL_ROUNDING_OFF(player);
@@ -1111,6 +1121,8 @@ int uni_player_init(struct platform_device *pdev,
player->snd_ctrls = snd_sti_pcm_ctl[0];
}
+ printk("%s:%d ()-\n",__FUNCTION__, __LINE__);
+
return 0;
}
EXPORT_SYMBOL_GPL(uni_player_init);