On Tue, Jun 14, 2011 at 05:34:28PM -0400, Mike Frysinger wrote:
This is OK but some nits/future improvements:
+static const struct snd_kcontrol_new ad1835a_ad1837a_snd_controls[] = {
- /* DAC volume control */
- SOC_DOUBLE_R("DAC1 Volume", AD183X_DAC_L1_VOL,
AD183X_DAC_R1_VOL, 0, 0x3FF, 0),
It would be much better to provide dB information but OK.
- /* DAC de-emphasis */
- SOC_ENUM("Playback Deemphasis", ad183x_deemp_enum),
OK for now but what modern drivers are doing here is making the deemphasis switch a switch at the application layer then automatically selecting the sample rate to use for the filter based on the active sample rate.
@@ -45,17 +125,17 @@ static const struct snd_kcontrol_new ad183x_snd_controls[] = {
/* ADC switch control */ SOC_DOUBLE("ADC1 Switch", AD183X_ADC_CTRL2, AD183X_ADCL1_MUTE,
AD183X_ADCR1_MUTE, 1, 1),
AD183X_ADCR1_MUTE, 1, 1),
Indentation changes should really be in a separate patch if you end up needing to respin the series.
- if (!strcmp(chip_name, "ad1835a") || !strcmp(chip_name, "ad1837a"))
ad183x->chl_ctrl = &ad1835a_ad1837a_chl_ctrls;
- else if (!strcmp(chip_name, "ad1838a") || !strcmp(chip_name, "ad1839a"))
ad183x->chl_ctrl = &ad1838a_ad1839a_chl_ctrls;
- else if (!strcmp(chip_name, "ad1836"))
ad183x->chl_ctrl = &ad1836_chl_ctrls;
- else {
dev_err(&spi->dev, "unsupported chip type: %s\n", chip_name);
return -EINVAL;
Someone really ought to get around to fixing this in the SPI subsystem :/