This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / sound / ppc / daca.c
index f24a916..6629b6b 100644 (file)
@@ -56,11 +56,10 @@ static int daca_init_client(pmac_keywest_t *i2c)
        unsigned short wdata = 0x00;
        /* SR: no swap, 1bit delay, 32-48kHz */
        /* GCFG: power amp inverted, DAC on */
-       if (i2c_smbus_write_byte_data(i2c->client, DACA_REG_SR, 0x08) < 0 ||
-           i2c_smbus_write_byte_data(i2c->client, DACA_REG_GCFG, 0x05) < 0)
+       if (snd_pmac_keywest_write_byte(i2c, DACA_REG_SR, 0x08) < 0 ||
+           snd_pmac_keywest_write_byte(i2c, DACA_REG_GCFG, 0x05) < 0)
                return -EINVAL;
-       return i2c_smbus_write_block_data(i2c->client, DACA_REG_AVOL,
-                                         2, (unsigned char*)&wdata);
+       return snd_pmac_keywest_write(i2c, DACA_REG_AVOL, 2, (unsigned char*)&wdata);
 }
 
 /*
@@ -82,10 +81,9 @@ static int daca_set_volume(pmac_daca_t *mix)
        else
                data[1] = mix->right_vol;
        data[1] |= mix->deemphasis ? 0x40 : 0;
-       if (i2c_smbus_write_block_data(mix->i2c.client, DACA_REG_AVOL,
-                                      2, data) < 0) {
-               snd_printk("failed to set volume \n");
-               return -EINVAL;
+       if (snd_pmac_keywest_write(&mix->i2c, DACA_REG_AVOL, 2, data) < 0) {
+               snd_printk("failed to set volume \n");  
+               return -EINVAL; 
        }
        return 0;
 }
@@ -190,8 +188,8 @@ static int daca_put_amp(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol
        change = mix->amp_on != ucontrol->value.integer.value[0];
        if (change) {
                mix->amp_on = ucontrol->value.integer.value[0];
-               i2c_smbus_write_byte_data(mix->i2c.client, DACA_REG_GCFG,
-                                         mix->amp_on ? 0x05 : 0x04);
+               snd_pmac_keywest_write_byte(&mix->i2c, DACA_REG_GCFG,
+                                           mix->amp_on ? 0x05 : 0x04);
        }
        return change;
 }
@@ -222,9 +220,9 @@ static snd_kcontrol_new_t daca_mixers[] = {
 static void daca_resume(pmac_t *chip)
 {
        pmac_daca_t *mix = chip->mixer_data;
-       i2c_smbus_write_byte_data(mix->i2c.client, DACA_REG_SR, 0x08);
-       i2c_smbus_write_byte_data(mix->i2c.client, DACA_REG_GCFG,
-                                 mix->amp_on ? 0x05 : 0x04);
+       snd_pmac_keywest_write_byte(&mix->i2c, DACA_REG_SR, 0x08);
+       snd_pmac_keywest_write_byte(&mix->i2c, DACA_REG_GCFG,
+                                   mix->amp_on ? 0x05 : 0x04);
        daca_set_volume(mix);
 }
 #endif /* CONFIG_PMAC_PBOOK */