Lines Matching refs:scodec
176 static int cs8409_i2c_set_page(struct sub_codec *scodec, unsigned int i2c_reg) in cs8409_i2c_set_page() argument
178 struct hda_codec *codec = scodec->codec; in cs8409_i2c_set_page()
180 if (scodec->paged && (scodec->last_page != (i2c_reg >> 8))) { in cs8409_i2c_set_page()
184 scodec->last_page = i2c_reg >> 8; in cs8409_i2c_set_page()
197 static int cs8409_i2c_read(struct sub_codec *scodec, unsigned int addr) in cs8409_i2c_read() argument
199 struct hda_codec *codec = scodec->codec; in cs8409_i2c_read()
204 if (scodec->suspended) in cs8409_i2c_read()
209 cs8409_set_i2c_dev_addr(codec, scodec->addr); in cs8409_i2c_read()
211 if (cs8409_i2c_set_page(scodec, addr)) in cs8409_i2c_read()
228 codec_err(codec, "%s() Failed 0x%02x : 0x%04x\n", __func__, scodec->addr, addr); in cs8409_i2c_read()
240 static int cs8409_i2c_bulk_read(struct sub_codec *scodec, struct cs8409_i2c_param *seq, int count) in cs8409_i2c_bulk_read() argument
242 struct hda_codec *codec = scodec->codec; in cs8409_i2c_bulk_read()
247 if (scodec->suspended) in cs8409_i2c_bulk_read()
251 cs8409_set_i2c_dev_addr(codec, scodec->addr); in cs8409_i2c_bulk_read()
255 if (cs8409_i2c_set_page(scodec, seq[i].addr)) in cs8409_i2c_bulk_read()
273 codec_err(codec, "I2C Bulk Write Failed 0x%02x\n", scodec->addr); in cs8409_i2c_bulk_read()
285 static int cs8409_i2c_write(struct sub_codec *scodec, unsigned int addr, unsigned int value) in cs8409_i2c_write() argument
287 struct hda_codec *codec = scodec->codec; in cs8409_i2c_write()
291 if (scodec->suspended) in cs8409_i2c_write()
297 cs8409_set_i2c_dev_addr(codec, scodec->addr); in cs8409_i2c_write()
299 if (cs8409_i2c_set_page(scodec, addr)) in cs8409_i2c_write()
313 codec_err(codec, "%s() Failed 0x%02x : 0x%04x\n", __func__, scodec->addr, addr); in cs8409_i2c_write()
325 static int cs8409_i2c_bulk_write(struct sub_codec *scodec, const struct cs8409_i2c_param *seq, in cs8409_i2c_bulk_write() argument
328 struct hda_codec *codec = scodec->codec; in cs8409_i2c_bulk_write()
333 if (scodec->suspended) in cs8409_i2c_bulk_write()
337 cs8409_set_i2c_dev_addr(codec, scodec->addr); in cs8409_i2c_bulk_write()
341 if (cs8409_i2c_set_page(scodec, seq[i].addr)) in cs8409_i2c_bulk_write()
357 codec_err(codec, "I2C Bulk Write Failed 0x%02x\n", scodec->addr); in cs8409_i2c_bulk_write()