It seems that snd_pcm_hw_params_set_* API does not work well any more in the latest ubuntu like 12.04. My tests show that it will freeze the pulseaudio for a while and get into underrun state. And it seems snd_pcm_set_params works better for the same purpose.
It seems that snd_pcm_hw_params_set_* API does not work well any more in the latest ubuntu like 12.04. My tests show that it will freeze the pulseaudio for a while and get into underrun state. And it seems snd_pcm_set_params works better for the same purpose.

This patch also fixes the choppy audio issue for webrtc in ubuntu 12.04.

BUG=152232,153505
TEST=use pepper flash (./out/Debug/chrome -ppapi-flash-path=/your/path/libpepflashplayer.so)
open link http://www.youtube.com/watch?v=F7pYHN9iC9I&feature=youtu.be in two tabs, audio should be good.
uses apprtc.appspot.com to make a loopback call and verify the audio is good on ubuntu 12.04

Review URL: https://chromiumcodereview.appspot.com/11019010

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

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