Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > aplay calls the ALSA API in the obvious way, just like > speaker-test, so I'm not sure why one works and one does not. I > suspect there might be a bug in the ALSA framework. > Do you have an idea how to find and fix this bug? I would really appreciate it. If I can help by testing something just let me know. Best regards, Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcf5t4ACgkQjz8jfoq989eHjACfa9useatS+8Yc30F9iQu2jBgn l+kAn11N5QR1ebG80o7swQlRY0VMBSJA =SFhb -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
Hauke Westemeier wrote: > the people of HifiBerry told me (see linked thread) that there is no > "THE driver" and therefore I can not provide its source code. Well, the source code files appear to be: sound/soc/bcm/hifiberry_dacplus.c sound/soc/bcm/bcm2835-i2s.c sound/soc/codecs/pcm512x.c As far as I can tell, there is nothing wrong with how these drivers handle the number of channels. > What I know that > speaker-test -t wav -c 2 > and > mplayer -ao alsa:device=hw=1.0 /usr/share/sounds/alsa/Front_Right.wav > work but > aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Right.wav > and > aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav > don't. > So for me it looks like there is something wrong with aplay. mplayer does its own sample conversion. aplay calls the ALSA API in the obvious way, just like speaker-test, so I'm not sure why one works and one does not. I suspect there might be a bug in the ALSA framework. Regards, Clemens -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, the people of HifiBerry told me (see linked thread) that there is no "THE driver" and therefore I can not provide its source code. What I know that speaker-test -t wav -c 2 and mplayer -ao alsa:device=hw=1.0 /usr/share/sounds/alsa/Front_Right.wav work but aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Right.wav and aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav don't. So for me it looks like there is something wrong with aplay. Because if there would be a fundamental problem with the driver, how could the other two programs (speaker-test is even bundled with aplay so I assume they don't do some crazy stuff) work? As aplay is used as default player in many places (e.g. in the text-to-speach-program I'm using) I would really appreciate if aplay would work too. I'm not an expert, therefor I can't check the code my self but if there is anything I can test to help to fix it, just let me know. Kind regards, Hauke Am 21.04.2016 um 02:46 schrieb Hauke Westemeier: > > > Hi, > > I just read in > https://www.hifiberry.com/guides/configuring-linux-3-18-x/ "Note > that aplayer won’t convert files that are in a format that is not > natively supported from our drivers. (e.g. mono files or different > sample rates)." which seems to be exactly my issue (sorry that I > didn't see it before). As other steps of the linked tutorial are > not longer needed (and aplay should in principle be able to do it > by plughw) maybe there is also a way to get rid of this limitation. > I would really appreciate it. > > Kind regards, > > Hauke > > > > > Am 21.04.2016 um 02:27 schrieb Hauke Westemeier: > > Where can I find the source code of the driver? Which driver? > >>> Whatever driver you're using. See /proc/asound/modules. (I'm >>> asking because it does not appear to be part of the official >>> Linus Linux kernel.) > > >> cat /proc/asound/modules 0 snd_bcm2835 1 >> snd_soc_hifiberry_dacplus > >> But I don't have the source code of the driver (if I understand >> it right it is part of the kernel). I opened a thread in the >> HifiBerry forum >> https://support.hifiberry.com/hc/en-us/community/posts/206636389-Setup-issues-and-problem-with-aplay-channels- > >> > > . Maybe they can give helpful comments too. >> But of course I'm still open for your suggestions. > >> Kind regards, > >> Hauke > > >> -- > >> > > Find and fix application performance issues faster with > Applications Manager >> Applications Manager provides deep performance insights into >> multiple tiers of your business applications. It resolves >> application problems quickly and reduces your MTTR. Get your >> free trial! >> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z >> ___ Alsa-user >> mailing list Alsa-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/alsa-user > > -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcbWrgACgkQjz8jfoq989eIgwCeJ6CeHrk+VUfwidBM4jbuJPzQ NrkAnjtmZ8UNnLrZWnbtVc1fk7eoX2m/ =p9Ue -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I just read in https://www.hifiberry.com/guides/configuring-linux-3-18-x/ "Note that aplayer won’t convert files that are in a format that is not natively supported from our drivers. (e.g. mono files or different sample rates)." which seems to be exactly my issue (sorry that I didn't see it before). As other steps of the linked tutorial are not longer needed (and aplay should in principle be able to do it by plughw) maybe there is also a way to get rid of this limitation. I would really appreciate it. Kind regards, Hauke Am 21.04.2016 um 02:27 schrieb Hauke Westemeier: > Where can I find the source code of the driver? >>> >>> Which driver? > >> Whatever driver you're using. See /proc/asound/modules. (I'm >> asking because it does not appear to be part of the official >> Linus Linux kernel.) > > > cat /proc/asound/modules 0 snd_bcm2835 1 snd_soc_hifiberry_dacplus > > But I don't have the source code of the driver (if I understand it > right it is part of the kernel). I opened a thread in the HifiBerry > forum > https://support.hifiberry.com/hc/en-us/community/posts/206636389-Setup-issues-and-problem-with-aplay-channels- > > . Maybe they can give helpful comments too. > But of course I'm still open for your suggestions. > > Kind regards, > > Hauke > > > -- > > Find and fix application performance issues faster with Applications Manager > Applications Manager provides deep performance insights into > multiple tiers of your business applications. It resolves > application problems quickly and reduces your MTTR. Get your free > trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > ___ Alsa-user mailing > list Alsa-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-user > -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcYIrwACgkQjz8jfoq989ca7wCcD4rCW+PYex2Rdv2D4rd4klRt 2jUAnjievEjbBp4+d5hAI/4Eoef3R68B =shK5 -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >>> Where can I find the source code of the driver? >> >> Which driver? > > Whatever driver you're using. See /proc/asound/modules. > (I'm asking because it does not appear to be part of the official > Linus Linux kernel.) > cat /proc/asound/modules 0 snd_bcm2835 1 snd_soc_hifiberry_dacplus But I don't have the source code of the driver (if I understand it right it is part of the kernel). I opened a thread in the HifiBerry forum https://support.hifiberry.com/hc/en-us/community/posts/206636389-Setup-issues-and-problem-with-aplay-channels- . Maybe they can give helpful comments too. But of course I'm still open for your suggestions. Kind regards, Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcYHo0ACgkQjz8jfoq989e1PgCdHQBNs+tGneM5GBqlB/qDa7mW 6cwAnRDXo7a6z6iWy0tKorUixWXkrSYQ =vPsH -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
Hauke Westemeier wrote: >> Are there any error messages in the system log? > > [38928.967567] pcm512x 1-004d: No SCLK, using BCLK: -2 > is added to > /var/log/syslog > According to > https://support.hifiberry.com/hc/en-us/community/posts/201847081-No-SCLK-using-BCLK-2 > this is normal. > Are there any other log files I should have a look at? No. >> Where can I find the source code of the driver? > > Which driver? Whatever driver you're using. See /proc/asound/modules. (I'm asking because it does not appear to be part of the official Linus Linux kernel.) Regards, Clemens -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Are there any error messages in the system log? Every time I run aplay /usr/share/sounds/alsa/Front_Center.wav (and get the error) [38928.967567] pcm512x 1-004d: No SCLK, using BCLK: -2 is added to /var/log/syslog According to https://support.hifiberry.com/hc/en-us/community/posts/201847081-No-SCLK-using-BCLK-2 this is normal. Are there any other log files I should have a look at? > Where can I find the source code of the driver? Which driver? I didn't install any driver (as speaker-test and mpg123 worked directly I didn't think that I need any driver to play a simple wav file?) Kind regards, Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcXSeYACgkQjz8jfoq989f5vQCePu/Rax+OLD/xpbHUKBSr8g1d 2SEAniirHTtlgKWG0BSxABRBHJFfdkk2 =nIis -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
Hauke Westemeier wrote: > aplay -v -D plug:stereoonly /usr/share/sounds/alsa/Front_Center.wav > Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little > Endian, Rate 48000 Hz, Mono > Plug PCM: Route conversion PCM (sformat=S16_LE) > Transformation table: > 0 <- 0 > 1 <- 0 This is the automatic mono->stereo conversion. > Its setup is: > ... > channels : 1 > ... > Slave: Hardware PCM card 0 'bcm2835 ALSA' device 0 subdevice 0 > Its setup is: > ... > channels : 2 > ... > If I set it for the external sound card by changing "card 0" to "card 1" > aplay -v -D plug:stereoonly /usr/share/sounds/alsa/Front_Center.wav > still gives the error > > Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little > Endian, Rate 48000 Hz, Mono > aplay: set_params:1297: Unable to install hw params: This might be a problem unrelated to the number of channels. Are there any error messages in the system log? Where can I find the source code of the driver? Regards, Clemens -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > > Please try putting this into your ~/.asoundrc: > > pcm.stereoonly { type hw card 0 channels 2 } > > and then running "aplay -v -D plug:stereoonly > /.../Front_Center.wav". Does it work? Does it expand the file to > two channels? > I did so and could hear the sound out of the internal sound card and there is no error message that the conversion into two channells did not work: aplay -v -D plug:stereoonly /usr/share/sounds/alsa/Front_Center.wav Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono Plug PCM: Route conversion PCM (sformat=S16_LE) Transformation table: 0 <- 0 1 <- 0 Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat: STD channels : 1 rate : 48000 exact rate : 48000 (48000/1) msbits : 16 buffer_size : 16384 period_size : 4096 period_time : 85333 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 'bcm2835 ALSA' device 0 subdevice 0 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S16_LE subformat: STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 16 buffer_size : 16384 period_size : 4096 period_time : 85333 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 If I set it for the external sound card by changing "card 0" to "card 1" aplay -v -D plug:stereoonly /usr/share/sounds/alsa/Front_Center.wav still gives the error Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono aplay: set_params:1297: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 16 CHANNELS: 1 RATE: 48000 PERIOD_TIME: 125000 PERIOD_SIZE: 6000 PERIOD_BYTES: 12000 PERIODS: 4 BUFFER_TIME: 50 BUFFER_SIZE: 24000 BUFFER_BYTES: 48000 TICK_TIME: 0 Kind regards, Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcWsVQACgkQjz8jfoq989ckEACdE4cZQyPb/RGyD1nvs8J118U/ IRoAn2AySIljwyO8pwDiEtrJRzZwsaOT =8B9V -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
Hauke Westemeier wrote: >> "Front Right" is the name of the channel. There could be other >> channels such as "Side Right", "Back Right"; and the channel in >> the front would be called "Center". > > So although the file is called Front_Right.wav aplay should play it on > both of my channels the same signal at the same time (as it is mono > and plughw sends it to both of my channels), correct? Yes. > Just for completeness, I tried > aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Left.wav > and then I can hear the sound out of the internal sound card (as > expected). So the aplay and the wav-file are not completely broken. The internal sound device actually supports mono. I don't know why the mono->stereo expansion does not work. This should be handled automatically by the plug plugin. It would be possible to explicitly disable this when compiling alsa-lib, but Debian does not do this. Please try putting this into your ~/.asoundrc: pcm.stereoonly { type hw card 0 channels 2 } and then running "aplay -v -D plug:stereoonly /.../Front_Center.wav". Does it work? Does it expand the file to two channels? Regards, Clemens -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > "Front Right" is the name of the channel. There could be other > channels such as "Side Right", "Back Right"; and the channel in > the front would be called "Center". So although the file is called Front_Right.wav aplay should play it on both of my channels the same signal at the same time (as it is mono and plughw sends it to both of my channels), correct? > How exactly did you compile alsa-lib? If you're using a > distribution, where can I find the scripts used to compile > alsa-lib? > I didn't compile it my self. I'm using Raspbian Jessie as distribution. It is based on the Debian distribution of the same name. I started with 2015-11-21 but run sudo apt-get update && sudo apt-get dist-upgrade regularly so most of the system should be up to date. If I check aplay --version I get aplay: version 1.0.28 by Jaroslav Kysela Do you think it is worth a try to compile alsa 1.1.1? As a non-expert I tried to avoid it till now. Just for completeness, I tried aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Left.wav and then I can hear the sound out of the internal sound card (as expected). So the aplay and the wav-file are not completely broken. Kind regards, Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcVaA0ACgkQjz8jfoq989frxACeIIJxV1W3ExwfzK2OpOoVycM7 14EAnRUrLmjeZA/p2wGx27SVvtSqT6gK =uOa7 -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
Hauke Westemeier wrote: > /usr/share/sounds/alsa/Front_Right.wav > how can it actually have front and right information in just one channel? "Front Right" is the name of the channel. There could be other channels such as "Side Right", "Back Right"; and the channel in the front would be called "Center". > Device: hw:1 (type: HW) > Access types: RW_INTERLEAVED > Formats: S16_LE S24_LE S32_LE > Channels: 2 > Sample rates: 8000 11025 16000 22050 32000 44100 48000 64000 88200 96000 > 176400 192000 > Interrupt interval: 20-8192000 us > Buffer time: 41-16384000 us > > The Device: hw:1 only reports "Channels: 2" (and not "Channels: 1 2"). > > Naively I assumed that when using > aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav > the mono signal is split up in two identical signals that are then > send two both channels. In theory, that is what should happen. How exactly did you compile alsa-lib? If you're using a distribution, where can I find the scripts used to compile alsa-lib? Regards, Clemens -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was away at the weekend, therefore I can only reply today. > Try running this program: > http://download.atmark-techno.com/misc/demos/usb-audio-a500-howto/hw_params.c > Does it report one channel? ./hw_params PLAYBACK Device: hw:0 (type: HW) Access types: MMAP_INTERLEAVED RW_INTERLEAVED Formats: U8 S16_LE Channels: 1 2 Sample rates: 8000-48000 Interrupt interval: 5333-8192000 us Buffer time: 5333-8192000 us Device: hw:1 (type: HW) Access types: RW_INTERLEAVED Formats: S16_LE S24_LE S32_LE Channels: 2 Sample rates: 8000 11025 16000 22050 32000 44100 48000 64000 88200 96000 176400 192000 Interrupt interval: 20-8192000 us Buffer time: 41-16384000 us CAPTURE The external card HifiBerry is card 1 (device 0). The Device: hw:1 only reports "Channels: 2" (and not "Channels: 1 2"). This matches the error "Channels count non available" if I just run aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Right.wav (as the mono file has just 1 channel [how can it actually have front and right information in just one channel?] but the card only supports 2) Naively I assumed that when using aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav the mono signal is split up in two identical signals that are then send two both channels. What can I do to make it work? Kind regards, Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcT7YoACgkQjz8jfoq989dkHQCeLgjJN+r0UgsQzcnmcPnaz/2N G7cAn05nBkjKAFNkTH+U3DtB+h8HWZya =P0Yi -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
Hauke Westemeier wrote: > The differences to the values prompted in the error of > aplay /usr/share/sounds/alsa/Front_Right.wav > seem to be the number of channels and period_size and buffer_size. > If I just run speaker test with one channel (default) > speaker-test -t wav > I also get a similar error like aplay: > ... > Unable to set hw params for playback: Invalid argument > > So the problem seems to be the number of channels. I therefore tried > to also set it explicitly for aplay but > aplay --channels=2 /usr/share/sounds/alsa/Front_Right.wav > still didn't work and gave "CHANNELS: 1" in the error. aplay always uses the actual format of the file. The plughw plugin (which is also used by the default device) automatically converts to a sample format that is (claimed to be) actually supported by the hardware. Try running this program: http://download.atmark-techno.com/misc/demos/usb-audio-a500-howto/hw_params.c Does it report one channel? Regards, Clemens -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The content of /proc/asound/card0/pcm0p/sub0/hw_params is just "closed". This is as expected as the HifiBerry card is card1, its parameters given in /proc/asound/card1/pcm0p/sub0/hw_params are access: RW_INTERLEAVED format: S16_LE subformat: STD channels: 2 rate: 48000 (48000/1) period_size: 32768 buffer_size: 131072 The differences to the values prompted in the error of aplay /usr/share/sounds/alsa/Front_Right.wav seem to be the number of channels and period_size and buffer_size. If I just run speaker test with one channel (default) speaker-test -t wav I also get a similar error like aplay: speaker-test 1.0.28 Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels WAV file(s) Rate set to 48000Hz (requested 48000Hz) Buffer size range from 16 to 131072 Period size range from 8 to 65536 Using max buffer size 131072 Periods = 4 Unable to set hw params for playback: Invalid argument Setting of hwparams failed: Invalid argument So the problem seems to be the number of channels. I therefore tried to also set it explicitly for aplay but aplay --channels=2 /usr/share/sounds/alsa/Front_Right.wav still didn't work and gave "CHANNELS: 1" in the error. I hope that there is a way to fix it because it is a bit wired, that I can play mp3 files etc but no simple wav files. Kind regards, Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcQn3UACgkQjz8jfoq989c71ACfdBx0K73m/ftMuKy+sgM/733B ijIAni5JGaQCWTxC4EUUQuu7rUboY94P =Yq18 -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
Hauke Westemeier wrote: > aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav > > gives > > Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little > Endian, Rate 48000 Hz, Mono > aplay: set_params:1297: Unable to install hw params: > ... > > So the same like if I just called > aplay /usr/share/sounds/alsa/Front_Right.wav > > What else could explain the difference to the working > speaker-test -t wav -c 2 > ? What parameters is speaker-test using? (see /proc/asound/cardX/pcm0p/sub0/hw_params while it's running) Anyway, it appears the driver does not work well with aplay: https://support.hifiberry.com/hc/en-us/articles/205322332-Playing-test-sounds Regards, Clemens -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav gives Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono aplay: set_params:1297: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 16 CHANNELS: 1 RATE: 48000 PERIOD_TIME: 125000 PERIOD_SIZE: 6000 PERIOD_BYTES: 12000 PERIODS: 4 BUFFER_TIME: 50 BUFFER_SIZE: 24000 BUFFER_BYTES: 48000 TICK_TIME: 0 So the same like if I just called aplay /usr/share/sounds/alsa/Front_Right.wav What else could explain the difference to the working speaker-test -t wav -c 2 ? Kind regards, Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcQH/IACgkQjz8jfoq989e/2QCeLLTQ/oNEQ8Z1igofvXD1sGvM NNUAn0fZh1FiJU5BaJzbQgB+Igxa4aKy =S4Fz -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] speaker-test works but a aplay does not
Hauke Westemeier wrote: > If I run > speaker-test -t wav -c 2 > everything works fine and I can hear the voice. > > aplay /usr/share/sounds/alsa/Front_Right.wav > Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little > Endian, Rate 48000 Hz, Mono > aplay: set_params:1297: Unable to install hw params: > > aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Right.wav > Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little > Endian, Rate 48000 Hz, Mono > aplay: set_params:1239: Channels count non available Does "-D plughw:1,0" work? If yes, are there any other definitions in /etc/asound.conf or ~/.asoundrc? Regards, Clemens -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
[Alsa-user] speaker-test works but a aplay does not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a Raspberry Pi 2 Model B running on Raspbian Jessie. My sound card is a HiFiBerry DAC+. It seems to be detected by alsa: aplay -l List of PLAYBACK Hardware Devices card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 To make it the default output I've set /etc/asound.conf to defaults.pcm.card 1 defaults.ctl.card 1 If I run speaker-test -t wav -c 2 everything works fine and I can hear the voice. But If I e.g. run aplay /usr/share/sounds/alsa/Front_Right.wav I get no audio outpubt but Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono aplay: set_params:1297: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 16 CHANNELS: 1 RATE: 48000 PERIOD_TIME: 125000 PERIOD_SIZE: 6000 PERIOD_BYTES: 12000 PERIODS: 4 BUFFER_TIME: 50 BUFFER_SIZE: 24000 BUFFER_BYTES: 48000 TICK_TIME: 0 I then tried aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Right.wav which gave Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono aplay: set_params:1239: Channels count non available I'm not an expert in also so any help is appreciated. Already many thanks! Hauke -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlcOzj8ACgkQjz8jfoq989csBwCfV6CeUjsStb1KMKYamnbO0fe4 ciIAnRsg8OCfZh89PSiz3CLcCGpDoKio =mzRS -END PGP SIGNATURE- -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user