On Wed, Nov 07, 2012 at 11:02:21AM +0530, Rajeev kumar wrote:
Turn on logging does not helping in giving any extra information in this case. Backtracing the code gives me the line number. Please find below the information.
Perhaps if you were to share the logging someone might spot something, or perhaps if you thought about the logging in more detail...
static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) 3540 { 3541 struct snd_soc_dapm_widget *w; 3542 LIST_HEAD(down_list); 3543 int powerdown = 0; 3544 3545 list_for_each_entry(w, &dapm->card->widgets, list) { 3546 if (w->dapm != dapm) 3547 continue; 3548 if (w->power) { 3549 dapm_seq_insert(w, &down_list, false); 3550 w->power = 0; 3551 powerdown = 1; 3552 } 3553 }
If you check line number 3545, it is trying to get widget from card. and the system get crashed as there is no entry for dapm in the card.
Your analysis does not appear to correspond to the code. The DAPM context is being used to find the card here, not the other way around as you say. How have we managed to get an active DAPM context which isn't part of a card?
As I mentioned previously, I have provided widgets support only at codec level not at platform/machine level. So extracting widgets from card may create an issue.
Note: Just to make an experiment, I have added a single widget in machine driver then also I am getting the same crash log.
So if you've tested this and found that this is not related to having widgets in the card what is making you continually mention that you don't have widgets in the card? Having no widgets outside the CODEC is totally normal.