mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-10-06 00:01:01 +02:00
There is a possibility that 2 or more clients can use the same channel, one as producer and the other(s) as sink. The slim_query_ch API gives the ability for a client to specify channel number it needs to use. Reference counting is used to make sure channel is not deallocated until the last caller deallocates it. Another counter (def) is used to keep track of channel definition and removal. Channel definition is sent to hardware when the producer and/or consumer(s) connects ports to the channel. Channel is only removed when all clients indicate they want to remove channel. Change-Id: Ic5084680419e16ee238d2e62c02e5430170b387d Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>