summaryrefslogtreecommitdiff
path: root/sound/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/ppc')
-rw-r--r--sound/ppc/pmac.c3
-rw-r--r--sound/ppc/tumbler.c19
2 files changed, 12 insertions, 10 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 4988f873a7ba..aa57170101fd 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -66,7 +66,7 @@ static int snd_pmac_dbdma_alloc(struct snd_pmac *chip, struct pmac_dbdma *rec, i
static void snd_pmac_dbdma_free(struct snd_pmac *chip, struct pmac_dbdma *rec)
{
- if (rec) {
+ if (rec->space) {
unsigned int rsize = sizeof(struct dbdma_cmd) * (rec->size + 1);
dma_free_coherent(&chip->pdev->dev, rsize, rec->space, rec->dma_base);
@@ -881,6 +881,7 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
chip->can_capture = 1;
chip->num_freqs = ARRAY_SIZE(awacs_freqs);
chip->freq_table = awacs_freqs;
+ chip->pdev = NULL;
chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index 15c63cb2ccba..838fc113c441 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -239,8 +239,8 @@ static int tumbler_set_master_volume(struct pmac_tumbler *mix)
block[4] = (right_vol >> 8) & 0xff;
block[5] = (right_vol >> 0) & 0xff;
- if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_VOL,
- 6, block) < 0) {
+ if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_VOL, 6,
+ block) < 0) {
snd_printk("failed to set volume \n");
return -EINVAL;
}
@@ -345,8 +345,8 @@ static int tumbler_set_drc(struct pmac_tumbler *mix)
val[1] = 0;
}
- if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_DRC,
- 2, val) < 0) {
+ if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC,
+ 2, val) < 0) {
snd_printk("failed to set DRC\n");
return -EINVAL;
}
@@ -381,8 +381,8 @@ static int snapper_set_drc(struct pmac_tumbler *mix)
val[4] = 0x60;
val[5] = 0xa0;
- if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_DRC,
- 6, val) < 0) {
+ if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC,
+ 6, val) < 0) {
snd_printk("failed to set DRC\n");
return -EINVAL;
}
@@ -492,8 +492,8 @@ static int tumbler_set_mono_volume(struct pmac_tumbler *mix,
vol = info->table[vol];
for (i = 0; i < info->bytes; i++)
block[i] = (vol >> ((info->bytes - i - 1) * 8)) & 0xff;
- if (i2c_smbus_write_block_data(mix->i2c.client, info->reg,
- info->bytes, block) < 0) {
+ if (i2c_smbus_write_i2c_block_data(mix->i2c.client, info->reg,
+ info->bytes, block) < 0) {
snd_printk("failed to set mono volume %d\n", info->index);
return -EINVAL;
}
@@ -625,7 +625,8 @@ static int snapper_set_mix_vol1(struct pmac_tumbler *mix, int idx, int ch, int r
for (j = 0; j < 3; j++)
block[i * 3 + j] = (vol >> ((2 - j) * 8)) & 0xff;
}
- if (i2c_smbus_write_block_data(mix->i2c.client, reg, 9, block) < 0) {
+ if (i2c_smbus_write_i2c_block_data(mix->i2c.client, reg,
+ 9, block) < 0) {
snd_printk("failed to set mono volume %d\n", reg);
return -EINVAL;
}