You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] connect multi-DAIs with one SdW link in one SdW device driver #2513
I want to add the IV feedback feature in rt1308-sdw driver now. But, I encounter the problem of how to connect multi-DAIs in the m/c driver.
Due to the hardware design of rt1308-sdw, it needs two data ports (DP2 & DP4) to feedback the left IV and right IV separately.
To implement the amp protection, it will need to feedback data ports both.
I try to add two DAIs for DP2 and DP4 like below.
Based on my understanding of the m/c driver (sof_sdw.c), it can't connect and select the different DAI name with this condition.
I think the correct connections are similar to below. (assume using SdW link3)
"SDW3 Pin2" connects to "rt1308-aif" : DP1 Playback
"SDW3 Pin3" connects to "rt1308-aif-fb1" : DP2 Capture for Left IV
"SDW3 Pin4" connects to "rt1308-aif-fb2" : DP4 Capture for Right IV
Is it possible to do this with the current m/c driver? Or any suggestions to support this feature?
@shumingfan I am not sure if it's necessary to have two DAIs, one for each port. IIRC a stream can use two ports on the same device. Will look into this later today, it's an interesting point.
Likewise, on the master side you could use a single port for the feedback, with the left and right channels written in different slots by the RT1308 ports. The bus allows for the master to combine data if they are written in the right places (configured by the bit allocation algorithm).
Keep in mind though that the Intel firmware does not support this yet, so I am not sure how we would test this anyways if there's nothing to, we may need an experimental topology where we add a PCM capture stream visible all the way to the OS, until the firmware has the ability to deal with feedback.
How we add the Realtek-specific processing is another issue from a firmware signature standpoint, we don't have a mechanism yet to add third party libraries signed with an OEM key. @lgirdwood FYI.
You could have an port_config array with 2 ports used by your DAI. the ch_mask and num would be different for the [0] and [1] case, and correspond to the left and right feedback. I really don't see why you would need multiple DAIs here on the codec side, all you need is a DAI with has two ports.
Of course this is completely untested, but from an API perspective we have the hooks needed.
You could have an port_config array with 2 ports used by your DAI. the ch_mask and num would be different for the [0] and [1] case, and correspond to the left and right feedback. I really don't see why you would need multiple DAIs here on the codec side, all you need is a DAI with has two ports.
Of course this is completely untested, but from an API perspective we have the hooks needed.
@plbossart Oh, I didn't expect I could use this to set the multi data ports. Now I know. Thanks.
I also checked the PR #2514 . I left one comment to fix the channel number.
Activity
plbossart commentedon Oct 16, 2020
@shumingfan I am not sure if it's necessary to have two DAIs, one for each port. IIRC a stream can use two ports on the same device. Will look into this later today, it's an interesting point.
Likewise, on the master side you could use a single port for the feedback, with the left and right channels written in different slots by the RT1308 ports. The bus allows for the master to combine data if they are written in the right places (configured by the bit allocation algorithm).
Keep in mind though that the Intel firmware does not support this yet, so I am not sure how we would test this anyways if there's nothing to, we may need an experimental topology where we add a PCM capture stream visible all the way to the OS, until the firmware has the ability to deal with feedback.
How we add the Realtek-specific processing is another issue from a firmware signature standpoint, we don't have a mechanism yet to add third party libraries signed with an OEM key. @lgirdwood FYI.
plbossart commentedon Oct 16, 2020
@shumingfan see your code below
You could have an port_config array with 2 ports used by your DAI. the ch_mask and num would be different for the [0] and [1] case, and correspond to the left and right feedback. I really don't see why you would need multiple DAIs here on the codec side, all you need is a DAI with has two ports.
Of course this is completely untested, but from an API perspective we have the hooks needed.
shumingfan commentedon Oct 19, 2020
@plbossart Oh, I didn't expect I could use this to set the multi data ports. Now I know. Thanks.
I also checked the PR #2514 . I left one comment to fix the channel number.
shumingfan commentedon Oct 22, 2020
PR #2514 could meet my requirement. This issue could close now.
@plbossart Thanks.