aboutsummaryrefslogtreecommitdiff
path: root/sound/ppc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 10:13:38 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 10:13:38 -0700
commitfc8a327db6c46de783b1a4276d846841b9abc24c (patch)
treebee512c142cccea93511debd98ef954581693727 /sound/ppc
parent92d15c2ccbb3e31a3fc71ad28fdb55e1319383c0 (diff)
parent24837e6f249a2c83667552e6871c1543b4a6b934 (diff)
Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: (264 commits) [ALSA] version 1.0.15 [ALSA] Fix thinko in cs4231 mce down check [ALSA] sun-cs4231: improved waiting after MCE down [ALSA] sun-cs4231: use cs4231-regs.h [ALSA] This simplifies and fixes waiting loops of the mce_down() [ALSA] This patch adds support for a wavetable chip on [ALSA] This patch removes open_mutex from the ad1848-lib as [ALSA] fix bootup crash in snd_gus_interrupt() [ALSA] hda-codec - Fix SKU ID function for realtek codecs [ALSA] Support ASUS P701 eeepc [0x1043 0x82a1] support [ALSA] hda-codec - Add array terminator for dmic in STAC codec [ALSA] hdsp - Fix zero division [ALSA] usb-audio - Fix double comment [ALSA] hda-codec - Fix STAC922x volume knob control [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz [ALSA] hda-codec - Fix for Fujitsu Lifebook C1410 [ALSA] mpu-401: remove MPU401_INFO_UART_ONLY flag [ALSA] mpu-401: do not require an ACK byte for the ENTER_UART command [ALSA] via82xx - Add DXS quirk for Shuttle AK31v2 [ALSA] hda-codec - Fix input_mux numbers for vaio stac92xx ...
Diffstat (limited to 'sound/ppc')
-rw-r--r--sound/ppc/Makefile2
-rw-r--r--sound/ppc/daca.c10
-rw-r--r--sound/ppc/pmac.c57
-rw-r--r--sound/ppc/pmac.h4
-rw-r--r--sound/ppc/snd_ps3.c1
5 files changed, 9 insertions, 65 deletions
diff --git a/sound/ppc/Makefile b/sound/ppc/Makefile
index eacee2d0675..679c45a8da2 100644
--- a/sound/ppc/Makefile
+++ b/sound/ppc/Makefile
@@ -1,6 +1,6 @@
#
# Makefile for ALSA
-# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
+# Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
#
snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o beep.o
diff --git a/sound/ppc/daca.c b/sound/ppc/daca.c
index 57202b0f033..c5a1f0be6a4 100644
--- a/sound/ppc/daca.c
+++ b/sound/ppc/daca.c
@@ -91,15 +91,7 @@ static int daca_set_volume(struct pmac_daca *mix)
/* deemphasis switch */
-static int daca_info_deemphasis(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_info *uinfo)
-{
- uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
- uinfo->count = 1;
- uinfo->value.integer.min = 0;
- uinfo->value.integer.max = 1;
- return 0;
-}
+#define daca_info_deemphasis snd_ctl_boolean_mono_info
static int daca_get_deemphasis(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 7a22f0f3784..4f9b19c90a4 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -490,35 +490,14 @@ static int snd_pmac_pcm_open(struct snd_pmac *chip, struct pmac_stream *rec,
struct snd_pcm_substream *subs)
{
struct snd_pcm_runtime *runtime = subs->runtime;
- int i, j, fflags;
- static int typical_freqs[] = {
- 44100,
- 22050,
- 11025,
- 0,
- };
- static int typical_freq_flags[] = {
- SNDRV_PCM_RATE_44100,
- SNDRV_PCM_RATE_22050,
- SNDRV_PCM_RATE_11025,
- 0,
- };
+ int i;
/* look up frequency table and fill bit mask */
runtime->hw.rates = 0;
- fflags = chip->freqs_ok;
- for (i = 0; typical_freqs[i]; i++) {
- for (j = 0; j < chip->num_freqs; j++) {
- if ((chip->freqs_ok & (1 << j)) &&
- chip->freq_table[j] == typical_freqs[i]) {
- runtime->hw.rates |= typical_freq_flags[i];
- fflags &= ~(1 << j);
- break;
- }
- }
- }
- if (fflags) /* rest */
- runtime->hw.rates |= SNDRV_PCM_RATE_KNOT;
+ for (i = 0; i < chip->num_freqs; i++)
+ if (chip->freqs_ok & (1 << i))
+ runtime->hw.rates |=
+ snd_pcm_rate_to_rate_bit(chip->freq_table[i]);
/* check for minimum and maximum rates */
for (i = 0; i < chip->num_freqs; i++) {
@@ -551,9 +530,6 @@ static int snd_pmac_pcm_open(struct snd_pmac *chip, struct pmac_stream *rec,
runtime->hw.periods_max = rec->cmd.size - 1;
- if (chip->can_duplex)
- snd_pcm_set_sync(subs);
-
/* constraints to fix choppy sound */
snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
return 0;
@@ -1035,29 +1011,6 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
return 0;
}
-/*
- * exported - boolean info callbacks for ease of programming
- */
-int snd_pmac_boolean_stereo_info(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_info *uinfo)
-{
- uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
- uinfo->count = 2;
- uinfo->value.integer.min = 0;
- uinfo->value.integer.max = 1;
- return 0;
-}
-
-int snd_pmac_boolean_mono_info(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_info *uinfo)
-{
- uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
- uinfo->count = 1;
- uinfo->value.integer.min = 0;
- uinfo->value.integer.max = 1;
- return 0;
-}
-
#ifdef PMAC_SUPPORT_AUTOMUTE
/*
* auto-mute
diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h
index 8394e66ceb0..25c512c2d74 100644
--- a/sound/ppc/pmac.h
+++ b/sound/ppc/pmac.h
@@ -202,8 +202,8 @@ int snd_pmac_keywest_init(struct pmac_keywest *i2c);
void snd_pmac_keywest_cleanup(struct pmac_keywest *i2c);
/* misc */
-int snd_pmac_boolean_stereo_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
-int snd_pmac_boolean_mono_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
+#define snd_pmac_boolean_stereo_info snd_ctl_boolean_stereo_info
+#define snd_pmac_boolean_mono_info snd_ctl_boolean_mono_info
int snd_pmac_add_automute(struct snd_pmac *chip);
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index 1aa0b467599..27b61899fe8 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -33,7 +33,6 @@
#include <linux/dmapool.h>
#include <linux/dma-mapping.h>
#include <asm/firmware.h>
-#include <linux/io.h>
#include <asm/dma.h>
#include <asm/lv1call.h>
#include <asm/ps3.h>