Skip to content

Commit f994685

Browse files
committed
snd-bcm2835: Don't allow responses from VC to be interrupted by user signals
There should always be a response, and retry after a signal interruption is not handled, so don't report we are interruptible. See: #1560
1 parent 47b8623 commit f994685

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

sound/arm/bcm2835-vchiq.c

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -511,12 +511,7 @@ static int bcm2835_audio_set_ctls_chan(bcm2835_alsa_stream_t * alsa_stream,
511511
}
512512

513513
/* We are expecting a reply from the videocore */
514-
ret = wait_for_completion_interruptible(&instance->msg_avail_comp);
515-
if (ret) {
516-
LOG_DBG("%s: failed on waiting for event (status=%d)\n",
517-
__func__, success);
518-
goto unlock;
519-
}
514+
wait_for_completion(&instance->msg_avail_comp);
520515

521516
if (instance->result != 0) {
522517
LOG_ERR("%s: result=%d\n", __func__, instance->result);
@@ -615,12 +610,7 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream,
615610
}
616611

617612
/* We are expecting a reply from the videocore */
618-
ret = wait_for_completion_interruptible(&instance->msg_avail_comp);
619-
if (ret) {
620-
LOG_DBG("%s: failed on waiting for event (status=%d)\n",
621-
__func__, success);
622-
goto unlock;
623-
}
613+
wait_for_completion(&instance->msg_avail_comp);
624614

625615
if (instance->result != 0) {
626616
LOG_ERR("%s: result=%d", __func__, instance->result);
@@ -761,14 +751,11 @@ int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream)
761751
goto unlock;
762752
}
763753

764-
ret = wait_for_completion_interruptible(&instance->msg_avail_comp);
765-
if (ret) {
766-
LOG_DBG("%s: failed on waiting for event (status=%d)\n",
767-
__func__, success);
768-
goto unlock;
769-
}
754+
/* We are expecting a reply from the videocore */
755+
wait_for_completion(&instance->msg_avail_comp);
756+
770757
if (instance->result != 0) {
771-
LOG_ERR("%s: failed result (status=%d)\n",
758+
LOG_ERR("%s: failed result (result=%d)\n",
772759
__func__, instance->result);
773760

774761
ret = -1;

0 commit comments

Comments
 (0)