aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm5102.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm5102.c')
-rw-r--r--sound/soc/codecs/wm5102.c159
1 files changed, 133 insertions, 26 deletions
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 988e817dca05..b8d461db369f 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -45,6 +45,7 @@ static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0);
45static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0); 45static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
46static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0); 46static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
47static DECLARE_TLV_DB_SCALE(noise_tlv, 0, 600, 0); 47static DECLARE_TLV_DB_SCALE(noise_tlv, 0, 600, 0);
48static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);
48 49
49static const struct wm_adsp_region wm5102_dsp1_regions[] = { 50static const struct wm_adsp_region wm5102_dsp1_regions[] = {
50 { .type = WMFW_ADSP2_PM, .base = 0x100000 }, 51 { .type = WMFW_ADSP2_PM, .base = 0x100000 },
@@ -603,6 +604,17 @@ static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w,
603 return 0; 604 return 0;
604} 605}
605 606
607#define WM5102_NG_SRC(name, base) \
608 SOC_SINGLE(name " NG HPOUT1L Switch", base, 0, 1, 0), \
609 SOC_SINGLE(name " NG HPOUT1R Switch", base, 1, 1, 0), \
610 SOC_SINGLE(name " NG HPOUT2L Switch", base, 2, 1, 0), \
611 SOC_SINGLE(name " NG HPOUT2R Switch", base, 3, 1, 0), \
612 SOC_SINGLE(name " NG EPOUT Switch", base, 4, 1, 0), \
613 SOC_SINGLE(name " NG SPKOUTL Switch", base, 6, 1, 0), \
614 SOC_SINGLE(name " NG SPKOUTR Switch", base, 7, 1, 0), \
615 SOC_SINGLE(name " NG SPKDAT1L Switch", base, 8, 1, 0), \
616 SOC_SINGLE(name " NG SPKDAT1R Switch", base, 9, 1, 0)
617
606static const struct snd_kcontrol_new wm5102_snd_controls[] = { 618static const struct snd_kcontrol_new wm5102_snd_controls[] = {
607SOC_SINGLE("IN1 High Performance Switch", ARIZONA_IN1L_CONTROL, 619SOC_SINGLE("IN1 High Performance Switch", ARIZONA_IN1L_CONTROL,
608 ARIZONA_IN1_OSR_SHIFT, 1, 0), 620 ARIZONA_IN1_OSR_SHIFT, 1, 0),
@@ -611,32 +623,31 @@ SOC_SINGLE("IN2 High Performance Switch", ARIZONA_IN2L_CONTROL,
611SOC_SINGLE("IN3 High Performance Switch", ARIZONA_IN3L_CONTROL, 623SOC_SINGLE("IN3 High Performance Switch", ARIZONA_IN3L_CONTROL,
612 ARIZONA_IN3_OSR_SHIFT, 1, 0), 624 ARIZONA_IN3_OSR_SHIFT, 1, 0),
613 625
614SOC_DOUBLE_R_RANGE_TLV("IN1 Volume", ARIZONA_IN1L_CONTROL, 626SOC_SINGLE_RANGE_TLV("IN1L Volume", ARIZONA_IN1L_CONTROL,
615 ARIZONA_IN1R_CONTROL, 627 ARIZONA_IN1L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv),
616 ARIZONA_IN1L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), 628SOC_SINGLE_RANGE_TLV("IN1R Volume", ARIZONA_IN1R_CONTROL,
617SOC_DOUBLE_R_RANGE_TLV("IN2 Volume", ARIZONA_IN2L_CONTROL, 629 ARIZONA_IN1R_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv),
618 ARIZONA_IN2R_CONTROL, 630SOC_SINGLE_RANGE_TLV("IN2L Volume", ARIZONA_IN2L_CONTROL,
619 ARIZONA_IN2L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), 631 ARIZONA_IN2L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv),
620SOC_DOUBLE_R_RANGE_TLV("IN3 Volume", ARIZONA_IN3L_CONTROL, 632SOC_SINGLE_RANGE_TLV("IN2R Volume", ARIZONA_IN2R_CONTROL,
621 ARIZONA_IN3R_CONTROL, 633 ARIZONA_IN2R_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv),
622 ARIZONA_IN3L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), 634SOC_SINGLE_RANGE_TLV("IN3L Volume", ARIZONA_IN3L_CONTROL,
623 635 ARIZONA_IN3L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv),
624SOC_DOUBLE_R("IN1 Digital Switch", ARIZONA_ADC_DIGITAL_VOLUME_1L, 636SOC_SINGLE_RANGE_TLV("IN3R Volume", ARIZONA_IN3R_CONTROL,
625 ARIZONA_ADC_DIGITAL_VOLUME_1R, ARIZONA_IN1L_MUTE_SHIFT, 1, 1), 637 ARIZONA_IN3R_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv),
626SOC_DOUBLE_R("IN2 Digital Switch", ARIZONA_ADC_DIGITAL_VOLUME_2L, 638
627 ARIZONA_ADC_DIGITAL_VOLUME_2R, ARIZONA_IN2L_MUTE_SHIFT, 1, 1), 639SOC_SINGLE_TLV("IN1L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1L,
628SOC_DOUBLE_R("IN3 Digital Switch", ARIZONA_ADC_DIGITAL_VOLUME_3L, 640 ARIZONA_IN1L_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv),
629 ARIZONA_ADC_DIGITAL_VOLUME_3R, ARIZONA_IN3L_MUTE_SHIFT, 1, 1), 641SOC_SINGLE_TLV("IN1R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1R,
630 642 ARIZONA_IN1R_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv),
631SOC_DOUBLE_R_TLV("IN1 Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1L, 643SOC_SINGLE_TLV("IN2L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_2L,
632 ARIZONA_ADC_DIGITAL_VOLUME_1R, ARIZONA_IN1L_DIG_VOL_SHIFT, 644 ARIZONA_IN2L_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv),
633 0xbf, 0, digital_tlv), 645SOC_SINGLE_TLV("IN2R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_2R,
634SOC_DOUBLE_R_TLV("IN2 Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_2L, 646 ARIZONA_IN2R_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv),
635 ARIZONA_ADC_DIGITAL_VOLUME_2R, ARIZONA_IN2L_DIG_VOL_SHIFT, 647SOC_SINGLE_TLV("IN3L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_3L,
636 0xbf, 0, digital_tlv), 648 ARIZONA_IN3L_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv),
637SOC_DOUBLE_R_TLV("IN3 Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_3L, 649SOC_SINGLE_TLV("IN3R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_3R,
638 ARIZONA_ADC_DIGITAL_VOLUME_3R, ARIZONA_IN3L_DIG_VOL_SHIFT, 650 ARIZONA_IN3R_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv),
639 0xbf, 0, digital_tlv),
640 651
641SOC_ENUM("Input Ramp Up", arizona_in_vi_ramp), 652SOC_ENUM("Input Ramp Up", arizona_in_vi_ramp),
642SOC_ENUM("Input Ramp Down", arizona_in_vd_ramp), 653SOC_ENUM("Input Ramp Down", arizona_in_vd_ramp),
@@ -774,6 +785,22 @@ SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp),
774SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1, ARIZONA_SPK1L_MUTE_SHIFT, 785SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1, ARIZONA_SPK1L_MUTE_SHIFT,
775 ARIZONA_SPK1R_MUTE_SHIFT, 1, 1), 786 ARIZONA_SPK1R_MUTE_SHIFT, 1, 1),
776 787
788SOC_SINGLE("Noise Gate Switch", ARIZONA_NOISE_GATE_CONTROL,
789 ARIZONA_NGATE_ENA_SHIFT, 1, 0),
790SOC_SINGLE_TLV("Noise Gate Threshold Volume", ARIZONA_NOISE_GATE_CONTROL,
791 ARIZONA_NGATE_THR_SHIFT, 7, 1, ng_tlv),
792SOC_ENUM("Noise Gate Hold", arizona_ng_hold),
793
794WM5102_NG_SRC("HPOUT1L", ARIZONA_NOISE_GATE_SELECT_1L),
795WM5102_NG_SRC("HPOUT1R", ARIZONA_NOISE_GATE_SELECT_1R),
796WM5102_NG_SRC("HPOUT2L", ARIZONA_NOISE_GATE_SELECT_2L),
797WM5102_NG_SRC("HPOUT2R", ARIZONA_NOISE_GATE_SELECT_2R),
798WM5102_NG_SRC("EPOUT", ARIZONA_NOISE_GATE_SELECT_3L),
799WM5102_NG_SRC("SPKOUTL", ARIZONA_NOISE_GATE_SELECT_4L),
800WM5102_NG_SRC("SPKOUTR", ARIZONA_NOISE_GATE_SELECT_4R),
801WM5102_NG_SRC("SPKDAT1L", ARIZONA_NOISE_GATE_SELECT_5L),
802WM5102_NG_SRC("SPKDAT1R", ARIZONA_NOISE_GATE_SELECT_5R),
803
777ARIZONA_MIXER_CONTROLS("AIF1TX1", ARIZONA_AIF1TX1MIX_INPUT_1_SOURCE), 804ARIZONA_MIXER_CONTROLS("AIF1TX1", ARIZONA_AIF1TX1MIX_INPUT_1_SOURCE),
778ARIZONA_MIXER_CONTROLS("AIF1TX2", ARIZONA_AIF1TX2MIX_INPUT_1_SOURCE), 805ARIZONA_MIXER_CONTROLS("AIF1TX2", ARIZONA_AIF1TX2MIX_INPUT_1_SOURCE),
779ARIZONA_MIXER_CONTROLS("AIF1TX3", ARIZONA_AIF1TX3MIX_INPUT_1_SOURCE), 806ARIZONA_MIXER_CONTROLS("AIF1TX3", ARIZONA_AIF1TX3MIX_INPUT_1_SOURCE),
@@ -880,6 +907,18 @@ ARIZONA_MUX_ENUMS(ASRC1R, ARIZONA_ASRC1RMIX_INPUT_1_SOURCE);
880ARIZONA_MUX_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE); 907ARIZONA_MUX_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE);
881ARIZONA_MUX_ENUMS(ASRC2R, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE); 908ARIZONA_MUX_ENUMS(ASRC2R, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE);
882 909
910ARIZONA_MUX_ENUMS(ISRC1INT1, ARIZONA_ISRC1INT1MIX_INPUT_1_SOURCE);
911ARIZONA_MUX_ENUMS(ISRC1INT2, ARIZONA_ISRC1INT2MIX_INPUT_1_SOURCE);
912
913ARIZONA_MUX_ENUMS(ISRC1DEC1, ARIZONA_ISRC1DEC1MIX_INPUT_1_SOURCE);
914ARIZONA_MUX_ENUMS(ISRC1DEC2, ARIZONA_ISRC1DEC2MIX_INPUT_1_SOURCE);
915
916ARIZONA_MUX_ENUMS(ISRC2INT1, ARIZONA_ISRC2INT1MIX_INPUT_1_SOURCE);
917ARIZONA_MUX_ENUMS(ISRC2INT2, ARIZONA_ISRC2INT2MIX_INPUT_1_SOURCE);
918
919ARIZONA_MUX_ENUMS(ISRC2DEC1, ARIZONA_ISRC2DEC1MIX_INPUT_1_SOURCE);
920ARIZONA_MUX_ENUMS(ISRC2DEC2, ARIZONA_ISRC2DEC2MIX_INPUT_1_SOURCE);
921
883ARIZONA_MIXER_ENUMS(DSP1L, ARIZONA_DSP1LMIX_INPUT_1_SOURCE); 922ARIZONA_MIXER_ENUMS(DSP1L, ARIZONA_DSP1LMIX_INPUT_1_SOURCE);
884ARIZONA_MIXER_ENUMS(DSP1R, ARIZONA_DSP1RMIX_INPUT_1_SOURCE); 923ARIZONA_MIXER_ENUMS(DSP1R, ARIZONA_DSP1RMIX_INPUT_1_SOURCE);
885 924
@@ -1002,6 +1041,26 @@ SND_SOC_DAPM_PGA("ASRC2L", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2L_ENA_SHIFT, 0,
1002SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0, 1041SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0,
1003 NULL, 0), 1042 NULL, 0),
1004 1043
1044SND_SOC_DAPM_PGA("ISRC1INT1", ARIZONA_ISRC_1_CTRL_3,
1045 ARIZONA_ISRC1_INT0_ENA_SHIFT, 0, NULL, 0),
1046SND_SOC_DAPM_PGA("ISRC1INT2", ARIZONA_ISRC_1_CTRL_3,
1047 ARIZONA_ISRC1_INT1_ENA_SHIFT, 0, NULL, 0),
1048
1049SND_SOC_DAPM_PGA("ISRC1DEC1", ARIZONA_ISRC_1_CTRL_3,
1050 ARIZONA_ISRC1_DEC0_ENA_SHIFT, 0, NULL, 0),
1051SND_SOC_DAPM_PGA("ISRC1DEC2", ARIZONA_ISRC_1_CTRL_3,
1052 ARIZONA_ISRC1_DEC1_ENA_SHIFT, 0, NULL, 0),
1053
1054SND_SOC_DAPM_PGA("ISRC2INT1", ARIZONA_ISRC_2_CTRL_3,
1055 ARIZONA_ISRC2_INT0_ENA_SHIFT, 0, NULL, 0),
1056SND_SOC_DAPM_PGA("ISRC2INT2", ARIZONA_ISRC_2_CTRL_3,
1057 ARIZONA_ISRC2_INT1_ENA_SHIFT, 0, NULL, 0),
1058
1059SND_SOC_DAPM_PGA("ISRC2DEC1", ARIZONA_ISRC_2_CTRL_3,
1060 ARIZONA_ISRC2_DEC0_ENA_SHIFT, 0, NULL, 0),
1061SND_SOC_DAPM_PGA("ISRC2DEC2", ARIZONA_ISRC_2_CTRL_3,
1062 ARIZONA_ISRC2_DEC1_ENA_SHIFT, 0, NULL, 0),
1063
1005SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, 1064SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0,
1006 ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), 1065 ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0),
1007SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0, 1066SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0,
@@ -1138,6 +1197,18 @@ ARIZONA_MUX_WIDGETS(ASRC1R, "ASRC1R"),
1138ARIZONA_MUX_WIDGETS(ASRC2L, "ASRC2L"), 1197ARIZONA_MUX_WIDGETS(ASRC2L, "ASRC2L"),
1139ARIZONA_MUX_WIDGETS(ASRC2R, "ASRC2R"), 1198ARIZONA_MUX_WIDGETS(ASRC2R, "ASRC2R"),
1140 1199
1200ARIZONA_MUX_WIDGETS(ISRC1DEC1, "ISRC1DEC1"),
1201ARIZONA_MUX_WIDGETS(ISRC1DEC2, "ISRC1DEC2"),
1202
1203ARIZONA_MUX_WIDGETS(ISRC1INT1, "ISRC1INT1"),
1204ARIZONA_MUX_WIDGETS(ISRC1INT2, "ISRC1INT2"),
1205
1206ARIZONA_MUX_WIDGETS(ISRC2DEC1, "ISRC2DEC1"),
1207ARIZONA_MUX_WIDGETS(ISRC2DEC2, "ISRC2DEC2"),
1208
1209ARIZONA_MUX_WIDGETS(ISRC2INT1, "ISRC2INT1"),
1210ARIZONA_MUX_WIDGETS(ISRC2INT2, "ISRC2INT2"),
1211
1141WM_ADSP2("DSP1", 0), 1212WM_ADSP2("DSP1", 0),
1142 1213
1143SND_SOC_DAPM_OUTPUT("HPOUT1L"), 1214SND_SOC_DAPM_OUTPUT("HPOUT1L"),
@@ -1195,6 +1266,14 @@ SND_SOC_DAPM_OUTPUT("MICSUPP"),
1195 { name, "ASRC1R", "ASRC1R" }, \ 1266 { name, "ASRC1R", "ASRC1R" }, \
1196 { name, "ASRC2L", "ASRC2L" }, \ 1267 { name, "ASRC2L", "ASRC2L" }, \
1197 { name, "ASRC2R", "ASRC2R" }, \ 1268 { name, "ASRC2R", "ASRC2R" }, \
1269 { name, "ISRC1DEC1", "ISRC1DEC1" }, \
1270 { name, "ISRC1DEC2", "ISRC1DEC2" }, \
1271 { name, "ISRC1INT1", "ISRC1INT1" }, \
1272 { name, "ISRC1INT2", "ISRC1INT2" }, \
1273 { name, "ISRC2DEC1", "ISRC2DEC1" }, \
1274 { name, "ISRC2DEC2", "ISRC2DEC2" }, \
1275 { name, "ISRC2INT1", "ISRC2INT1" }, \
1276 { name, "ISRC2INT2", "ISRC2INT2" }, \
1198 { name, "DSP1.1", "DSP1" }, \ 1277 { name, "DSP1.1", "DSP1" }, \
1199 { name, "DSP1.2", "DSP1" }, \ 1278 { name, "DSP1.2", "DSP1" }, \
1200 { name, "DSP1.3", "DSP1" }, \ 1279 { name, "DSP1.3", "DSP1" }, \
@@ -1291,6 +1370,18 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
1291 { "ASRC2L", NULL, "ASRC2L Input" }, 1370 { "ASRC2L", NULL, "ASRC2L Input" },
1292 { "ASRC2R", NULL, "ASRC2R Input" }, 1371 { "ASRC2R", NULL, "ASRC2R Input" },
1293 1372
1373 { "ISRC1DEC1", NULL, "ISRC1DEC1 Input" },
1374 { "ISRC1DEC2", NULL, "ISRC1DEC2 Input" },
1375
1376 { "ISRC1INT1", NULL, "ISRC1INT1 Input" },
1377 { "ISRC1INT2", NULL, "ISRC1INT2 Input" },
1378
1379 { "ISRC2DEC1", NULL, "ISRC2DEC1 Input" },
1380 { "ISRC2DEC2", NULL, "ISRC2DEC2 Input" },
1381
1382 { "ISRC2INT1", NULL, "ISRC2INT1 Input" },
1383 { "ISRC2INT2", NULL, "ISRC2INT2 Input" },
1384
1294 ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), 1385 ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"),
1295 ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), 1386 ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"),
1296 ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), 1387 ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"),
@@ -1338,6 +1429,18 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
1338 ARIZONA_MUX_ROUTES("ASRC2L"), 1429 ARIZONA_MUX_ROUTES("ASRC2L"),
1339 ARIZONA_MUX_ROUTES("ASRC2R"), 1430 ARIZONA_MUX_ROUTES("ASRC2R"),
1340 1431
1432 ARIZONA_MUX_ROUTES("ISRC1INT1"),
1433 ARIZONA_MUX_ROUTES("ISRC1INT2"),
1434
1435 ARIZONA_MUX_ROUTES("ISRC1DEC1"),
1436 ARIZONA_MUX_ROUTES("ISRC1DEC2"),
1437
1438 ARIZONA_MUX_ROUTES("ISRC2INT1"),
1439 ARIZONA_MUX_ROUTES("ISRC2INT2"),
1440
1441 ARIZONA_MUX_ROUTES("ISRC2DEC1"),
1442 ARIZONA_MUX_ROUTES("ISRC2DEC2"),
1443
1341 ARIZONA_DSP_ROUTES("DSP1"), 1444 ARIZONA_DSP_ROUTES("DSP1"),
1342 1445
1343 { "AEC Loopback", "HPOUT1L", "OUT1L" }, 1446 { "AEC Loopback", "HPOUT1L", "OUT1L" },
@@ -1467,6 +1570,10 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)
1467 if (ret != 0) 1570 if (ret != 0)
1468 return ret; 1571 return ret;
1469 1572
1573 ret = snd_soc_add_codec_controls(codec, wm_adsp_fw_controls, 1);
1574 if (ret != 0)
1575 return ret;
1576
1470 snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS"); 1577 snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS");
1471 1578
1472 priv->core.arizona->dapm = &codec->dapm; 1579 priv->core.arizona->dapm = &codec->dapm;