711 if (res < 0)
712 goto _unlock;
713 }
714 snd_pcm_group_for_each_entry(s, substream) {
715 res = ops->do_action(s, state);
716 if (res < 0) {
717 if (ops->undo_action) {
718 snd_pcm_group_for_each_entry(s1, substream) {
719 if (s1 == s)
720 break;
721 ops->undo_action(s1, state);
722 }
723 }
724 s = NULL;
725 goto _unlock;
726 }
727 }
728 snd_pcm_group_for_each_entry(s, substream) {
729 ops->post_action(s, state);
730 }
731 _unlock:
732 if (do_lock) {
733
734 snd_pcm_group_for_each_entry(s1, substream) {
735 if (s1 != substream)
736 spin_unlock(&s1->self_group.lock);
737 if (s1 == s)
738 break;
739 }
740 }
741 return res;
742}
743
744
745
746
747static int snd_pcm_action_single(struct action_ops *ops,
748 struct snd_pcm_substream *substream,
749 int state)
750{
751 int res;