Hello Jaroslav, Thanks to you (and to Vladimir) I understand better now why I need plughw to play 24bits files. If it's not taking too much of your time, I'd have one more question: When I try to play a 24bits/192KHz file using plughw, aplay -v displays the data below, without any error message, but nothing is sent to the DAC. Is this because the Xonar DX Linux driver does not take in account 192KHz sounds ? But in that case why Alsa does not report any error message ? Pierre $ aplay -v -D plughw:0,1 Example-192k.WAV Playing WAVE 'Example-192k.WAV' : Signed 24 bit Little Endian in 3bytes, Rate 192000 Hz, Stereo Plug PCM: Linear conversion PCM (S32_LE) Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S24_3LE subformat : STD channels : 2 rate : 192000 exact rate : 192000 (192000/1) msbits : 24 buffer_size : 16384 period_size : 4096 period_time : 21333 tstamp_mode : NONE period_step : 1 avail_min : 4096 period_event : 0 start_threshold : 16384 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 1073741824 Slave: Hardware PCM card 0 'Xonar DX' device 1 subdevice 0 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S32_LE subformat : STD channels : 2 rate : 192000 exact rate : 192000 (192000/1) msbits : 24 buffer_size : 16384 period_size : 4096 period_time : 21333 tstamp_mode : NONE period_step : 1 avail_min : 4096 period_event : 0 start_threshold : 16384 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 1073741824 appl_ptr : 0 hw_ptr : 0 $ On 06/21/2011 02:46 PM, Jaroslav Kysela wrote: > Date 21.6.2011 13:55, Pierre Habraken wrote: >> On 06/20/2011 10:06 PM, alsa-user-request@xxxxxxxxxxxxxxxxxxxxx wrote: >>> >>> Date: Mon, 20 Jun 2011 22:34:46 +0400 >>> From: Vladimir Mosgalin<mosgalin@xxxxxxxxxxxxxxx> >>> Subject: Re: plughw versus hw >>> To: alsa-user@xxxxxxxxxxxxxxxxxxxxx >>> Message-ID:<20110620183446.GA14919@xxxxxxxxxxxxxxx> >>> Content-Type: text/plain; charset=us-ascii >>> >>> Hi Pierre Habraken! >>> >>> On 2011.06.20 at 19:32:28 +0200, Pierre Habraken wrote next: >>> >>>> I can imagine that this is a FAQ, but I could not find a clear answer : >>>> which precise difference(s) distinguish(es) plughw and hw from each other ? >>>> Does plughw apply sound processing that hw does not ? >>> >>> plughw *might* apply simple sound processing if needed, mostly channels >>> conversion and rate conversion if required. It doesn't have to apply >>> processing. >>> hw doesn't support such processing only works when operating strictly in >>> mode that audio card support. >>> >>> If you have device that supports only 2 channel, 16 bit 48000 mode then >>> "hw" device won't be able to playback 2/16/44100 stream, or mono stream >>> for example; you'll get an error when you try. But plughw will accept >>> such streams and do the conversion. However, if you use plughw and >>> output 2/16/48000 stream then no conversion is needed and most likely >>> plughw won't be doing any processing. >>> >>> Note that using both hw and plughw can lead to specific problems, so >>> it's best to use "default" device unless you have very specific >>> requirements. >> >> Hello Vladimir, >> >> Thank you for your reply. >> >> I just bought an Asus Xonar DX sound card, for sending 24bits/96KHz >> stereo flac files to an external DAC. >> I am using Alsa 1.0.21 on a PC running Ubuntu 10.04 with Linux kernel >> 2.6.32-32. >> Running aplay, I can't use hw for reading 24/96 files: >> >> $ aplay -D hw:0,1 Prelude.wav >> Playing WAVE 'Prelude.wav' : Signed 24 bit Little Endian in 3bytes, Rate >> 96000 Hz, Stereo >> aplay: set_params:990: Sample format non available >> Available formats: >> - S16_LE >> - S32_LE >> $ >> >> Adding the switch -f S32_LE does not help: >> >> $ aplay -D hw:0,1 -f S32_LE Prelude.wav >> Warning: format is changed to S24_3LE >> Playing WAVE 'Prelude.wav' : Signed 24 bit Little Endian in 3bytes, Rate >> 96000 Hz, Stereo >> aplay: set_params:990: Sample format non available >> Available formats: >> - S16_LE >> - S32_LE >> $ >> >> If I use plughw instead of hw, it works fine: >> >> $ aplay -D plughw:0,1 Prelude.wav >> Playing WAVE 'Prelude.wav' : Signed 24 bit Little Endian in 3bytes, Rate >> 96000 Hz, Stereo >> ^CAborted by signal Interrupt... >> $ >> >> Does it mean that the 24bits stream has to be converted to 16bits before >> being sent to the device and then to the DAC ? > > No, use 'aplay -v' to see all plugins used by plughw. Your hw supports > 24-bit samples encoded in the 32-bit words. So alsa-lib does 3-byte to > 4-byte conversion of 24-bit samples - audio bits are not lost. ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user