RE: Request for help: How to upgrade a sound driver from kernel 4.14 to 6.6

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

 



On 10 June 2025 15:59:57 BST, Steve Broshar <steve@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>Thanks for the direction.
>
>Can you suggest a resource for writing such a driver? I cannot find anything that describes what a driver would do exactly. Is there a template or example that you can suggest that I use as a starting point?
>
>-steve
>
>-----Original Message-----
>From: Lars-Peter Clausen <lars@xxxxxxxxxx> 
>Sent: Saturday, May 31, 2025 11:33 PM
>To: Steve Broshar <steve@xxxxxxxxxxxxxxxxxxxxxxxxx>; alsa-devel@xxxxxxxxxxxxxxxx
>Subject: Re: Request for help: How to upgrade a sound driver from kernel 4.14 to 6.6
>
>Hi,
>
>This seems to be one of the cases where chatgpt doesn't get it quite right and just makes stuff up.
>
>Generally you still need a simple driver for you codec that at least specifies which formats and rates are supported. But this can be a really simple driver, doesn't have to do anything other than registering the codec.
>
>On 5/30/25 14:47, Steve Broshar wrote:
>> Thanks for the help. I learned that to output I2S to a slave device, I 
>> shouldn't need a device-specific driver; that built-in drivers are all 
>> I need. I thought that was going to be easy to setup, but I have no 
>> luck with it. The boot log contains: platform sound-auditon: deferred 
>> probe pending
>>
>> I have been working with chatgpt extensively as it seems you do too. It has a deep understanding of the linux kernel codebase. But, so far I cannot get the device to initialize (probe). Do you agree that I should be able to avoid the use of a device-specific driver? Do you see any issues in the device tree below?
>>
>> Here's the device tree setup:
>>
>> &sai2 {
>> 	#sound-dai-cells = <0>;
>> 	pinctrl-names = "default";
>> 	pinctrl-0 = <&pinctrl_sai2>;
>> 	assigned-clocks = <&clk IMX8MN_CLK_SAI2>;
>> 	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
>> 	assigned-clock-rates = <24576000>;
>> 	fsl,sai-mclk-direction-output;
>> 	status = "okay";
>> };
>>
>> 	pinctrl_sai2: sai2grp {
>> 		fsl,pins = <
>> 			MX8MN_IOMUXC_SAI2_TXC_SAI2_TX_BCLK      0xd6
>> 			MX8MN_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC     0xd6
>> 			MX8MN_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0    0xd6
>> 			//MX8MN_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0    0xd6
>> 			MX8MN_IOMUXC_SAI2_MCLK_SAI2_MCLK    0xd6
>> 		>;
>> 	};
>>
>>
>> 	// Compton audio output does not require a device-specific codec; the built-in, dummy driver is sufficient
>> 	codec_auditon: codec-snd-doc-dummy {
>> 		compatible = "linux,snd-soc-dummy";
>> 	 	#sound-dai-cells = <0>;
>> 	};
>>
>> 	// audio output for Compton can be accomplished via the built-in simple-audio-card driver
>> 	// since only need to stream I2S; device (ADAU1467) does not require setup/control
>> 	sound-auditon {
>> 		// specify the built-in simple sound card driver
>> 		compatible = "simple-audio-card";
>> 		
>> 		// description that shows in userland; i.e. via 'aplay -l'
>> 		// auditon: a quantum of sound ;)
>> 		simple-audio-card,name = "auditon";
>> 		
>> 		// specify stream format
>> 		// supported options: i2s, right_j, left_j, dsp_a, dsp_b, ac97, pdm, msb, lsb
>> 		//simple-audio-card,format = "i2s"; // with i2s, boot log shows: deferred probe pending and no device is setup
>> 		simple-audio-card,format = "dsp_a";
>> 		
>> 		// assign CPU as master for bit-clock
>> 		simple-audio-card,bitclock-master = <&cpu_link_auditon>;
>> 		
>> 		// assign CPU as master for frame-clock
>> 		simple-audio-card,frame-master = <&cpu_link_auditon>;
>>
>> 		status = "okay";
>>
>> 		cpu_link_auditon: simple-audio-card,cpu {
>> 			sound-dai = <&sai2>;
>> 			dai-tdm-slot-num = <2>; // 2=>stereo
>> 			dai-tdm-slot-width = <32>; // bits per slot
>> 		};
>>
>> 		simple-audio-card,codec {
>> 			sound-dai = <&codec_auditon>;
>> 		};
>> 	};
>>
>> Thanks in advance.
>>
>> Steve Broshar
>> Palmer Wireless Medtech
>
>

What SoC does the device have?

Olivia



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

  Powered by Linux