• Home
  • Raw
  • Download

Lines Matching refs:mc

741 	struct snd_soc_tplg_mixer_control *mc;  in tplg_parse_control_mixer()  local
754 mc = elem->mixer_ctrl; in tplg_parse_control_mixer()
755 snd_strlcpy(mc->hdr.name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN); in tplg_parse_control_mixer()
756 mc->hdr.type = SND_SOC_TPLG_TYPE_MIXER; in tplg_parse_control_mixer()
757 mc->size = elem->size; in tplg_parse_control_mixer()
762 mc->channel[j].reg = -1; in tplg_parse_control_mixer()
779 if (mc->num_channels >= SND_SOC_TPLG_MAX_CHAN) { in tplg_parse_control_mixer()
785 mc->channel); in tplg_parse_control_mixer()
789 mc->num_channels = tplg->channel_idx; in tplg_parse_control_mixer()
797 mc->max = ival; in tplg_parse_control_mixer()
798 tplg_dbg("\t%s: %d", id, mc->max); in tplg_parse_control_mixer()
806 mc->invert = ival; in tplg_parse_control_mixer()
808 tplg_dbg("\t%s: %d", id, mc->invert); in tplg_parse_control_mixer()
814 &mc->hdr); in tplg_parse_control_mixer()
841 err = parse_access(cfg, &mc->hdr); in tplg_parse_control_mixer()
852 mc->hdr.access = SNDRV_CTL_ELEM_ACCESS_READWRITE; in tplg_parse_control_mixer()
854 mc->hdr.access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; in tplg_parse_control_mixer()
864 struct snd_soc_tplg_mixer_control *mc = elem->mixer_ctrl; in tplg_save_control_mixer() local
868 if (!mc) in tplg_save_control_mixer()
877 err = tplg_save_channels(tplg, mc->channel, mc->num_channels, in tplg_save_control_mixer()
879 if (err >= 0 && mc->max > 0) in tplg_save_control_mixer()
880 err = tplg_save_printf(dst, pfx, "\tmax %u\n", mc->max); in tplg_save_control_mixer()
881 if (err >= 0 && mc->invert > 0) in tplg_save_control_mixer()
883 if (err >= 0 && mc->invert > 0) in tplg_save_control_mixer()
886 err = tplg_save_ops(tplg, &mc->hdr, dst, pfx2); in tplg_save_control_mixer()
888 err = tplg_save_access(tplg, &mc->hdr, dst, pfx2); in tplg_save_control_mixer()
979 struct snd_soc_tplg_mixer_control *mc; in tplg_add_mixer() local
997 mc = elem->mixer_ctrl; in tplg_add_mixer()
998 mc->size = elem->size; in tplg_add_mixer()
999 ret = init_ctl_hdr(tplg, elem, &mc->hdr, &mixer->hdr); in tplg_add_mixer()
1005 mc->min = mixer->min; in tplg_add_mixer()
1006 mc->max = mixer->max; in tplg_add_mixer()
1007 mc->platform_max = mixer->platform_max; in tplg_add_mixer()
1008 mc->invert = mixer->invert; in tplg_add_mixer()
1012 mc->channel[i].reg = -1; in tplg_add_mixer()
1015 mc->num_channels = num_channels; in tplg_add_mixer()
1020 mc->channel[i].size = sizeof(mc->channel[0]); in tplg_add_mixer()
1021 mc->channel[i].reg = channel->reg; in tplg_add_mixer()
1022 mc->channel[i].shift = channel->shift; in tplg_add_mixer()
1023 mc->channel[i].id = channel->id; in tplg_add_mixer()
1217 struct snd_soc_tplg_mixer_control *mc = bin; in tplg_decode_control_mixer1() local
1222 if (size < sizeof(*mc)) { in tplg_decode_control_mixer1()
1228 mc->size, mc->hdr.tlv.size, mc->priv.size); in tplg_decode_control_mixer1()
1229 if (size != mc->size + mc->priv.size) { in tplg_decode_control_mixer1()
1235 mt->hdr.type = mc->hdr.type; in tplg_decode_control_mixer1()
1236 mt->hdr.name = mc->hdr.name; in tplg_decode_control_mixer1()
1237 mt->hdr.access = mc->hdr.access; in tplg_decode_control_mixer1()
1238 mt->hdr.ops.get = mc->hdr.ops.get; in tplg_decode_control_mixer1()
1239 mt->hdr.ops.put = mc->hdr.ops.put; in tplg_decode_control_mixer1()
1240 mt->hdr.ops.info = mc->hdr.ops.info; in tplg_decode_control_mixer1()
1241 mt->min = mc->min; in tplg_decode_control_mixer1()
1242 mt->max = mc->max; in tplg_decode_control_mixer1()
1243 mt->platform_max = mc->platform_max; in tplg_decode_control_mixer1()
1246 if (mc->num_channels > 0) { in tplg_decode_control_mixer1()
1248 map->num_channels = mc->num_channels; in tplg_decode_control_mixer1()
1250 map->channel[i].reg = mc->channel[i].reg; in tplg_decode_control_mixer1()
1251 map->channel[i].shift = mc->channel[i].shift; in tplg_decode_control_mixer1()
1252 map->channel[i].id = mc->channel[i].id; in tplg_decode_control_mixer1()
1256 if (mc->hdr.tlv.size == 0) { in tplg_decode_control_mixer1()
1258 } else if (mc->hdr.tlv.size == sizeof(struct snd_soc_tplg_ctl_tlv)) { in tplg_decode_control_mixer1()
1259 if (mc->hdr.tlv.type != SNDRV_CTL_TLVT_DB_SCALE) { in tplg_decode_control_mixer1()
1261 mc->hdr.tlv.type); in tplg_decode_control_mixer1()
1268 db->hdr.type = mc->hdr.tlv.type; in tplg_decode_control_mixer1()
1269 db->min = mc->hdr.tlv.scale.min; in tplg_decode_control_mixer1()
1270 db->step = mc->hdr.tlv.scale.step; in tplg_decode_control_mixer1()
1271 db->mute = mc->hdr.tlv.scale.mute; in tplg_decode_control_mixer1()
1275 SNDERR("mixer: wrong TLV size %d", mc->hdr.tlv.size); in tplg_decode_control_mixer1()
1279 mt->priv = &mc->priv; in tplg_decode_control_mixer1()
1293 struct snd_soc_tplg_mixer_control *mc; in tplg_decode_control_mixer() local
1302 if (size < sizeof(*mc)) { in tplg_decode_control_mixer()
1307 mc = bin; in tplg_decode_control_mixer()
1308 size2 = mc->size + mc->priv.size; in tplg_decode_control_mixer()
1311 mc->size, mc->priv.size); in tplg_decode_control_mixer()