|
@@ -527,6 +527,19 @@ int btfmcodec_hwep_prepare(struct btfmcodec_data *btfmcodec, uint32_t sampling_r
|
|
return ret;
|
|
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,
|
|
static int btfmcodec_dai_prepare(struct snd_pcm_substream *substream,
|
|
struct snd_soc_dai *dai)
|
|
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_get_current_transport(state) != BT_Connected) {
|
|
BTFMCODEC_WARN("cached required info as state is:%s",
|
|
BTFMCODEC_WARN("cached required info as state is:%s",
|
|
coverttostring(btfmcodec_get_current_transport(state)));
|
|
coverttostring(btfmcodec_get_current_transport(state)));
|
|
|
|
+ btfmcodec_notify_usecase_start(btfmcodec, BTADV);
|
|
} else {
|
|
} else {
|
|
ret = btfmcodec_hwep_prepare(btfmcodec, sampling_rate, direction, id);
|
|
ret = btfmcodec_hwep_prepare(btfmcodec, sampling_rate, direction, id);
|
|
/* if (ret >= 0) {
|
|
/* if (ret >= 0) {
|