btfmcodec: Update usecase start
This change will notify client about usecase start if transport selected is bt advance audio. Change-Id: I5c85d32e0701cec4f36e0dda4110cc20338bf6a4 Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com>
This commit is contained in:
@@ -527,6 +527,19 @@ int btfmcodec_hwep_prepare(struct btfmcodec_data *btfmcodec, uint32_t sampling_r
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int btfmcodec_notify_usecase_start(struct btfmcodec_data *btfmcodec,
|
||||
uint8_t transport)
|
||||
{
|
||||
struct btfmcodec_char_device *btfmcodec_dev = btfmcodec->btfmcodec_dev;
|
||||
struct btm_usecase_start_ind ind;
|
||||
|
||||
ind.opcode = BTM_BTFMCODEC_USECASE_START_IND;
|
||||
ind.len = BTM_USECASE_START_IND_LEN;
|
||||
ind.transport = transport;
|
||||
return btfmcodec_dev_enqueue_pkt(btfmcodec_dev, &ind, (ind.len +
|
||||
BTM_HEADER_LEN));
|
||||
}
|
||||
|
||||
static int btfmcodec_dai_prepare(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
@@ -550,6 +563,7 @@ static int btfmcodec_dai_prepare(struct snd_pcm_substream *substream,
|
||||
btfmcodec_get_current_transport(state) != BT_Connected) {
|
||||
BTFMCODEC_WARN("cached required info as state is:%s",
|
||||
coverttostring(btfmcodec_get_current_transport(state)));
|
||||
btfmcodec_notify_usecase_start(btfmcodec, BTADV);
|
||||
} else {
|
||||
ret = btfmcodec_hwep_prepare(btfmcodec, sampling_rate, direction, id);
|
||||
/* if (ret >= 0) {
|
||||
|
Reference in New Issue
Block a user