Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a05ef8bf authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa

* master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
  [ALSA] Don't reject O_RDWR at opening PCM OSS with read/write-only device
  [ALSA] snd-emu10k1: Implement support for Audigy 2 ZS [SB0353]
  [ALSA] add MAINTAINERS entry for snd-aoa
  [ALSA] aoa: platform function gpio: ignore errors from functions that don't exist
  [ALSA] make snd-powermac load even when it can't bind the device
  [ALSA] aoa: fix toonie codec
  [ALSA] aoa: feature gpio layer: fix IRQ access
  [ALSA] Conversions from kmalloc+memset to k(z|c)alloc
  [ALSA] snd-emu10k1: Fixes ALSA bug#2190
parents cb3f1e7b 6cb53e7e
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -298,6 +298,13 @@ L: info-linux@geode.amd.com
W:	http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
W:	http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
S:	Supported
S:	Supported


AOA (Apple Onboard Audio) ALSA DRIVER
P:	Johannes Berg
M:	johannes@sipsolutions.net
L:	linuxppc-dev@ozlabs.org
L:	alsa-devel@alsa-project.org
S:	Maintained

APM DRIVER
APM DRIVER
P:	Stephen Rothwell
P:	Stephen Rothwell
M:	sfr@canb.auug.org.au
M:	sfr@canb.auug.org.au
+13 −4
Original line number Original line Diff line number Diff line
@@ -51,6 +51,13 @@ static struct transfer_info toonie_transfers[] = {
	{}
	{}
};
};


static int toonie_usable(struct codec_info_item *cii,
			 struct transfer_info *ti,
			 struct transfer_info *out)
{
	return 1;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM
static int toonie_suspend(struct codec_info_item *cii, pm_message_t state)
static int toonie_suspend(struct codec_info_item *cii, pm_message_t state)
{
{
@@ -69,6 +76,7 @@ static struct codec_info toonie_codec_info = {
	.sysclock_factor = 256,
	.sysclock_factor = 256,
	.bus_factor = 64,
	.bus_factor = 64,
	.owner = THIS_MODULE,
	.owner = THIS_MODULE,
	.usable = toonie_usable,
#ifdef CONFIG_PM
#ifdef CONFIG_PM
	.suspend = toonie_suspend,
	.suspend = toonie_suspend,
	.resume = toonie_resume,
	.resume = toonie_resume,
@@ -79,19 +87,20 @@ static int toonie_init_codec(struct aoa_codec *codec)
{
{
	struct toonie *toonie = codec_to_toonie(codec);
	struct toonie *toonie = codec_to_toonie(codec);


	/* nothing connected? what a joke! */
	if (toonie->codec.connected != 1)
		return -ENOTCONN;

	if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, toonie, &ops)) {
	if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, toonie, &ops)) {
		printk(KERN_ERR PFX "failed to create toonie snd device!\n");
		printk(KERN_ERR PFX "failed to create toonie snd device!\n");
		return -ENODEV;
		return -ENODEV;
	}
	}


	/* nothing connected? what a joke! */
	if (toonie->codec.connected != 1)
		return -ENOTCONN;

	if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev,
	if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev,
						     aoa_get_card(),
						     aoa_get_card(),
						     &toonie_codec_info, toonie)) {
						     &toonie_codec_info, toonie)) {
		printk(KERN_ERR PFX "error creating toonie pcm\n");
		printk(KERN_ERR PFX "error creating toonie pcm\n");
		snd_device_free(aoa_get_card(), toonie);
		return -ENODEV;
		return -ENODEV;
	}
	}


+5 −2
Original line number Original line Diff line number Diff line
@@ -112,7 +112,10 @@ static struct device_node *get_gpio(char *name,


static void get_irq(struct device_node * np, int *irqptr)
static void get_irq(struct device_node * np, int *irqptr)
{
{
	if (np)
		*irqptr = irq_of_parse_and_map(np, 0);
		*irqptr = irq_of_parse_and_map(np, 0);
	else
		*irqptr = NO_IRQ;
}
}


/* 0x4 is outenable, 0x1 is out, thus 4 or 5 */
/* 0x4 is outenable, 0x1 is out, thus 4 or 5 */
@@ -322,7 +325,7 @@ static int ftr_set_notify(struct gpio_runtime *rt,
		return -EINVAL;
		return -EINVAL;
	}
	}


	if (irq == -1)
	if (irq == NO_IRQ)
		return -ENODEV;
		return -ENODEV;


	mutex_lock(&notif->mutex);
	mutex_lock(&notif->mutex);
+1 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@ static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\
							\
							\
	if (unlikely(!rt)) return;				\
	if (unlikely(!rt)) return;				\
	rc = pmf_call_function(rt->node, #name "-mute", &args);	\
	rc = pmf_call_function(rt->node, #name "-mute", &args);	\
	if (rc)							\
	if (rc && rc != -ENODEV)				\
		printk(KERN_WARNING "pmf_gpio_set_" #name	\
		printk(KERN_WARNING "pmf_gpio_set_" #name	\
		" failed, rc: %d\n", rc);			\
		" failed, rc: %d\n", rc);			\
	rt->implementation_private &= ~(1<<bit);		\
	rt->implementation_private &= ~(1<<bit);		\
+1 −2
Original line number Original line Diff line number Diff line
@@ -988,13 +988,12 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, struct snd_mix
	if (ptr->index == 0 && (kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0)) != NULL) {
	if (ptr->index == 0 && (kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0)) != NULL) {
		struct snd_ctl_elem_info *uinfo;
		struct snd_ctl_elem_info *uinfo;


		uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL);
		uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
		if (! uinfo) {
		if (! uinfo) {
			up_read(&mixer->card->controls_rwsem);
			up_read(&mixer->card->controls_rwsem);
			return -ENOMEM;
			return -ENOMEM;
		}
		}
			
			
		memset(uinfo, 0, sizeof(*uinfo));
		if (kctl->info(kctl, uinfo)) {
		if (kctl->info(kctl, uinfo)) {
			up_read(&mixer->card->controls_rwsem);
			up_read(&mixer->card->controls_rwsem);
			return 0;
			return 0;
Loading