Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next

This commit is contained in:
Mark Brown 2016-05-27 13:45:27 +01:00
commit db1f3283ed
4 changed files with 21 additions and 16 deletions

View File

@ -492,9 +492,7 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
*/ */
if (!count) { if (!count) {
clk = clk_register_fixed_rate(dev, clkout_name[CLKOUT], clk = clk_register_fixed_rate(dev, clkout_name[CLKOUT],
parent_clk_name, parent_clk_name, 0, req_rate);
(parent_clk_name) ?
0 : CLK_IS_ROOT, req_rate);
if (!IS_ERR(clk)) { if (!IS_ERR(clk)) {
adg->clkout[CLKOUT] = clk; adg->clkout[CLKOUT] = clk;
of_clk_add_provider(np, of_clk_src_simple_get, clk); of_clk_add_provider(np, of_clk_src_simple_get, clk);
@ -506,9 +504,7 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
else { else {
for (i = 0; i < CLKOUTMAX; i++) { for (i = 0; i < CLKOUTMAX; i++) {
clk = clk_register_fixed_rate(dev, clkout_name[i], clk = clk_register_fixed_rate(dev, clkout_name[i],
parent_clk_name, parent_clk_name, 0,
(parent_clk_name) ?
0 : CLK_IS_ROOT,
req_rate); req_rate);
if (!IS_ERR(clk)) { if (!IS_ERR(clk)) {
adg->onecell.clks = adg->clkout; adg->onecell.clks = adg->clkout;

View File

@ -316,11 +316,15 @@ static u32 rsnd_dmapp_get_id(struct rsnd_dai_stream *io,
size = ARRAY_SIZE(gen2_id_table_cmd); size = ARRAY_SIZE(gen2_id_table_cmd);
} }
if (!entry) if ((!entry) || (size <= id)) {
return 0xFF; struct device *dev = rsnd_priv_to_dev(rsnd_io_to_priv(io));
if (size <= id) dev_err(dev, "unknown connection (%s[%d])\n",
return 0xFF; rsnd_mod_name(mod), rsnd_mod_id(mod));
/* use non-prohibited SRS number as error */
return 0x00; /* SSI00 */
}
return entry[id]; return entry[id];
} }

View File

@ -276,8 +276,9 @@ struct rsnd_mod {
/* /*
* status * status
* *
* 0xH0000CB0 * 0xH0000CBA
* *
* A 0: probe 1: remove
* B 0: init 1: quit * B 0: init 1: quit
* C 0: start 1: stop * C 0: start 1: stop
* *
@ -287,19 +288,19 @@ struct rsnd_mod {
* H 0: fallback * H 0: fallback
* H 0: hw_params * H 0: hw_params
*/ */
#define __rsnd_mod_shift_probe 0
#define __rsnd_mod_shift_remove 0
#define __rsnd_mod_shift_init 4 #define __rsnd_mod_shift_init 4
#define __rsnd_mod_shift_quit 4 #define __rsnd_mod_shift_quit 4
#define __rsnd_mod_shift_start 8 #define __rsnd_mod_shift_start 8
#define __rsnd_mod_shift_stop 8 #define __rsnd_mod_shift_stop 8
#define __rsnd_mod_shift_probe 28 /* always called */
#define __rsnd_mod_shift_remove 28 /* always called */
#define __rsnd_mod_shift_irq 28 /* always called */ #define __rsnd_mod_shift_irq 28 /* always called */
#define __rsnd_mod_shift_pcm_new 28 /* always called */ #define __rsnd_mod_shift_pcm_new 28 /* always called */
#define __rsnd_mod_shift_fallback 28 /* always called */ #define __rsnd_mod_shift_fallback 28 /* always called */
#define __rsnd_mod_shift_hw_params 28 /* always called */ #define __rsnd_mod_shift_hw_params 28 /* always called */
#define __rsnd_mod_add_probe 0 #define __rsnd_mod_add_probe 1
#define __rsnd_mod_add_remove 0 #define __rsnd_mod_add_remove -1
#define __rsnd_mod_add_init 1 #define __rsnd_mod_add_init 1
#define __rsnd_mod_add_quit -1 #define __rsnd_mod_add_quit -1
#define __rsnd_mod_add_start 1 #define __rsnd_mod_add_start 1
@ -310,7 +311,7 @@ struct rsnd_mod {
#define __rsnd_mod_add_hw_params 0 #define __rsnd_mod_add_hw_params 0
#define __rsnd_mod_call_probe 0 #define __rsnd_mod_call_probe 0
#define __rsnd_mod_call_remove 0 #define __rsnd_mod_call_remove 1
#define __rsnd_mod_call_init 0 #define __rsnd_mod_call_init 0
#define __rsnd_mod_call_quit 1 #define __rsnd_mod_call_quit 1
#define __rsnd_mod_call_start 0 #define __rsnd_mod_call_start 0

View File

@ -572,6 +572,9 @@ int rsnd_src_probe(struct rsnd_priv *priv)
i = 0; i = 0;
for_each_child_of_node(node, np) { for_each_child_of_node(node, np) {
if (!of_device_is_available(np))
goto skip;
src = rsnd_src_get(priv, i); src = rsnd_src_get(priv, i);
snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d", snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
@ -595,6 +598,7 @@ int rsnd_src_probe(struct rsnd_priv *priv)
if (ret) if (ret)
goto rsnd_src_probe_done; goto rsnd_src_probe_done;
skip:
i++; i++;
} }