PAL: Add check for buffering and detected state

Before notiying detection to client, stream state get updated to stopped state,
but if device switch happened during lab buffering, SVA stream will not be able
to update common capture profile, as stream state is in stopped state. Then in
case of concurrency with ACD, it will cause error while starting the graph, as
both SVA and ACD will have active graphs but with different DAM configuration.

Now, adding check, for buffering and detected state, which will tell, if state
is stopped after detection or not.

Change-Id: I5dd958ff785949628432d35a2b54d26bdb8a5577
3 files changed