/* Begin Bool Functions */
-static int snd_omap_info_bool(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_omap_info_bool(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info * uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
return 0;
}
-static int snd_omap_get_bool(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_omap_get_bool(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
int mic_index = (kcontrol->private_value >> 8) & 0x03;
u16 mask = (kcontrol->private_value >> 12) & 0xff;
return 0;
}
-static int snd_omap_put_bool(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_omap_put_bool(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
int mic_index = (kcontrol->private_value >> 8) & 0x03;
u16 mask = (kcontrol->private_value >> 12) & 0xff;
/* Begin Mux Functions */
-static int snd_omap_info_mux(snd_kcontrol_t *kcontrol,
- snd_ctl_elem_info_t * uinfo)
+static int snd_omap_info_mux(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info * uinfo)
{
/* Mic = 0
* Line = 1 */
return 0;
}
-static int snd_omap_get_mux(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_omap_get_mux(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
u16 mask = (kcontrol->private_value >> 10) & 0xff;
int mux_index = (kcontrol->private_value >> 8) & 0x03;
return 0;
}
-static int snd_omap_put_mux(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_omap_put_mux(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
u16 reg = kcontrol->private_value & 0xff;
u16 mask = (kcontrol->private_value >> 10) & 0xff;
/* Begin Single Functions */
-static int snd_omap_info_single(snd_kcontrol_t *kcontrol,
- snd_ctl_elem_info_t * uinfo)
+static int snd_omap_info_single(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info * uinfo)
{
int mask = (kcontrol->private_value >> 18) & 0xff;
int reg_val = (kcontrol->private_value >> 8) & 0xff;
return 0;
}
-static int snd_omap_get_single(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_omap_get_single(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
u16 reg_val = (kcontrol->private_value >> 8) & 0xff;
return 0;
}
-static int snd_omap_put_single(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_omap_put_single(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
u16 reg_index = (kcontrol->private_value >> 16) & 0x03;
u16 mask = (kcontrol->private_value >> 18) & 0x1ff;
/* Begin Double Functions */
-static int snd_omap_info_double(snd_kcontrol_t *kcontrol,
- snd_ctl_elem_info_t * uinfo)
+static int snd_omap_info_double(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info * uinfo)
{
/* mask == 0 : Switch
* mask != 0 : Volume */
return 0;
}
-static int snd_omap_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_omap_get_double(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
/* mask == 0 : Switch
* mask != 0 : Volume */
return 0;
}
-static int snd_omap_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_omap_put_double(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
/* mask == 0 : Switch
* mask != 0 : Volume */
/* End Double Functions */
-static snd_kcontrol_new_t snd_omap_controls[] = {
+static struct snd_kcontrol_new snd_omap_controls[] = {
OMAP_DOUBLE("PCM Playback Switch", 0, LEFT_CHANNEL_VOLUME_ADDR, RIGHT_CHANNEL_VOLUME_ADDR,
PCM_INDEX, 0x00),
OMAP_DOUBLE("PCM Playback Volume", 0, LEFT_CHANNEL_VOLUME_ADDR, RIGHT_CHANNEL_VOLUME_ADDR,
int snd_omap_mixer(struct snd_card_omap_codec *chip)
{
- snd_card_t *card;
+ struct snd_card *card;
unsigned int idx;
int err;
48000, 88200, 96000,
};
-static snd_pcm_hw_constraint_list_t aic23_hw_constraints_rates = {
+static struct snd_pcm_hw_constraint_list aic23_hw_constraints_rates = {
.count = ARRAY_SIZE(rates),
.list = rates,
.mask = 0,
};
-static snd_pcm_hardware_t aic23_snd_omap_alsa_playback = {
+static struct snd_pcm_hardware aic23_snd_omap_alsa_playback = {
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID),
.formats = (SNDRV_PCM_FMTBIT_S16_LE),
.fifo_size = 0,
};
-static snd_pcm_hardware_t aic23_snd_omap_alsa_capture = {
+static struct snd_pcm_hardware aic23_snd_omap_alsa_capture = {
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID),
.formats = (SNDRV_PCM_FMTBIT_S16_LE),
#endif
#include <sound/driver.h>
#include <sound/core.h>
+#include <sound/pcm.h>
#include <asm/arch/omap-alsa.h>
#include "omap-alsa-dma.h"
*/
static u_int audio_get_dma_pos(struct audio_stream *s)
{
- snd_pcm_substream_t *substream = s->stream;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_substream *substream = s->stream;
+ struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int offset;
unsigned long flags;
dma_addr_t count;
*/
static void audio_process_dma(struct audio_stream *s)
{
- snd_pcm_substream_t *substream = s->stream;
- snd_pcm_runtime_t *runtime;
+ struct snd_pcm_substream *substream = s->stream;
+ struct snd_pcm_runtime *runtime;
unsigned int dma_size;
unsigned int offset;
int ret;
* Alsa section
* PCM settings and callbacks
*/
-static int snd_omap_alsa_trigger(snd_pcm_substream_t * substream, int cmd)
+static int snd_omap_alsa_trigger(struct snd_pcm_substream * substream, int cmd)
{
struct snd_card_omap_codec *chip =
snd_pcm_substream_chip(substream);
return err;
}
-static int snd_omap_alsa_prepare(snd_pcm_substream_t * substream)
+static int snd_omap_alsa_prepare(struct snd_pcm_substream * substream)
{
struct snd_card_omap_codec *chip = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
struct audio_stream *s = &chip->s[substream->pstr->stream];
ADEBUG();
return 0;
}
-static snd_pcm_uframes_t snd_omap_alsa_pointer(snd_pcm_substream_t *substream)
+static snd_pcm_uframes_t snd_omap_alsa_pointer(struct snd_pcm_substream *substream)
{
struct snd_card_omap_codec *chip = snd_pcm_substream_chip(substream);
return audio_get_dma_pos(&chip->s[substream->pstr->stream]);
}
-static int snd_card_omap_alsa_open(snd_pcm_substream_t * substream)
+static int snd_card_omap_alsa_open(struct snd_pcm_substream * substream)
{
struct snd_card_omap_codec *chip =
snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
int stream_id = substream->pstr->stream;
int err;
return 0;
}
-static int snd_card_omap_alsa_close(snd_pcm_substream_t * substream)
+static int snd_card_omap_alsa_close(struct snd_pcm_substream * substream)
{
struct snd_card_omap_codec *chip = snd_pcm_substream_chip(substream);
}
/* HW params & free */
-static int snd_omap_alsa_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_omap_alsa_hw_params(struct snd_pcm_substream * substream,
+ struct snd_pcm_hw_params * hw_params)
{
return snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params));
}
-static int snd_omap_alsa_hw_free(snd_pcm_substream_t * substream)
+static int snd_omap_alsa_hw_free(struct snd_pcm_substream * substream)
{
return snd_pcm_lib_free_pages(substream);
}
/* pcm operations */
-static snd_pcm_ops_t snd_card_omap_alsa_playback_ops = {
+static struct snd_pcm_ops snd_card_omap_alsa_playback_ops = {
.open = snd_card_omap_alsa_open,
.close = snd_card_omap_alsa_close,
.ioctl = snd_pcm_lib_ioctl,
.pointer = snd_omap_alsa_pointer,
};
-static snd_pcm_ops_t snd_card_omap_alsa_capture_ops = {
+static struct snd_pcm_ops snd_card_omap_alsa_capture_ops = {
.open = snd_card_omap_alsa_open,
.close = snd_card_omap_alsa_close,
.ioctl = snd_pcm_lib_ioctl,
static int __init snd_card_omap_alsa_pcm(struct snd_card_omap_codec *omap_alsa,
int device)
{
- snd_pcm_t *pcm;
+ struct snd_pcm *pcm;
int err;
ADEBUG();
int snd_omap_alsa_suspend(struct platform_device *pdev, pm_message_t state)
{
struct snd_card_omap_codec *chip;
- snd_card_t *card = platform_get_drvdata(pdev);
+ struct snd_card *card = platform_get_drvdata(pdev);
if (card->power_state != SNDRV_CTL_POWER_D3hot) {
chip = card->private_data;
int snd_omap_alsa_resume(struct platform_device *pdev)
{
struct snd_card_omap_codec *chip;
- snd_card_t *card = platform_get_drvdata(pdev);
+ struct snd_card *card = platform_get_drvdata(pdev);
if (card->power_state != SNDRV_CTL_POWER_D0) {
chip = card->private_data;
#endif /* CONFIG_PM */
-void snd_omap_alsa_free(snd_card_t * card)
+void snd_omap_alsa_free(struct snd_card * card)
{
struct snd_card_omap_codec *chip = card->private_data;
ADEBUG();
{
int err = 0;
int def_rate;
- snd_card_t *card;
+ struct snd_card *card;
ADEBUG();
alsa_codec_config = config;
int snd_omap_alsa_remove(struct platform_device *pdev)
{
- snd_card_t *card = platform_get_drvdata(pdev);
+ struct snd_card *card = platform_get_drvdata(pdev);
struct snd_card_omap_codec *chip = card->private_data;
snd_card_free(card);