All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Azizul Hakim <azizulfahim2002@gmail.com>, alsa-devel@alsa-project.org
Subject: Re: How to Configure Appropriate runtime->hw in ALSA	Driver
Date: Sun, 05 Jul 2015 19:20:04 +0200	[thread overview]
Message-ID: <55996744.7040201@ladisch.de> (raw)
In-Reply-To: <CA+k7WwaxTObWDjn-7SqPkzTNNgf9+ManyT3mk8wDxLZZzn5OYQ@mail.gmail.com>

Azizul Hakim wrote:
> What is the best way to set the *runtime->hw* parameter in ALSA driver.

Set it to the capabilities of your hardware.

> From sample ALSA driver tutorial I understand we have to declare a
> *structure snd_pcm_hardware*  where we define all sound parameters
> like *STEREO/MONO,
> RATES* etc. Now at run time we can play sound files of different
> parameters. How ALSA behaves if the audio file parameters doesn't match
> with the *structure_snd_pcm_hardware* parameters?

Applications are not able to set unsupported parameter values.

However, alsa-lib can automatically convert rates/formats.

> If we want our driver to play any sound file

Your driver is supposed to driver your hardware.
What would you do with an unsupported format?


Regards,
Clemens

      reply	other threads:[~2015-07-05 17:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-05  6:42 How to Configure Appropriate runtime->hw in ALSA Driver Azizul Hakim
2015-07-05 17:20 ` Clemens Ladisch [this message]

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=55996744.7040201@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=azizulfahim2002@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.