Re: Developing a ti-pcm1863 (adc) codec driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 23, 2017 at 06:32:03PM +0200, Oleksandr Müller wrote:
> Hello Mr. Brown,
> 
> I have a soundcard which doesnt have a linux driver. Quick information it
> has a pcm1863 adc and a pcm5142 dac on it.

This looks like you've got most of a driver here, probably the easiest
thing to do is submit it using the process outlined in
SubmittingPatches.  The code looks mostly fine so this shouldn't be too
much of an issue.

> 1. Question would be towards the dapm_widgets and dapm_routes definitions.
> When defining the dapm_adc widget do I put there the Capture stream or do I
> seperate it with "NULL" and then adding the dapm_routes definitions? Which
> one is correct since I have seen both possibilities (which ad-/disadventages
> do  I have?)

Use a route, that's the more modern way.

> 2. Question in my layout plan I need to set the ADC to VIN4 l/r because only
> this one is connected to the microphone port. I have put it into the sound
> controls but how would I make this switch from the command line (arecord) or
> in the players (like vlc)

I'm not sure I understand the question here.

> Furthermore I would really be interested in gaining more knowledge about the
> accesses and routines from e.g. the vlc player using alsa (?) and then the
> accesses to the hardware? Also the whole registering process in which order
> are which files executed to get into the state where the os knows my
> soundcard. Since in a stracktrace I dont see this high level functions

You can see the card initialization in the code.  There's no defined
ordering for the device model probing, even if things are currently
redicatable on your system you shouldn't rely on anything.

> //Register Addresses

Please follow the kernel coding style.

> static const struct snd_kcontrol_new pcm1863_controls[] = {
> 	SOC_SINGLE("ADC MUX VIN4L", PCM1863_ADC1_INPUT_SEL_L, //not possible with SOC_DOUBLE since
> 			PCM1863_SEL_L_VIN4, 1, 0),	                    //two different register?

SOC_DOUBLE_R()

> 				"Failed to enable clock divider autoset: %d\n",
> 				ret);
> 				return ret;
> 		}
> 	case SND_SOC_DAIFMT_CBM_CFM:	

Missing break;

> MODULE_DESCRIPTION("ASoC pcm1863 driver");
> MODULE_AUTHOR("Dummy Name <test@xxxxxxxxx>");

Fill it in or omit it.

> static const struct of_device_id pcm1863_of_match[] = {
> 	{ .compatible = "ti,pcm1863", },
> 	{ }
> };
> MODULE_DEVICE_TABLE(of, pcm1863_of_match);

You need a binding document for this.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux