From: Wu Fengguang <fengguang.wu@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Wu Fengguang <fengguang.wu@intel.com>
Subject: [PATCH 1/5] allow up to 32 PCM devices
Date: Wed, 12 May 2010 09:30:16 +0800 [thread overview]
Message-ID: <20100512015713.762299923@intel.com> (raw)
In-Reply-To: 20100512013015.752623810@intel.com
[-- Attachment #1: alsa-minor.patch --]
[-- Type: text/plain, Size: 2469 bytes --]
Reserve 32 minor numbers for PCM playback devices.
The Intel SandyBridge HDMI audio codec provides 3 PCM devices with
indices 3, 7, 8. Among which the device 8's minor number will be
overlapped with the first capture device's minor number in the current
static minor number allocation scheme.
Also increase SNDRV_PCM_DEVICES to make pcm_dev_bits big enough to hold
the increasing number of PCM devices.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
include/sound/minors.h | 16 ++++++++--------
include/sound/pcm.h | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
--- sound-2.6.orig/include/sound/minors.h 2010-04-16 16:03:28.000000000 +0800
+++ sound-2.6/include/sound/minors.h 2010-05-11 13:02:48.000000000 +0800
@@ -23,23 +23,23 @@
#define SNDRV_OS_MINORS 256
-#define SNDRV_MINOR_DEVICES 32
-#define SNDRV_MINOR_CARD(minor) ((minor) >> 5)
-#define SNDRV_MINOR_DEVICE(minor) ((minor) & 0x001f)
-#define SNDRV_MINOR(card, dev) (((card) << 5) | (dev))
+#define SNDRV_MINOR_DEVICES 64
+#define SNDRV_MINOR_CARD(minor) ((minor) >> 6)
+#define SNDRV_MINOR_DEVICE(minor) ((minor) & 0x003f)
+#define SNDRV_MINOR(card, dev) (((card) << 6) | (dev))
/* these minors can still be used for autoloading devices (/dev/aload*) */
#define SNDRV_MINOR_CONTROL 0 /* 0 */
#define SNDRV_MINOR_GLOBAL 1 /* 1 */
-#define SNDRV_MINOR_SEQUENCER (SNDRV_MINOR_GLOBAL + 0 * 32)
-#define SNDRV_MINOR_TIMER (SNDRV_MINOR_GLOBAL + 1 * 32)
+#define SNDRV_MINOR_SEQUENCER (SNDRV_MINOR_GLOBAL + 0 * 64)
+#define SNDRV_MINOR_TIMER (SNDRV_MINOR_GLOBAL + 1 * 64)
#ifndef CONFIG_SND_DYNAMIC_MINORS
/* 2 - 3 (reserved) */
#define SNDRV_MINOR_HWDEP 4 /* 4 - 7 */
#define SNDRV_MINOR_RAWMIDI 8 /* 8 - 15 */
-#define SNDRV_MINOR_PCM_PLAYBACK 16 /* 16 - 23 */
-#define SNDRV_MINOR_PCM_CAPTURE 24 /* 24 - 31 */
+#define SNDRV_MINOR_PCM_PLAYBACK 16 /* 16 - 31 */
+#define SNDRV_MINOR_PCM_CAPTURE 32 /* 32 - 63 */
/* same as first respective minor number to make minor allocation easier */
#define SNDRV_DEVICE_TYPE_CONTROL SNDRV_MINOR_CONTROL
--- sound-2.6.orig/include/sound/pcm.h 2010-04-16 16:03:28.000000000 +0800
+++ sound-2.6/include/sound/pcm.h 2010-05-11 13:02:48.000000000 +0800
@@ -88,7 +88,7 @@ struct snd_pcm_ops {
#if defined(CONFIG_SND_DYNAMIC_MINORS)
#define SNDRV_PCM_DEVICES (SNDRV_OS_MINORS-2)
#else
-#define SNDRV_PCM_DEVICES 8
+#define SNDRV_PCM_DEVICES 32
#endif
#define SNDRV_PCM_IOCTL1_FALSE ((void *)0)
next prev parent reply other threads:[~2010-05-12 1:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 1:30 [PATCH 0/5] updates for Intel SandyBridge/CougarPoint HDMI codec Wu Fengguang
2010-05-12 1:30 ` Wu Fengguang [this message]
2010-05-12 7:29 ` [PATCH 1/5] allow up to 32 PCM devices Jaroslav Kysela
2010-05-12 8:03 ` Takashi Iwai
2010-05-12 8:39 ` Wu Fengguang
2010-05-12 9:01 ` Takashi Iwai
2010-05-12 10:06 ` Wu Fengguang
2010-05-13 0:05 ` Eliot Blennerhassett
2010-05-12 10:20 ` Clemens Ladisch
2010-05-12 10:55 ` Takashi Iwai
2010-05-13 2:21 ` Wu Fengguang
2010-05-14 8:21 ` Takashi Iwai
2010-05-14 8:32 ` Wu Fengguang
2010-05-12 9:49 ` Jaroslav Kysela
2010-05-12 1:30 ` [PATCH 2/5] hda - allow up to 10 Azalia codecs Wu Fengguang
2010-05-12 14:35 ` Takashi Iwai
2010-05-13 3:03 ` Wu Fengguang
2010-05-12 1:30 ` [PATCH 3/5] intelhdmi - user friendly codec name Wu Fengguang
2010-05-12 1:30 ` [PATCH 4/5] intelhdmi - add id for the CougarPoint chipset Wu Fengguang
2010-05-12 1:30 ` [PATCH 5/5] hdmi - dont fail on extra nodes Wu Fengguang
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=20100512015713.762299923@intel.com \
--to=fengguang.wu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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.