diff options
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 7b74547b56fa..0d8b08ef8731 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -56,17 +56,19 @@ static int dapm_up_seq[] = { | |||
56 | [snd_soc_dapm_pre] = 0, | 56 | [snd_soc_dapm_pre] = 0, |
57 | [snd_soc_dapm_supply] = 1, | 57 | [snd_soc_dapm_supply] = 1, |
58 | [snd_soc_dapm_micbias] = 2, | 58 | [snd_soc_dapm_micbias] = 2, |
59 | [snd_soc_dapm_mic] = 3, | 59 | [snd_soc_dapm_aif_in] = 3, |
60 | [snd_soc_dapm_mux] = 4, | 60 | [snd_soc_dapm_aif_out] = 3, |
61 | [snd_soc_dapm_value_mux] = 4, | 61 | [snd_soc_dapm_mic] = 4, |
62 | [snd_soc_dapm_dac] = 5, | 62 | [snd_soc_dapm_mux] = 5, |
63 | [snd_soc_dapm_mixer] = 6, | 63 | [snd_soc_dapm_value_mux] = 5, |
64 | [snd_soc_dapm_mixer_named_ctl] = 6, | 64 | [snd_soc_dapm_dac] = 6, |
65 | [snd_soc_dapm_pga] = 7, | 65 | [snd_soc_dapm_mixer] = 7, |
66 | [snd_soc_dapm_adc] = 8, | 66 | [snd_soc_dapm_mixer_named_ctl] = 7, |
67 | [snd_soc_dapm_hp] = 9, | 67 | [snd_soc_dapm_pga] = 8, |
68 | [snd_soc_dapm_spk] = 9, | 68 | [snd_soc_dapm_adc] = 9, |
69 | [snd_soc_dapm_post] = 10, | 69 | [snd_soc_dapm_hp] = 10, |
70 | [snd_soc_dapm_spk] = 10, | ||
71 | [snd_soc_dapm_post] = 11, | ||
70 | }; | 72 | }; |
71 | 73 | ||
72 | static int dapm_down_seq[] = { | 74 | static int dapm_down_seq[] = { |
@@ -82,8 +84,10 @@ static int dapm_down_seq[] = { | |||
82 | [snd_soc_dapm_micbias] = 8, | 84 | [snd_soc_dapm_micbias] = 8, |
83 | [snd_soc_dapm_mux] = 9, | 85 | [snd_soc_dapm_mux] = 9, |
84 | [snd_soc_dapm_value_mux] = 9, | 86 | [snd_soc_dapm_value_mux] = 9, |
85 | [snd_soc_dapm_supply] = 10, | 87 | [snd_soc_dapm_aif_in] = 10, |
86 | [snd_soc_dapm_post] = 11, | 88 | [snd_soc_dapm_aif_out] = 10, |
89 | [snd_soc_dapm_supply] = 11, | ||
90 | [snd_soc_dapm_post] = 12, | ||
87 | }; | 91 | }; |
88 | 92 | ||
89 | static void pop_wait(u32 pop_time) | 93 | static void pop_wait(u32 pop_time) |
@@ -229,6 +233,8 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, | |||
229 | case snd_soc_dapm_micbias: | 233 | case snd_soc_dapm_micbias: |
230 | case snd_soc_dapm_vmid: | 234 | case snd_soc_dapm_vmid: |
231 | case snd_soc_dapm_supply: | 235 | case snd_soc_dapm_supply: |
236 | case snd_soc_dapm_aif_in: | ||
237 | case snd_soc_dapm_aif_out: | ||
232 | p->connect = 1; | 238 | p->connect = 1; |
233 | break; | 239 | break; |
234 | /* does effect routing - dynamically connected */ | 240 | /* does effect routing - dynamically connected */ |
@@ -502,8 +508,14 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget) | |||
502 | if (widget->id == snd_soc_dapm_supply) | 508 | if (widget->id == snd_soc_dapm_supply) |
503 | return 0; | 509 | return 0; |
504 | 510 | ||
505 | if (widget->id == snd_soc_dapm_adc && widget->active) | 511 | switch (widget->id) { |
506 | return 1; | 512 | case snd_soc_dapm_adc: |
513 | case snd_soc_dapm_aif_out: | ||
514 | if (widget->active) | ||
515 | return 1; | ||
516 | default: | ||
517 | break; | ||
518 | } | ||
507 | 519 | ||
508 | if (widget->connected) { | 520 | if (widget->connected) { |
509 | /* connected pin ? */ | 521 | /* connected pin ? */ |
@@ -542,8 +554,14 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget) | |||
542 | return 0; | 554 | return 0; |
543 | 555 | ||
544 | /* active stream ? */ | 556 | /* active stream ? */ |
545 | if (widget->id == snd_soc_dapm_dac && widget->active) | 557 | switch (widget->id) { |
546 | return 1; | 558 | case snd_soc_dapm_dac: |
559 | case snd_soc_dapm_aif_in: | ||
560 | if (widget->active) | ||
561 | return 1; | ||
562 | default: | ||
563 | break; | ||
564 | } | ||
547 | 565 | ||
548 | if (widget->connected) { | 566 | if (widget->connected) { |
549 | /* connected pin ? */ | 567 | /* connected pin ? */ |
@@ -1057,6 +1075,8 @@ static void dbg_dump_dapm(struct snd_soc_codec* codec, const char *action) | |||
1057 | case snd_soc_dapm_mixer: | 1075 | case snd_soc_dapm_mixer: |
1058 | case snd_soc_dapm_mixer_named_ctl: | 1076 | case snd_soc_dapm_mixer_named_ctl: |
1059 | case snd_soc_dapm_supply: | 1077 | case snd_soc_dapm_supply: |
1078 | case snd_soc_dapm_aif_in: | ||
1079 | case snd_soc_dapm_aif_out: | ||
1060 | if (w->name) { | 1080 | if (w->name) { |
1061 | in = is_connected_input_ep(w); | 1081 | in = is_connected_input_ep(w); |
1062 | dapm_clear_walk(w->codec); | 1082 | dapm_clear_walk(w->codec); |
@@ -1433,6 +1453,8 @@ static int snd_soc_dapm_add_route(struct snd_soc_codec *codec, | |||
1433 | case snd_soc_dapm_pre: | 1453 | case snd_soc_dapm_pre: |
1434 | case snd_soc_dapm_post: | 1454 | case snd_soc_dapm_post: |
1435 | case snd_soc_dapm_supply: | 1455 | case snd_soc_dapm_supply: |
1456 | case snd_soc_dapm_aif_in: | ||
1457 | case snd_soc_dapm_aif_out: | ||
1436 | list_add(&path->list, &codec->dapm_paths); | 1458 | list_add(&path->list, &codec->dapm_paths); |
1437 | list_add(&path->list_sink, &wsink->sources); | 1459 | list_add(&path->list_sink, &wsink->sources); |
1438 | list_add(&path->list_source, &wsource->sinks); | 1460 | list_add(&path->list_source, &wsource->sinks); |
@@ -1535,9 +1557,11 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec) | |||
1535 | dapm_new_mux(codec, w); | 1557 | dapm_new_mux(codec, w); |
1536 | break; | 1558 | break; |
1537 | case snd_soc_dapm_adc: | 1559 | case snd_soc_dapm_adc: |
1560 | case snd_soc_dapm_aif_out: | ||
1538 | w->power_check = dapm_adc_check_power; | 1561 | w->power_check = dapm_adc_check_power; |
1539 | break; | 1562 | break; |
1540 | case snd_soc_dapm_dac: | 1563 | case snd_soc_dapm_dac: |
1564 | case snd_soc_dapm_aif_in: | ||
1541 | w->power_check = dapm_dac_check_power; | 1565 | w->power_check = dapm_dac_check_power; |
1542 | break; | 1566 | break; |
1543 | case snd_soc_dapm_pga: | 1567 | case snd_soc_dapm_pga: |