Earned income is only from wages on W2 (1040 line 1) or a Net Profit on Schedule C for self employment income.
For an IRA contribution. If you only have self-employment income you can only contribute up to your net profit reduced by the deduction allowed for one-half of your self-employment taxes then only up to the max IRA limit.
See IRS publication 590 http://www.irs.gov/pub/irs-pdf/p590a.pdf
So check 1040 Schedule 1 line 15. You have to deduct that amount from your Schedule C Net Profit. That will give you the allowed contribution for self employment & 1099NEC income.