alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: stan <stanl@cox.net>
To: alsa-devel@alsa-project.org
Subject: snd_pcm_hw_params_set_format fails with invalid argument
Date: Fri, 3 Aug 2007 11:20:49 -0700	[thread overview]
Message-ID: <20070803112049.7ced76ec@localhost.localdomain> (raw)

Fedora 7 upgraded alsa to 1.0.14 from RC3.  I was going to test the
default device sound for my prior problem (as requested by Takashi
weeks ago). Unfortunately when I try to run my app it won't start.  The
snd_pcm_hw_params_set_format fails when I try to use it as follows.

  err = snd_pcm_hw_params_set_access (alsa_dev, hw_params, ND_PCM_ACCESS_RW_INTERLEAVED);
	if (err < 0)
	{	fprintf (stderr, "cannot set access type (%s)\n", snd_strerror (err)) ;
		goto catch_error ;
		} ;

  err = snd_pcm_hw_params_set_format (alsa_dev, hw_params, SND_PCM_FORMAT_FLOAT64_LE);
  //err = snd_pcm_hw_params_set_format (alsa_dev, hw_params, SND_PCM_FORMAT_S32_LE);
	if (err < 0)
	{	fprintf (stderr, "cannot set sample format (%s)\n", snd_strerror (err)) ;
		goto catch_error ;
		} ;


cannot set sample format (Invalid argument)

It compiles cleanly.  When I replace the SND_PCM_FORMAT_FLOAT64_LE
with the S32_LE, it sets it, but of course the sound is garbage
as it is still receiving doubles.

This code worked fine under RC3.
Is there some change that occurred in the step from 1.0.14.rc3 to
1.0.14 that would explain the above and suggest a fix?

Thank you.

$ uname -r
2.6.22.1-41.fc7

$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31
09:03:25 2007 UTC).

$ ls /proc/asound/card0
ice1724  id  oss_mixer  pcm0c  pcm0p  pcm1p  pcm2p

             reply	other threads:[~2007-08-03 18:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 18:20 stan [this message]
2007-08-05 20:10 ` snd_pcm_hw_params_set_format fails with invalid argument stan
2007-08-06 16:04   ` SOLVED " stan
2007-08-06 16:22     ` stan
2007-08-07 13:38       ` Takashi Iwai
     [not found]         ` <20070807080242.0da2a0ff@localhost.localdomain>
2007-08-07 15:26           ` stan
2007-08-07 15:32             ` stan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070803112049.7ced76ec@localhost.localdomain \
    --to=stanl@cox.net \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).