Fix Linux ALSA error message about failing to query delay.
Fix Linux ALSA error message about failing to query delay.

Don't ask for delay if the pcm state is also SND_PCM_STATE_PREPARED. This causes an I/O error when querying for the delay, which gets logged to the console.

Patch by rtoy@chromium.org:
https://chromiumcodereview.appspot.com/7621077/

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@131834 0039d316-1c4b-4281-b951-d872f2087c98

PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,M4sse/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,ltilve/chromium,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,Just-D/chromium-1,patrickm/chromium.src,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,patrickm/chromium.src,zcbenz/cefode-chromium,littlstar/chromium.src,Just-D/chromium-1,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,robclark/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,anirudhSK/chromium,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,ondra-novak/chromium.src,dednal/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,dednal/chromium.src,jaruba/chromium.src,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,keishi/chromium,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,robclark/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,M4sse/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,keishi/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,markYoungH/chromium.src,nacl-webkit/chrome_deps,dushu1203/chromium.src,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,dednal/chromium.src,robclark/chromium,robclark/chromium,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,robclark/chromium,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,zcbenz/cefode-chromium,ChromiumWebApps/chromium,patrickm/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,ltilve/chromium,anirudhSK/chromium,keishi/chromium,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,jaruba/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,keishi/chromium,dednal/chromium.src,robclark/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,robclark/chromium,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,ltilve/chromium,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,bright-sparks/chromium-spacewalk,keishi/chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,markYoungH/chromium.src,anirudhSK/chromium,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,robclark/chromium,Chilledheart/chromium,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,Just-D/chromium-1,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,dushu1203/chromium.src,Just-D/chromium-1,patrickm/chromium.src,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,ondra-novak/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,ltilve/chromium,ChromiumWebApps/chromium,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,ltilve/chromium,dednal/chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,hujiajie/pa-chromium,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,littlstar/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,keishi/chromium,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,hujiajie/pa-chromium,Just-D/chromium-1,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,ltilve/chromium,M4sse/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,robclark/chromium,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,keishi/chromium,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,keishi/chromium,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,keishi/chromium,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl