Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche


< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 >

mercredi 7 octobre 2015

ReactOS 0.4 svn - Qemu 2.4.0.1 + KVM (Tests: Sound AC97 / SMPlayer / Firefox / Opera)

Youtube video

Referring to ReactOS SVN repository I used revision = 69458 for this VM. As quoted from ReactOS Wiki, sound can work only once :(. But at least I can play one video

Script used for this VM

number=69458	
#number=69461

#version=dbg
version=rel

driver="ac97"
#driver="es1370"

# For ES1370
[ "${driver}" = "es1370" ] && {
	echo "AUDIO DRIVER = ${driver}";
	export QEMU_AUDIO_DRV=alsa;
	export QEMU_AUDIO_TIMER_PERIOD=0;
	export QEMU_AUDIO_DAC_FIXED_CHANNELS=2;
	export QEMU_ALSA_DAC_SIZE_IN_USEC=1;
	export QEMU_ALSA_ADC_SIZE_IN_USEC=1;
	export QEMU_ALSA_ADC_BUFFER_SIZE=2176;
}

# For AC97
[ "${driver}" = "ac97" ] && {
	echo "AUDIO DRIVER = ${driver}";
	export QEMU_AUDIO_DRV=alsa;
	export QEMU_ALSA_DAC_SIZE_IN_USEC=1;
	export QEMU_ALSA_DAC_BUFFER_SIZE=4353 ;
	export QEMU_AUDIO_TIMER_PERIOD=100;  
	export QEMU_AUDIO_DAC_FIXED_CHANNELS=1; 
}



/opt/qemu/2.4.0.1/bin/qemu-system-i386  --enable-kvm  \
	-cpu host -m 2047 -smp  4,sockets=1,cores=4,threads=1 \
	-drive file=/dev/xen-vg/React_OS,if=ide,index=0,media=disk,format=raw,cache=writeback \
        --cdrom /opt/CD_DVD_ISO/ReactOS/bootcd-${number}-${version}.iso  \
	-boot order=cd -vga std -global VGA.vgamem_mb=32 -localtime   \
	-net nic,model=rtl8139 -net bridge,br=br0,helper=/opt/qemu/2.4.0.1/libexec/qemu-bridge-helper \
	-soundhw ${driver}  \
	-writeconfig /root/qemu-2.4.0.1_reactos.conf

Options I used for Qemu 2.4.0.1

I wrote this post so I remember which options I used for Qemu.

Options to build

./configure --prefix=/opt/qemu/2.4.0.1/ --sysconfdir=/opt/qemu/2.4.0.1/etc/ --target-list=arm-softmmu,i386-softmmu,x86_64-softmmu \
--enable-kvm --enable-uuid --enable-virtfs --enable-libnfs --enable-libusb --enable-lzo --enable-bzip2 --enable-libiscsi --enable-attr --enable-libssh2 \
--enable-numa --enable-system --enable-guest-base --enable-guest-agent --audio-drv-list=alsa,pa,sdl --enable-cap-ng --enable-modules --enable-netmap \
--enable-user --enable-linux-user --extra-cflags=-I/opt/Sources/QEMU/netmap/sys/ --enable-tcmalloc --enable-gcov --enable-usb-redir --enable-tcg-interpreter \
--enable-xfsctl --enable-gprof --enable-profiler

Network (bridge mode)

I had to add this paramter to /etc/sysctl.conf file (Allow the host system to forward IP packets)
echo "# Require for QEMU/KVM" >> /etc/sysctl.conf
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
To take into account this parameter above without rebooting
sudo sysctl -p
Here is my /etc/network/interfaces file
root@amdgaming:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual


#################
# bridge + dhcp #
#################
auto br0
iface br0 inet dhcp
	bridge_ports eth0
        bridge_stp off
        bridge_fd off
        bridge_maxwait 0
After that
mkdir -pv /opt/qemu/2.4.0.1/etc/qemu/
echo "allow br0" > /opt/qemu/2.4.0.1/etc/qemu/bridge.conf

Wine-Staging 1.7.51 and 1.7.52 / Gallium Nine / Sources to Download

Listed in table below are sources for both Wine-Staging 1.7.51 and Wine-Staging 1.7.52 already patched with Gallium Nine

Wine-Staging Version Download
1.7.52 Wine-Staging-1.7.52_GalliumNine.tar.bz2
1.7.51 Wine-Staging-1.7.51_GalliumNine.tar.bz2

mardi 6 octobre 2015

QEMU 2.4.0.1 - Audio help

1. About options

Options are settable through environment variables.

Example:
  export QEMU_AUDIO_DRV=wav
  export QEMU_WAV_PATH=$HOME/tune.wa
v (for csh replace export with setenv in the above)
  qemu ...

2. Audio options

ParameterTypeDefault ValueDescription
QEMU_AUDIO_DAC_FIXED_SETTINGSboolean1Use fixed settings for host DAC
QEMU_AUDIO_DAC_FIXED_FREQinteger44100Frequency for fixed host DAC
QEMU_AUDIO_DAC_FIXED_FMTformat S16 One ofU8 S8 U16 S16 U32 S32 - Format for fixed host DAC
QEMU_AUDIO_DAC_FIXED_CHANNELSinteger 2 Number of channels for fixed DAC (1 - mono,2 - stereo)
QEMU_AUDIO_DAC_VOICESinteger1Number of voices for DAC
QEMU_AUDIO_DAC_TRY_POLLboolean1Attempt using poll mode for DAC
QEMU_AUDIO_ADC_FIXED_SETTINGSboolean1Use fixed settings for host ADC
QEMU_AUDIO_ADC_FIXED_FREQinteger44100Frequency for fixed host ADC
QEMU_AUDIO_ADC_FIXED_FMTformat S16 One of U8 S8 U16 S16 U32 S32 - Format for fixed host ADC
QEMU_AUDIO_ADC_FIXED_CHANNELSinteger 2Number of channels for fixed ADC (1 - mono , 2 - stereo)
QEMU_AUDIO_ADC_VOICESinteger 1Number of voices for ADC
QEMU_AUDIO_ADC_TRY_POLLboolean 1Attempt using poll mode for ADC
QEMU_AUDIO_TIMER_PERIODinteger 100Timer period in HZ (0 - use lowest possible)

3. Available drivers:

3.a) ALSA

Description: ALSA http://www.alsa-project.org

  • Theoretically supports many playback voices
  • Theoretically supports many capture voices.
ParameterTypeDefault ValueDescription
QEMU_ALSA_DAC_SIZE_IN_USECboolean0DAC period/buffer size in microseconds (otherwise in frames)
QEMU_ALSA_DAC_PERIOD_SIZEinteger 1024DAC period size (0 to go with system default)
QEMU_ALSA_DAC_BUFFER_SIZEinteger4096DAC buffer size (0 to go with system default)
QEMU_ALSA_ADC_SIZE_IN_USECboolean 0ADC period/buffer size in microseconds (otherwise in frames)
QEMU_ALSA_ADC_PERIOD_SIZEinteger 0ADC period size (0 to go with system default)
QEMU_ALSA_ADC_BUFFER_SIZEinteger 0ADC buffer size (0 to go with system default)
QEMU_ALSA_THRESHOLDinteger0(undocumented)
QEMU_ALSA_DAC_DEVstring defaultDAC device name (for instance dmix)
QEMU_ALSA_ADC_DEVstring defaultADC device name

3.b) PA (Pulse Audio)

Name: pa Description: http://www.pulseaudio.org/

  • Theoretically supports many playback voices
  • Theoretically supports many capture voices
ParameterTypeDefault ValueDescription
QEMU_PA_SAMPLESinteger4096buffer size in samples
QEMU_PA_SERVERstring(not set)server address
QEMU_PA_SINKstring(not set)sink device name
QEMU_PA_SOURCEstring(not set)source device name

3.c) SDL

Name: sdl Description: SDL http://www.libsdl.org

  • One playback voice
  • Does not support capture
ParameterTypeDefault ValueDescription
QEMU_SDL_SAMPLESinteger 1024Size of SDL buffer in samples

3.d) None

Name: none Description: Timer based audio emulation

  • Theoretically supports many playback voices
  • Theoretically supports many capture voices
3.e) WAV

Name: wav Description: WAV renderer http://wikipedia.org/wiki/WAV

  • One playback voice
  • Does not support capture
ParameterTypeDefault ValueDescription
QEMU_WAV_FREQUENCYinteger44100Frequency
QEMU_WAV_FORMATformat S16 (one of: U8 S8 U16 S16 U32 S32) Format
QEMU_WAV_DAC_FIXED_CHANNELSinteger 2Number of channels (1 - mono, 2 - stereo)
QEMU_WAV_PATHstringqemu.wavPath to wave file

4. Help from Linux shell

Use option -audio-help to get help shown below

root@amdgaming:~# /opt/qemu/2.4.0.1/bin/qemu-system-i386 -audio-help
Audio options:
  QEMU_AUDIO_DAC_FIXED_SETTINGS: boolean, default = 1
    Use fixed settings for host DAC
  QEMU_AUDIO_DAC_FIXED_FREQ: integer, default = 44100
    Frequency for fixed host DAC
  QEMU_AUDIO_DAC_FIXED_FMT: format, default = S16, (one of: U8 S8 U16 S16 U32 S32)
    Format for fixed host DAC
  QEMU_AUDIO_DAC_FIXED_CHANNELS: integer, default = 2
    Number of channels for fixed DAC (1 - mono, 2 - stereo)
  QEMU_AUDIO_DAC_VOICES: integer, default = 1
    Number of voices for DAC
  QEMU_AUDIO_DAC_TRY_POLL: boolean, default = 1
    Attempt using poll mode for DAC
  QEMU_AUDIO_ADC_FIXED_SETTINGS: boolean, default = 1
    Use fixed settings for host ADC
  QEMU_AUDIO_ADC_FIXED_FREQ: integer, default = 44100
    Frequency for fixed host ADC
  QEMU_AUDIO_ADC_FIXED_FMT: format, default = S16, (one of: U8 S8 U16 S16 U32 S32)
    Format for fixed host ADC
  QEMU_AUDIO_ADC_FIXED_CHANNELS: integer, default = 2
    Number of channels for fixed ADC (1 - mono, 2 - stereo)
  QEMU_AUDIO_ADC_VOICES: integer, default = 1
    Number of voices for ADC
  QEMU_AUDIO_ADC_TRY_POLL: boolean, default = 1
    Attempt using poll mode for ADC
  QEMU_AUDIO_TIMER_PERIOD: integer, default = 100
    Timer period in HZ (0 - use lowest possible)

Available drivers:
Name: alsa
Description: ALSA http://www.alsa-project.org
Theoretically supports many playback voices
Theoretically supports many capture voices
Options:
  QEMU_ALSA_DAC_SIZE_IN_USEC: boolean, default = 0
    DAC period/buffer size in microseconds (otherwise in frames)
  QEMU_ALSA_DAC_PERIOD_SIZE: integer, default = 1024
    DAC period size (0 to go with system default)
  QEMU_ALSA_DAC_BUFFER_SIZE: integer, default = 4096
    DAC buffer size (0 to go with system default)
  QEMU_ALSA_ADC_SIZE_IN_USEC: boolean, default = 0
    ADC period/buffer size in microseconds (otherwise in frames)
  QEMU_ALSA_ADC_PERIOD_SIZE: integer, default = 0
    ADC period size (0 to go with system default)
  QEMU_ALSA_ADC_BUFFER_SIZE: integer, default = 0
    ADC buffer size (0 to go with system default)
  QEMU_ALSA_THRESHOLD: integer, default = 0
    (undocumented)
  QEMU_ALSA_DAC_DEV: string, default = default
    DAC device name (for instance dmix)
  QEMU_ALSA_ADC_DEV: string, default = default
    ADC device name

Name: pa
Description: http://www.pulseaudio.org/
Theoretically supports many playback voices
Theoretically supports many capture voices
Options:
  QEMU_PA_SAMPLES: integer, default = 4096
    buffer size in samples
  QEMU_PA_SERVER: string, default = (not set)
    server address
  QEMU_PA_SINK: string, default = (not set)
    sink device name
  QEMU_PA_SOURCE: string, default = (not set)
    source device name

Name: sdl
Description: SDL http://www.libsdl.org
One playback voice
Does not support capture
Options:
  QEMU_SDL_SAMPLES: integer, default = 1024
    Size of SDL buffer in samples

Name: none
Description: Timer based audio emulation
Theoretically supports many playback voices
Theoretically supports many capture voices
No options

Name: wav
Description: WAV renderer http://wikipedia.org/wiki/WAV
One playback voice
Does not support capture
Options:
  QEMU_WAV_FREQUENCY: integer, default = 44100
    Frequency
  QEMU_WAV_FORMAT: format, default = S16, (one of: U8 S8 U16 S16 U32 S32)
    Format
  QEMU_WAV_DAC_FIXED_CHANNELS: integer, default = 2
    Number of channels (1 - mono, 2 - stereo)
  QEMU_WAV_PATH: string, default = qemu.wav
    Path to wave file

Options are settable through environment variables.
Example:
  export QEMU_AUDIO_DRV=wav
  export QEMU_WAV_PATH=$HOME/tune.wav
(for csh replace export with setenv in the above)
  qemu ...