OSDN Git Service

plugin:dshare: wrong state reporting
authorAndreas Pape <apape@de.adit-jv.com>
Tue, 4 Apr 2017 06:29:52 +0000 (11:59 +0530)
committerTakashi Iwai <tiwai@suse.de>
Wed, 5 Apr 2017 19:39:17 +0000 (21:39 +0200)
commitad6957c618676d31b65d1aa38f60542795d6406b
treef1c15215d25ab783b29617ab88eaa50cc6af5ffa
parent01bc7475c3ee4dc0c1c321c781cfb26e6e5fcb34
plugin:dshare: wrong state reporting

If plugin dshare detects underrun, it reports this to the user
via return value -EPIPE and setting dshare state to 'xrun' which is correct.
But, if user after this wants to check the stream state, it is misleadingly
reported as 'running' instead of 'xrun'.
With this behavior aplay e.g. will not do a proper underrun handling
(restarting stream) but terminates streaming.
This is due to plugin dshare always returns state of the slave pcm,
in pcm_ops->state() which is not correct.

Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
Signed-off-by: Mounesh Sutar <sutar.mounesh@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_dshare.c