summaryrefslogtreecommitdiffstats
path: root/plugins/lib/bluealsa/hal-bluealsa-transports.c
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2019-02-13 09:30:58 +0100
committerThierry Bultel <thierry.bultel@iot.bzh>2019-02-13 09:30:58 +0100
commit6c55f920604baa08927740b1595c2d3d021c24e4 (patch)
tree608e7fd8c1eafd0d4175051aea30c2230ebbb774 /plugins/lib/bluealsa/hal-bluealsa-transports.c
parent24391a4b6050819935f66897e49ffdb2fddc714a (diff)
bluealsa plugin: get the sampling rate from the transport
The sampling rate, for both SCO and A2DP, had been harcoded for convenience. But this is not a constant, because it depends on the connected handset. This commit retrieves the sampling rate for each new transport and uses that information as a parameter for the stream creation in the softmixer. Change-Id: I4d30eccba9cc63d7f4e618c571719996a136b4f5 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/lib/bluealsa/hal-bluealsa-transports.c')
-rw-r--r--plugins/lib/bluealsa/hal-bluealsa-transports.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/lib/bluealsa/hal-bluealsa-transports.c b/plugins/lib/bluealsa/hal-bluealsa-transports.c
index 590ab5d..b528212 100644
--- a/plugins/lib/bluealsa/hal-bluealsa-transports.c
+++ b/plugins/lib/bluealsa/hal-bluealsa-transports.c
@@ -147,9 +147,11 @@ char * halBlueAlsaTransportAsString(char * buff, size_t len, const struct ba_msg
char addr[18];
ba2str(&transport->addr, addr);
- snprintf(buff, len, "%s,%s,%s", addr,
+ snprintf(buff, len, "%s,%s,%s sampling %d codec %d", addr,
transport->type & BA_PCM_TYPE_A2DP?"a2dp":"sco",
- transport->type & BA_PCM_STREAM_PLAYBACK?"playback":"capture");
+ transport->type & BA_PCM_STREAM_PLAYBACK?"playback":"capture",
+ transport->sampling,
+ transport->codec);
return buff;
}