Changeset 2fbd49c in mainline for uspace/srv/audio/hound/audio_sink.h


Ignore:
Timestamp:
2022-09-22T09:01:32Z (17 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2139676
Parents:
a76e76b
git-author:
Jiri Svoboda <jiri@…> (2022-09-21 18:01:20)
git-committer:
Jiri Svoboda <jiri@…> (2022-09-22 09:01:32)
Message:

Audio synk needs locking

Without locking the list of sink connections, we are exposed
to a race between removing a connection at the end of playback
(typically while destroying a hound context) and audio device
event PCM_EVENT_FRAMES_PLAYED which causes audio mixing to occur
via audio_sink_mix_inputs(), causing hound to crash often at
the end of playback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/audio/hound/audio_sink.h

    ra76e76b r2fbd49c  
    4141#include <stdbool.h>
    4242#include <fibril.h>
     43#include <fibril_synch.h>
    4344#include <pcm/format.h>
    4445
     
    5152        /** Link in hound's sink list */
    5253        link_t link;
     54        /** Protect sink including list of connections */
     55        fibril_mutex_t lock;
    5356        /** List of all related connections */
    5457        list_t connections;
Note: See TracChangeset for help on using the changeset viewer.