Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sound/soc/sof/sof-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ void sof_client_unregister_ipc_rx_handler(struct sof_client_dev *cdev,
struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev);
struct sof_ipc_event_entry *event;

guard(mutex)(&sdev->ipc_client_mutex);
guard(mutex)(&sdev->client_event_handler_mutex);

Comment on lines 612 to 616

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ujfalusi seems valid. Fwiw not sure if this matters today, but this also made me think about the pcm and kcontrol using different locks since they are async, eventually a sof client could hold either pcm/kcontrol lock.

list_for_each_entry(event, &sdev->ipc_rx_handler_list, list) {
if (event->cdev == cdev && event->ipc_msg_type == ipc_msg_type) {
Expand All @@ -629,7 +629,7 @@ void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev)
{
struct sof_state_event_entry *event;

guard(mutex)(&sdev->ipc_client_mutex);
guard(mutex)(&sdev->client_event_handler_mutex);

list_for_each_entry(event, &sdev->fw_state_handler_list, list)
event->callback(event->cdev, sdev->fw_state);
Comment on lines +632 to 635
Expand Down Expand Up @@ -664,7 +664,7 @@ void sof_client_unregister_fw_state_handler(struct sof_client_dev *cdev)
struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev);
struct sof_state_event_entry *event;

guard(mutex)(&sdev->ipc_client_mutex);
guard(mutex)(&sdev->client_event_handler_mutex);

list_for_each_entry(event, &sdev->fw_state_handler_list, list) {
if (event->cdev == cdev) {
Expand Down
Loading